Spaces:
Sleeping
Sleeping
Download email_triage_rl_hackathon/Dockerfile from Shivacode/rl-hackathon: direct link, hf CLI and curl.
- Browser
- Download file 2.56 kB
-
https://huggingface.co/spaces/Shivacode/rl-hackathon/resolve/main/email_triage_rl_hackathon/Dockerfile
- Command line
-
hf download hf://spaces/Shivacode/rl-hackathon/email_triage_rl_hackathon/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Shivacode/rl-hackathon/resolve/main/email_triage_rl_hackathon/Dockerfile
2.56 kB
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # Official Meta Γ PyTorch OpenEnv base image | |
| # β’ Python 3.11.15 pre-installed | |
| # β’ FastAPI + uvicorn pre-installed | |
| # β’ WORKDIR /app, PYTHONUNBUFFERED=1, UV_SYSTEM_PYTHON=1 set | |
| # β’ Uses uv as the fast package manager | |
| # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| FROM ghcr.io/meta-pytorch/openenv-base:latest | |
| # ββ System dependencies (curl for HEALTHCHECK) ββββββββββββββββ | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # ββ Python path: include both /app and /app/src βββββββββββββββ | |
| # Base image sets PYTHONPATH=/app/src; we extend it so the | |
| # top-level package (email_triage_rl_hackathon/) is importable | |
| # whether running from /app or /app/src. | |
| ENV PYTHONPATH=/app:/app/src | |
| # ββ Enable the built-in OpenEnv web inspector UI ββββββββββββββ | |
| # Set to "false" to disable the Swagger/ReDoc interface. | |
| ENV ENABLE_WEB_INTERFACE=true | |
| # ββ Runtime config ββββββββββββββββββββββββββββββββββββββββββββ | |
| ENV TASK_LEVEL=easy | |
| ENV PORT=7860 | |
| # ββ Install only what the base image does NOT already provide β | |
| # openenv-core is not pre-installed in the base image. | |
| # fastapi + uvicorn are already present β uv skips them. | |
| COPY server/requirements.txt ./requirements.txt | |
| RUN uv pip install --no-cache -r requirements.txt | |
| # ββ Copy source code and install the package ββββββββββββββββββ | |
| COPY . . | |
| RUN uv pip install --no-cache -e . | |
| # ββ Runtime output directories ββββββββββββββββββββββββββββββββ | |
| RUN mkdir -p outputs/logs outputs/evals | |
| EXPOSE 7860 | |
| # ββ Health check ββββββββββββββββββββββββββββββββββββββββββββββ | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \ | |
| CMD curl -f http://localhost:${PORT}/health || exit 1 | |
| CMD ["sh", "-c", "uvicorn email_triage_rl_hackathon.server.app:app --host 0.0.0.0 --port ${PORT}"] | |