Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +1 -8
Dockerfile
CHANGED
|
@@ -1,23 +1,16 @@
|
|
| 1 |
-
Use the official Python 3.12 slim image. This version supports
|
| 2 |
-
newer libraries like numpy==2.3.3 which require Python 3.11 or higher.
|
| 3 |
FROM python:3.12-slim
|
| 4 |
|
| 5 |
-
Set the working directory in the container
|
| 6 |
WORKDIR /app
|
| 7 |
|
| 8 |
Copy the requirements file into the container
|
| 9 |
COPY requirements.txt .
|
| 10 |
|
| 11 |
-
Install all Python dependencies, using the updated base image
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
Copy the rest of the application code
|
| 15 |
COPY . .
|
| 16 |
|
| 17 |
-
Install gunicorn, which will be used to run the Flask app
|
| 18 |
RUN pip install gunicorn
|
| 19 |
|
| 20 |
-
|
| 21 |
-
The app:app assumes your Flask app instance is named app inside app.py.
|
| 22 |
-
The port is set to 7860 as required by Hugging Face Spaces.
|
| 23 |
CMD exec gunicorn --bind :7860 --workers 1 --threads 8 app:app
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM python:3.12-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
Copy the requirements file into the container
|
| 6 |
COPY requirements.txt .
|
| 7 |
|
|
|
|
| 8 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 9 |
|
| 10 |
Copy the rest of the application code
|
| 11 |
COPY . .
|
| 12 |
|
|
|
|
| 13 |
RUN pip install gunicorn
|
| 14 |
|
| 15 |
+
|
|
|
|
|
|
|
| 16 |
CMD exec gunicorn --bind :7860 --workers 1 --threads 8 app:app
|