Spaces:
Running
Running
Download Dockerfile from nvikou/scenora-api: direct link, hf CLI and curl.
- Browser
- Download file 719 Bytes
-
https://huggingface.co/spaces/nvikou/scenora-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/nvikou/scenora-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/nvikou/scenora-api/resolve/main/Dockerfile
719 Bytes
| FROM python:3.11-slim | |
| # Utilisateur non root : requis par Hugging Face Spaces | |
| RUN useradd -m -u 1000 user | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| PYTHONUNBUFFERED=1 \ | |
| GRADIO_SERVER_NAME=0.0.0.0 \ | |
| PORT=7860 | |
| WORKDIR $HOME/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 app.py . | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \ | |
| CMD curl -fsS http://localhost:7860/ || exit 1 | |
| CMD ["python", "app.py"] | |