Download Dockerfile from hugging-science/smilystudyworker: direct link, hf CLI and curl.
- Browser
- Download file 604 Bytes
-
https://huggingface.co/spaces/hugging-science/smilystudyworker/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/hugging-science/smilystudyworker/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/hugging-science/smilystudyworker/resolve/main/Dockerfile
604 Bytes
| # Dockerfile for HuggingFace Docker Space | |
| # Runtime: CPU-only free tier — no GPU needed, we just proxy OpenRouter | |
| FROM python:3.11-slim | |
| # HF Spaces runs as non-root user 1000 | |
| RUN useradd -m -u 1000 worker | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY worker.py . | |
| # HF Spaces expects the app on port 7860 | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # Switch to non-root | |
| USER 1000 | |
| # uvicorn with 1 worker — HF free tier is single-core anyway | |
| CMD ["uvicorn", "worker:app", "--host", "0.0.0.0", "--port", "7860", \ | |
| "--workers", "1", "--timeout-keep-alive", "120"] |