File size: 885 Bytes
7e24fa5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 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"]