Download Dockerfile from RDS777/data: direct link, hf CLI and curl.
- Browser
- Download file 681 Bytes
-
https://huggingface.co/spaces/RDS777/data/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/RDS777/data/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/RDS777/data/resolve/main/Dockerfile
681 Bytes
| # Renommer app_local.py en app.py avant le déploiement. | |
| FROM python:3.11-slim | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| PORT=7860 | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends git ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Hugging Face Spaces exécute les conteneurs Docker avec l'UID 1000 | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR /home/user/app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --user --upgrade pip \ | |
| && pip install --user -r requirements.txt | |
| COPY --chown=user . . | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] |