Spaces:
Sleeping
Sleeping
Download Dockerfile from BobCodeur/wolof-generation-api: direct link, hf CLI and curl.
- Browser
- Download file 552 Bytes
-
https://huggingface.co/spaces/BobCodeur/wolof-generation-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/BobCodeur/wolof-generation-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/BobCodeur/wolof-generation-api/resolve/main/Dockerfile
552 Bytes
| FROM python:3.11-slim | |
| # Utilisateur non-root (recommandé par HF Spaces) + cache HF dans un dossier accessible | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| HF_HOME=/home/user/.cache/huggingface | |
| WORKDIR /app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user . . | |
| # HF Spaces attend l'appli sur le port 7860 | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |