abiyyufahri commited on
Commit
b328f90
·
1 Parent(s): 55b2cb1

Install error fix attemp 2

Browse files
Files changed (2) hide show
  1. Dockerfile +8 -6
  2. requirements.txt +1 -2
Dockerfile CHANGED
@@ -1,18 +1,20 @@
1
- FROM python:3.9-slim
2
 
3
- # Install dependencies
4
- RUN apt-get update && apt-get install -y git curl && \
5
- apt-get clean && rm -rf /var/lib/apt/lists/*
 
6
 
7
- # Create non-root user
8
  RUN useradd -m -u 1000 user
9
  USER user
10
  ENV PATH="/home/user/.local/bin:$PATH"
11
 
12
  WORKDIR /app
13
 
 
14
  COPY --chown=user requirements.txt ./
15
- RUN pip install --no-cache-dir --upgrade pip && \
16
  pip install --no-cache-dir -r requirements.txt
17
 
18
  COPY --chown=user . .
 
1
+ FROM python:3.10-slim
2
 
3
+ # Install system dependencies
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ git gcc libglib2.0-0 libsm6 libxext6 libxrender-dev && \
6
+ rm -rf /var/lib/apt/lists/*
7
 
8
+ # Buat user non-root (UID 1000)
9
  RUN useradd -m -u 1000 user
10
  USER user
11
  ENV PATH="/home/user/.local/bin:$PATH"
12
 
13
  WORKDIR /app
14
 
15
+ # Copy dan install semua dependencies
16
  COPY --chown=user requirements.txt ./
17
+ RUN pip install --upgrade pip && \
18
  pip install --no-cache-dir -r requirements.txt
19
 
20
  COPY --chown=user . .
requirements.txt CHANGED
@@ -1,10 +1,9 @@
1
  fastapi
2
  uvicorn[standard]
3
  transformers
4
- torch==2.1.2
5
  datasets
6
  Pillow
 
7
  accelerate
8
  scipy
9
- # library tambahan dari repo `gui_actor`
10
  git+https://github.com/microsoft/GUI-Actor.git
 
1
  fastapi
2
  uvicorn[standard]
3
  transformers
 
4
  datasets
5
  Pillow
6
+ torch==2.2.2
7
  accelerate
8
  scipy
 
9
  git+https://github.com/microsoft/GUI-Actor.git