Download Dockerfile from Shreya2005-2005/study-session-optimizer: direct link, hf CLI and curl.
- Browser
- Download file 666 Bytes
-
https://huggingface.co/spaces/Shreya2005-2005/study-session-optimizer/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Shreya2005-2005/study-session-optimizer/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Shreya2005-2005/study-session-optimizer/resolve/main/Dockerfile
666 Bytes
| FROM python:3.11-slim | |
| # not using 3.13 in docker because slim image had some issues with it | |
| # 3.11 is stable and the packages all work fine with it | |
| WORKDIR /app | |
| # copy requirements first so docker layer caching works | |
| # (this layer only rebuilds if requirements.txt changes) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # copy everything else | |
| COPY . . | |
| # expose the port the server runs on | |
| EXPOSE 7860 | |
| # HuggingFace Spaces uses port 7860 | |
| # PORT env var is set by HF, we fall back to 7860 if not set | |
| ENV PORT=7860 | |
| # this works, don't touch it | |
| CMD ["python", "-m", "uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"] | |