Spaces:
Sleeping
Sleeping
Download Dockerfile from Siddh12334/context-corruption-env: direct link, hf CLI and curl.
- Browser
- Download file 781 Bytes
-
https://huggingface.co/spaces/Siddh12334/context-corruption-env/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Siddh12334/context-corruption-env/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Siddh12334/context-corruption-env/resolve/main/Dockerfile
781 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install deps first (cached layer — only invalidated when requirements change) | |
| COPY requirements-server.txt . | |
| RUN pip install --no-cache-dir \ | |
| torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 && \ | |
| pip install --no-cache-dir -r requirements-server.txt | |
| # Copy source (excludes venv/, training/, assets/, .git/ via .dockerignore) | |
| COPY . . | |
| # Pre-generate facts.json at build time; falls back gracefully if network is down | |
| RUN python -m data.loader || echo "facts.json generation skipped — will use fallback facts" | |
| EXPOSE 7860 | |
| # One worker so the optional trained-model adapter is loaded at most once. | |
| CMD ["uvicorn", "environment.server:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] | |