# Build from openenv-base — required by OpenEnv spec # openenv-base includes: Python 3.11, uvicorn, fastapi, openenv-core FROM ghcr.io/meta-pytorch/openenv-base:latest WORKDIR /app # Install Python dependencies COPY pyproject.toml . RUN pip install --no-cache-dir -e ".[all]" # Copy environment package COPY cace_env/ ./cace_env/ # Copy data (Oversight Board cases + pipeline cache) COPY data/ ./data/ # HuggingFace Spaces uses port 7860 EXPOSE 7860 # Environment config ENV DATASET_PATH=data/all_cases.json ENV MODE=v1 ENV PYTHONUNBUFFERED=1 ENV PYTHONPATH=/app # Healthcheck for openenv validate HEALTHCHECK --interval=30s --timeout=10s --start-period=90s --retries=3 \ CMD curl -f http://localhost:7860/health || exit 1 # Start server using the FastAPI app from server.py CMD ["uvicorn", "cace_env.server:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]