Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +20 -11
Dockerfile
CHANGED
|
@@ -1,16 +1,25 @@
|
|
| 1 |
-
|
| 2 |
-
# you will also find guides on how best to write your Dockerfile
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
|
|
|
| 10 |
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
|
| 15 |
-
|
| 16 |
-
CMD ["
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
|
|
|
| 2 |
|
| 3 |
+
# System dependencies
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
build-essential \
|
| 6 |
+
libgl1 \
|
| 7 |
+
libglib2.0-0 \
|
| 8 |
+
libsm6 \
|
| 9 |
+
libxrender1 \
|
| 10 |
+
libxext6 \
|
| 11 |
+
ffmpeg \
|
| 12 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
+
# Copy project files
|
| 15 |
WORKDIR /app
|
| 16 |
+
COPY . .
|
| 17 |
+
|
| 18 |
+
# Install Python dependencies
|
| 19 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
+
# Expose Hugging Face default port
|
| 22 |
+
EXPOSE 7860
|
| 23 |
|
| 24 |
+
# Gunicorn entrypoint
|
| 25 |
+
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--workers", "2"]
|