File size: 1,034 Bytes
060d4fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
33
34
35
36
37
38
# 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"]