Spaces:
Sleeping
Sleeping
Commit ·
c6e7922
1
Parent(s): a1d1228
Simplify Dockerfile: copy all files at once
Browse files- Dockerfile +5 -16
Dockerfile
CHANGED
|
@@ -1,27 +1,16 @@
|
|
| 1 |
-
# Use Python 3.11 slim image
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
-
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy
|
| 8 |
-
COPY requirements.txt
|
| 9 |
-
|
| 10 |
-
# Install dependencies
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
-
# Copy application files
|
| 14 |
-
COPY
|
| 15 |
-
COPY table_hat_game.csv .
|
| 16 |
-
COPY assets/ ./assets/
|
| 17 |
|
| 18 |
# Expose port 7860 (Hugging Face Spaces default)
|
| 19 |
EXPOSE 7860
|
| 20 |
|
| 21 |
-
# Set environment variables
|
| 22 |
-
ENV DASH_DEBUG_MODE=False
|
| 23 |
-
ENV HOST=0.0.0.0
|
| 24 |
-
ENV PORT=7860
|
| 25 |
-
|
| 26 |
# Run the application with gunicorn
|
| 27 |
-
CMD gunicorn --bind 0.0.0.0:7860 --workers 1 --threads 2 --timeout 120 python_dash_IA:server
|
|
|
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Copy and install dependencies
|
| 6 |
+
COPY requirements.txt /app/
|
|
|
|
|
|
|
| 7 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 8 |
|
| 9 |
+
# Copy all application files
|
| 10 |
+
COPY . /app/
|
|
|
|
|
|
|
| 11 |
|
| 12 |
# Expose port 7860 (Hugging Face Spaces default)
|
| 13 |
EXPOSE 7860
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
# Run the application with gunicorn
|
| 16 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "2", "--timeout", "120", "python_dash_IA:server"]
|