anthonym21's picture
Initial Commit with GRPO notebook
935a6ef
# This Dockerfile follows the OpenEnv recommended pattern:
# - Build with uv (fast, reproducible)
# - Run FastAPI server exposing the OpenEnv-compatible endpoints + web UI
ARG BASE_IMAGE=openenv-base:latest
FROM ${BASE_IMAGE} AS builder
WORKDIR /app
ARG BUILD_MODE=in-repo
ARG ENV_NAME=slipstream_governance_env
# Copy repository into container
COPY . /app/env
WORKDIR /app/env
# Install python deps into a virtualenv managed by uv
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=cache,target=/root/.cache/pip \
uv sync --no-dev
FROM ${BASE_IMAGE} AS runtime
ARG ENV_NAME=slipstream_governance_env
WORKDIR /app/env
COPY --from=builder /app/env /app/env
COPY --from=builder /app/env/.venv /app/env/.venv
ENV PATH="/app/env/.venv/bin:$PATH"
ENV PYTHONPATH="/app/env:$PYTHONPATH"
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=30s --start-period=30s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
CMD ["sh", "-c", "cd /app/env && uvicorn server.app:app --host 0.0.0.0 --port 8000"]