Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +12 -3
Dockerfile
CHANGED
|
@@ -1,10 +1,19 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
|
|
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
-
COPY . .
|
| 5 |
|
|
|
|
| 6 |
COPY requirements.txt .
|
| 7 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
EXPOSE 7860
|
| 10 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Python image
|
| 2 |
+
FROM python:3.9-slim
|
| 3 |
|
| 4 |
+
|
| 5 |
+
# Set working directory
|
| 6 |
WORKDIR /app
|
|
|
|
| 7 |
|
| 8 |
+
# Install dependencies
|
| 9 |
COPY requirements.txt .
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
| 12 |
+
# Copy the entire project
|
| 13 |
+
COPY . .
|
| 14 |
+
|
| 15 |
+
# Expose the port
|
| 16 |
EXPOSE 7860
|
| 17 |
+
|
| 18 |
+
# Command to run the app with gunicorn on Hugging Face Spaces
|
| 19 |
+
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
|