Spaces:
Runtime error
Runtime error
Download Dockerfile from chouchouvs/RFP-API: direct link, hf CLI and curl.
- Browser
- Download file 742 Bytes
-
https://huggingface.co/spaces/chouchouvs/RFP-API/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/chouchouvs/RFP-API/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/chouchouvs/RFP-API/resolve/main/Dockerfile
742 Bytes
| FROM python:3.10-slim | |
| # Deps système | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git ca-certificates && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # User 'user' (comme HF) | |
| RUN useradd -m -u 1000 user || true | |
| USER user | |
| # Confort Python | |
| ENV PIP_NO_CACHE_DIR=1 PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 | |
| # Install deps Python | |
| COPY --chown=user:user requirements.txt /tmp/requirements.txt | |
| RUN pip install --no-cache-dir -r /tmp/requirements.txt | |
| # Workspace | |
| ENV WORKSPACE=/home/user/workspace | |
| WORKDIR ${WORKSPACE} | |
| # Entrypoint = script qui clone + lance uvicorn | |
| COPY --chown=user:user entrypoint.sh /usr/local/bin/entrypoint.sh | |
| RUN chmod +x /usr/local/bin/entrypoint.sh | |
| EXPOSE 7860 | |
| CMD ["/usr/local/bin/entrypoint.sh"] | |