CoolFace
Apppublic

shivamtech9395/maths_reasoning_env

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
Dockerfile44 linesDownload Raw Back to root
1# Math Reasoning Environment — Dockerfile2# Follows OpenEnv multi-stage build pattern3# Base: python:3.11-slim (standalone mode, no openenv-base needed)4 5FROM python:3.11-slim AS builder6 7WORKDIR /app8 9# Install uv for fast dependency management10RUN pip install uv --no-cache-dir11 12# Copy dependency files13COPY pyproject.toml .14COPY uv.lock .15 16# Install dependencies into a virtual environment17RUN uv venv /app/.venv && \18    uv sync --frozen --no-install-project --no-editable19 20# ── Final runtime stage ──21FROM python:3.11-slim22 23WORKDIR /app24 25# Copy the virtual environment from builder26COPY --from=builder /app/.venv /app/.venv27 28# Copy application code29COPY . /app30 31# Set PATH to use the virtual environment32ENV PATH="/app/.venv/bin:$PATH"33ENV PYTHONPATH="/app:$PYTHONPATH"34 35# Health check36HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \37    CMD curl -f http://localhost:7860/health || exit 138 39# Expose port (HF Spaces uses 7860)40EXPOSE 786041 42# Start server43CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]44