azmisahin commited on
Commit
8015296
·
verified ·
1 Parent(s): 493771a

refactor(infra): Override CMD to adapt standard GHCR image for Hugging Face

Browse files

This 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.

Files changed (1) hide show
  1. 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
- # Note: The base image already contains the CMD and exposes the correct port.
6
- # No further configuration is needed here.
 
 
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"]