Shivacode's picture
Email triage RL
753b5ee
Raw History Blame Contribute Delete
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}"]