# PROTEUS arena — HuggingFace Spaces (Docker SDK) image. # # Public demo posture: base dependencies ONLY (pydantic / numpy / pyyaml). The # LLM provider SDKs (openai / anthropic / google-genai) are deliberately NOT # installed and NO API keys are set, so the arena can never spend tokens for a # public visitor. Human play and the offline persona/policy memory modes work # fully; a real-model "spectate" request returns a clean 400 instead. FROM python:3.12-slim # HuggingFace Spaces runs the container as a non-root user with uid 1000. RUN useradd --create-home --uid 1000 user USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH \ PYTHONUNBUFFERED=1 WORKDIR /home/user/app # Install base deps from pyproject (no [providers] extra — see header). COPY --chown=user pyproject.toml README.md ./ COPY --chown=user proteus ./proteus RUN pip install --no-cache-dir --user . # Writable dir for trace output (ephemeral on Spaces; fine for a demo). RUN mkdir -p runs # Spaces injects the port via app_port in README.md (default 7860). Run from # the source tree so proteus/web/local/static/index.html resolves. EXPOSE 7860 CMD ["python", "-m", "proteus.web.local", "--host", "0.0.0.0", "--port", "7860"]