Download Dockerfile from nvikou/corrective-rag-data-assistant: direct link, hf CLI and curl.
- Browser
- Download file 769 Bytes
-
https://huggingface.co/spaces/nvikou/corrective-rag-data-assistant/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/nvikou/corrective-rag-data-assistant/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/nvikou/corrective-rag-data-assistant/resolve/main/Dockerfile
769 Bytes
| # Image compatible Hugging Face Spaces (SDK: docker) | |
| FROM python:3.11-slim | |
| # Hugging Face Spaces exécute le conteneur en tant qu'utilisateur non-root (uid 1000) | |
| RUN useradd -m -u 1000 appuser | |
| WORKDIR /app | |
| COPY --chown=appuser:appuser requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip \ | |
| && pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=appuser:appuser . . | |
| # Répertoire de cache HF (modèles / datasets téléchargés) inscriptible par appuser | |
| ENV HF_HOME=/app/.cache/huggingface | |
| RUN mkdir -p /app/.cache/huggingface && chown -R appuser:appuser /app | |
| USER appuser | |
| # Hugging Face Spaces (Docker SDK) route le trafic vers le port 7860 | |
| EXPOSE 7860 | |
| ENV PORT=7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |