quantumbit commited on
Commit
aa76ac6
·
verified ·
1 Parent(s): b93c6e8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -9
Dockerfile CHANGED
@@ -2,17 +2,18 @@ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies first
6
- RUN apt-get update && apt-get install -y \
7
- build-essential \
8
- && rm -rf /var/lib/apt/lists/*
9
-
10
- # Upgrade pip first
11
- RUN pip install --upgrade pip
12
 
 
13
  COPY requirements.txt .
14
- RUN pip install --no-cache-dir -r requirements.txt
 
15
 
16
  COPY . .
17
 
18
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
 
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies
6
+ RUN apt-get update && \
7
+ apt-get install -y --no-install-recommends libgl1 && \
8
+ apt-get clean && \
9
+ rm -rf /var/lib/apt/lists/*
 
 
10
 
11
+ # Install Python dependencies
12
  COPY requirements.txt .
13
+ RUN pip install --no-cache-dir --upgrade pip && \
14
+ pip install --no-cache-dir -r requirements.txt
15
 
16
  COPY . .
17
 
18
+ # Use timeout and worker settings suitable for Hugging Face
19
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "120", "--workers", "1", "app:app"]