Deployment commited on
Commit
6a97952
·
1 Parent(s): 2dfc473

Fix: Use uvicorn directly for HF Spaces startup

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -4
Dockerfile CHANGED
@@ -21,13 +21,12 @@ COPY . .
21
  # Create necessary directories
22
  RUN mkdir -p data output logs
23
 
24
- # Expose port
25
  EXPOSE 7860
26
 
27
  # Health check
28
  HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
29
  CMD curl -f http://localhost:7860/health || exit 1
30
 
31
- # Run setup and start the application
32
- RUN chmod +x /app/setup_space.py
33
- CMD python setup_space.py && python app.py
 
21
  # Create necessary directories
22
  RUN mkdir -p data output logs
23
 
24
+ # Expose port (HF Spaces uses 7860)
25
  EXPOSE 7860
26
 
27
  # Health check
28
  HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
29
  CMD curl -f http://localhost:7860/health || exit 1
30
 
31
+ # Run uvicorn directly
32
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--log-level", "info"]