Spaces:
Running on Zero
Running on Zero
File size: 889 Bytes
9fca766 | 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 | # 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"]
|