Sriomdash commited on
Commit
813540a
·
verified ·
1 Parent(s): 0855c44

Update the Docker File

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -4
Dockerfile CHANGED
@@ -2,16 +2,21 @@ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies for Pillow
6
  RUN apt-get update && apt-get install -y \
7
- libgl1-mesa-glx \
 
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- COPY . .
 
11
 
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- # Port 7860 is the default for Hugging Face
 
 
 
15
  EXPOSE 7860
16
 
17
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies (for Pillow / OpenCV / image processing)
6
  RUN apt-get update && apt-get install -y \
7
+ libgl1 \
8
+ libglib2.0-0 \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Copy requirements first (better caching)
12
+ COPY requirements.txt .
13
 
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ # Copy rest of the app
17
+ COPY . .
18
+
19
+ # Hugging Face default port
20
  EXPOSE 7860
21
 
22
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]