Spaces:
Sleeping
Sleeping
Deployment commited on
Commit ·
6a97952
1
Parent(s): 2dfc473
Fix: Use uvicorn directly for HF Spaces startup
Browse files- 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
|
| 32 |
-
|
| 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"]
|
|
|