File size: 955 Bytes
47b2a99 76a2f92 | 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 | # Quillwright HF Space — Docker SDK.
# Runs the bespoke gr.Server (FastAPI) app in STUB mode (no GPU, no Ollama): the contest
# requires a Gradio Space underneath, and Docker SDK is sanctioned. Real models reach the
# hosted Space via Modal later (ADR-0005); this image needs neither GPU nor model weights.
FROM python:3.12-slim
# HF Spaces run as a non-root user (uid 1000) and expose port 7860.
ENV PORT=7860 \
FF_HOST=0.0.0.0 \
PYTHONUNBUFFERED=1 \
HF_HOME=/tmp/hf
WORKDIR /app
# Install deps first for layer caching.
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# App + bundled sample data (catalog + evalset) + the web frontend.
COPY quillwright/ ./quillwright/
COPY data/ ./data/
EXPOSE 7860
# gr.Server is a FastAPI app; launch via uvicorn (NOT .launch()). server.py's __main__
# binds $FF_HOST:$PORT, so `python -m quillwright.server` serves all routes.
CMD ["python", "-m", "quillwright.server"]
|