Spaces:
Running on Zero
Running on Zero
| # HuggingFace Docker Space: SCRYPT in the browser. | |
| # Lives at the repo root because HF Spaces builds ./Dockerfile; the web layer | |
| # itself (gradio.Server frontend, PTY bridge, static CRT page) is in space/. | |
| FROM python:3.12-slim | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| WORKDIR /app | |
| COPY --chown=user pyproject.toml README.md ./ | |
| COPY --chown=user scrypt ./scrypt | |
| COPY --chown=user space ./space | |
| # The game itself + the web layer. No textual-serve: we host the terminal | |
| # ourselves through gradio.Server's FastAPI, which is the showpiece. | |
| RUN pip install --no-cache-dir --user . "gradio>=6" "uvicorn[standard]" | |
| # The Space provides SCRYPT_API_KEY as a secret; players hit Nemotron via | |
| # OpenRouter/NIM. Sandboxes are always fabricated here — never mirrored. | |
| ENV SCRYPT_BACKEND=api \ | |
| PYTHONUNBUFFERED=1 | |
| EXPOSE 7860 | |
| CMD ["python", "space/app.py"] | |