Spaces:
Sleeping
Sleeping
| # TeeUnit OpenEnv Environment for HuggingFace Spaces | |
| # This Dockerfile is for deploying the OpenEnv-compatible environment | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy environment files | |
| COPY teeunit_env/ ./teeunit_env/ | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir \ | |
| openenv-core>=0.2.1 \ | |
| fastmcp>=0.1.0 \ | |
| fastapi>=0.100.0 \ | |
| uvicorn>=0.23.0 \ | |
| pydantic>=2.0.0 \ | |
| websockets>=11.0 | |
| # Expose port 7860 (HF Spaces default) | |
| EXPOSE 7860 | |
| # Set environment variables | |
| ENV PYTHONPATH=/app | |
| ENV PYTHONUNBUFFERED=1 | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ | |
| CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/health')" || exit 1 | |
| # Run the server on port 7860 (HF Spaces requirement) | |
| CMD ["uvicorn", "teeunit_env.server.app:app", "--host", "0.0.0.0", "--port", "7860"] | |