Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install curl for healthcheck | |
| RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/* | |
| # Install Python dependencies | |
| COPY server/requirements.txt /tmp/requirements.txt | |
| RUN pip install --no-cache-dir -r /tmp/requirements.txt && rm /tmp/requirements.txt | |
| # Copy environment code | |
| COPY models.py /app/models.py | |
| COPY __init__.py /app/__init__.py | |
| COPY client.py /app/client.py | |
| COPY server/ /app/server/ | |
| COPY scenarios/ /app/scenarios/ | |
| COPY tools/ /app/tools/ | |
| COPY grading/ /app/grading/ | |
| COPY openenv.yaml /app/openenv.yaml | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ | |
| CMD curl -f http://localhost:8000/health || exit 1 | |
| EXPOSE 8000 | |
| ENV ENABLE_WEB_INTERFACE=true | |
| CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8000"] | |