Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -9
Dockerfile
CHANGED
|
@@ -2,17 +2,18 @@ FROM python:3.10-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install system dependencies
|
| 6 |
-
RUN apt-get update &&
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
# Upgrade pip first
|
| 11 |
-
RUN pip install --upgrade pip
|
| 12 |
|
|
|
|
| 13 |
COPY requirements.txt .
|
| 14 |
-
RUN pip install --no-cache-dir
|
|
|
|
| 15 |
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
-
|
|
|
|
|
|
| 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"]
|