Spaces:
Sleeping
Sleeping
Download Dockerfile from ror-12/piston-api: direct link, hf CLI and curl.
- Browser
- Download file 659 Bytes
-
https://huggingface.co/spaces/ror-12/piston-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ror-12/piston-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ror-12/piston-api/resolve/main/Dockerfile
659 Bytes
| FROM python:3.11-slim-bookworm | |
| # Only Redis + supervisor needed (no compilers — we use the public Piston API) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| redis-server \ | |
| supervisor \ | |
| curl \ | |
| ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # Supervisor config | |
| RUN mkdir -p /etc/supervisor/conf.d/ && \ | |
| cp supervisord.conf /etc/supervisor/conf.d/supervisord.conf | |
| ENV PYTHONUNBUFFERED=1 | |
| # Hugging Face Spaces port | |
| EXPOSE 7860 | |
| CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"] |