Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +8 -11
Dockerfile
CHANGED
|
@@ -1,17 +1,14 @@
|
|
| 1 |
-
|
| 2 |
-
FROM python:3.9-slim
|
| 3 |
|
| 4 |
-
# Set the working directory inside the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
|
|
|
|
|
|
|
| 8 |
COPY . .
|
| 9 |
|
| 10 |
-
|
| 11 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
# - `app:app`: Runs the Flask app (assuming `app.py` contains the Flask instance named `app`)
|
| 17 |
-
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"]
|
|
|
|
| 1 |
+
FROM python:3.9
|
|
|
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
COPY requirements.txt .
|
| 6 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
+
|
| 8 |
COPY . .
|
| 9 |
|
| 10 |
+
EXPOSE 7860
|
|
|
|
| 11 |
|
| 12 |
+
# Run Gunicorn for Flask in background, Streamlit in foreground
|
| 13 |
+
CMD gunicorn -b 0.0.0.0:8000 app:app & \
|
| 14 |
+
streamlit run main.py --server.port=7860 --server.address=0.0.0.0
|
|
|
|
|
|