amanmurari commited on
Commit
c031c5d
Β·
verified Β·
1 Parent(s): 0e0dfc3

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -52,17 +52,18 @@ RUN echo "" > ./traffic_control/__init__.py || true
52
  RUN pip install --no-cache-dir -e .
53
 
54
  # ── Runtime config ────────────────────────────────────────────────────────
55
- ENV WORKERS=2
56
  ENV PORT=7860
57
  ENV PYTHONDONTWRITEBYTECODE=1
58
  ENV PYTHONUNBUFFERED=1
59
 
60
  EXPOSE 7860
61
 
62
-
 
63
  ENV ENABLE_WEB_INTERFACE=true
64
  CMD ["sh", "-c", \
65
  "uvicorn traffic_control.server.app:app \
66
  --host 0.0.0.0 \
67
  --port ${PORT} \
68
- --workers ${WORKERS}"]
 
 
52
  RUN pip install --no-cache-dir -e .
53
 
54
  # ── Runtime config ────────────────────────────────────────────────────────
 
55
  ENV PORT=7860
56
  ENV PYTHONDONTWRITEBYTECODE=1
57
  ENV PYTHONUNBUFFERED=1
58
 
59
  EXPOSE 7860
60
 
61
+ # Single worker is required: Gradio's mount_gradio_app is not fork-safe.
62
+ # HF Spaces expects a single healthy process on port 7860.
63
  ENV ENABLE_WEB_INTERFACE=true
64
  CMD ["sh", "-c", \
65
  "uvicorn traffic_control.server.app:app \
66
  --host 0.0.0.0 \
67
  --port ${PORT} \
68
+ --workers 1 \
69
+ --timeout-keep-alive 75"]