Update Dockerfile
Browse files- Dockerfile +1 -3
Dockerfile
CHANGED
|
@@ -60,8 +60,7 @@
|
|
| 60 |
# # CMD ["python", "app.py"]
|
| 61 |
# CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "2", "app:app"]
|
| 62 |
# #CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "", "--timeout", "360", "app:app"]
|
| 63 |
-
|
| 64 |
-
# Base: slim Python image for smaller footprint (CPU-only)
|
| 65 |
FROM python:3.11-slim
|
| 66 |
|
| 67 |
WORKDIR /app
|
|
@@ -135,6 +134,5 @@ EXPOSE 7860
|
|
| 135 |
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
| 136 |
CMD curl -f http://localhost:7860/healthz || exit 1
|
| 137 |
|
| 138 |
-
# Run Gunicorn with single worker (CPU-friendly) and threads; no timeout
|
| 139 |
# Single worker avoids multiple processes duplicating model memory on CPU-heavy workloads.
|
| 140 |
CMD ["gunicorn", "app:app", "-b", "0.0.0.0:7860", "-w", "1", "--threads", "4", "-k", "gthread", "--timeout", "0", "--graceful-timeout", "0"]
|
|
|
|
| 60 |
# # CMD ["python", "app.py"]
|
| 61 |
# CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "2", "app:app"]
|
| 62 |
# #CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "", "--timeout", "360", "app:app"]
|
| 63 |
+
|
|
|
|
| 64 |
FROM python:3.11-slim
|
| 65 |
|
| 66 |
WORKDIR /app
|
|
|
|
| 134 |
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
| 135 |
CMD curl -f http://localhost:7860/healthz || exit 1
|
| 136 |
|
|
|
|
| 137 |
# Single worker avoids multiple processes duplicating model memory on CPU-heavy workloads.
|
| 138 |
CMD ["gunicorn", "app:app", "-b", "0.0.0.0:7860", "-w", "1", "--threads", "4", "-k", "gthread", "--timeout", "0", "--graceful-timeout", "0"]
|