Spaces:
Sleeping
Sleeping
refactor(infra): Override CMD to adapt standard GHCR image for Hugging Face
Browse filesThis commit updates the Dockerfile to run the official GHCR image on the port required by the Hugging Face Spaces environment (7860).
- **Base Image:** Continues to use the pre-built `latest` image from `ghcr.io` to ensure consistency with other environments.
- **Command Override:** The `CMD` instruction is now overridden to start the `uvicorn` server on port `7860`, which is the standard for HF Spaces, instead of the internal port defined in the base image.
This hybrid approach combines the reliability of a standardized build pipeline with the flexibility required for the Hugging Face runtime, ensuring fast, consistent, and correct deployments.
- Dockerfile +3 -2
Dockerfile
CHANGED
|
@@ -2,5 +2,6 @@
|
|
| 2 |
# This ensures the Hugging Face Space always runs the exact same code as our internal environments.
|
| 3 |
FROM ghcr.io/sentiric/sentiric-knowledge-service:latest
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
| 2 |
# This ensures the Hugging Face Space always runs the exact same code as our internal environments.
|
| 3 |
FROM ghcr.io/sentiric/sentiric-knowledge-service:latest
|
| 4 |
|
| 5 |
+
EXPOSE 7860
|
| 6 |
+
|
| 7 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--no-access-log"]
|