Download Dockerfile from Fra150/Cpptai: direct link, hf CLI and curl.
- Browser
- Download file 585 Bytes
-
https://huggingface.co/spaces/Fra150/Cpptai/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Fra150/Cpptai/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Fra150/Cpptai/resolve/main/Dockerfile
585 Bytes
| FROM python:3.11-slim AS builder | |
| WORKDIR /build | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages | |
| COPY src/ ./src/ | |
| COPY configs/ ./configs/ | |
| COPY scripts/ ./scripts/ | |
| RUN useradd -m -r appuser && chown -R appuser:appuser /app | |
| USER appuser | |
| ENV PYTHONUNBUFFERED=1 | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ | |
| CMD python -c "import sys; sys.exit(0)" || exit 1 | |
| CMD ["python", "-m", "src.main"] | |