Spaces:
Sleeping
Sleeping
Download Dockerfile from DhyandevP/CodeEvaluator: direct link, hf CLI and curl.
- Browser
- Download file 759 Bytes
-
https://huggingface.co/spaces/DhyandevP/CodeEvaluator/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/DhyandevP/CodeEvaluator/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/DhyandevP/CodeEvaluator/resolve/main/Dockerfile
759 Bytes
| # Code Evaluator — Hugging Face Spaces | |
| # | |
| # Requirements: | |
| # - Non-root user with UID 1000 (HF Spaces security policy) | |
| # - Application must listen on port 7860 | |
| # - /home/user/.local/bin on PATH for pip-installed binaries | |
| FROM python:3.11-slim | |
| # Create the non-root user and /app in a single layer to minimise image size. | |
| RUN useradd -m -u 1000 -s /bin/bash user \ | |
| && mkdir -p /app \ | |
| && chown user:user /app | |
| WORKDIR /app | |
| USER user | |
| ENV PATH="/home/user/.local/bin:${PATH}" | |
| # Copy deps first so Docker cache reuses this layer on source-only changes. | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user . . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |