Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
|
@@ -36,8 +36,8 @@ RUN pip install -r requirements.txt || pip install -r backend/requirements.txt |
|
|
| 36 |
# Install runtime dependencies explicitly
|
| 37 |
RUN pip install --no-cache-dir fastapi uvicorn python-multipart ultralytics opencv-python-headless pillow numpy scikit-learn tensorflow keras
|
| 38 |
|
| 39 |
-
# Hugging Face Spaces
|
| 40 |
EXPOSE 7860
|
| 41 |
|
| 42 |
-
# Run FastAPI app
|
| 43 |
-
CMD ["
|
|
|
|
| 36 |
# Install runtime dependencies explicitly
|
| 37 |
RUN pip install --no-cache-dir fastapi uvicorn python-multipart ultralytics opencv-python-headless pillow numpy scikit-learn tensorflow keras
|
| 38 |
|
| 39 |
+
# Hugging Face Spaces sets PORT (default 7860). Listen on $PORT for compatibility.
|
| 40 |
EXPOSE 7860
|
| 41 |
|
| 42 |
+
# Run FastAPI app (respect PORT env var if set by the platform)
|
| 43 |
+
CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860}"]
|