SavirD commited on
Commit
87ce6e3
·
verified ·
1 Parent(s): 66ddc54

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -5
Dockerfile CHANGED
@@ -75,11 +75,10 @@ ENV PATH="/app/.venv/bin:$PATH"
75
  # Set PYTHONPATH so imports work correctly
76
  ENV PYTHONPATH="/app/env:$PYTHONPATH"
77
 
78
- # Health check
79
  HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
80
- CMD curl -f http://localhost:8000/health || exit 1
81
 
82
- # Run the FastAPI server
83
- # The module path is constructed to work with the /app/env structure
84
  ENV ENABLE_WEB_INTERFACE=true
85
- CMD ["sh", "-c", "cd /app/env && uvicorn server.app:app --host 0.0.0.0 --port 8000"]
 
75
  # Set PYTHONPATH so imports work correctly
76
  ENV PYTHONPATH="/app/env:$PYTHONPATH"
77
 
78
+ # Health check (use PORT so it works on Hugging Face Spaces where PORT=7860)
79
  HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
80
+ CMD curl -f "http://localhost:${PORT:-8000}/health" || exit 1
81
 
82
+ # Run the FastAPI server (PORT=7860 on Hugging Face Spaces)
 
83
  ENV ENABLE_WEB_INTERFACE=true
84
+ CMD ["sh", "-c", "cd /app/env && uvicorn server.app:app --host 0.0.0.0 --port ${PORT:-8000}"]