cc-repackage / Dockerfile
malteos
Deploy the wizard UI as a Docker Space (sdk: docker + HF OAuth)
a9e3534 unverified
Raw History Blame Contribute Delete
792 Bytes
# Hugging Face Space (sdk: docker) image for the FastAPI wizard UI.
# The Space only serves the UI and SUBMITS HF Jobs — the heavy repackaging runs in
# those jobs (which install duckdb / cdx_toolkit themselves), so this image stays small:
# just the web shell (FastAPI + uvicorn + huggingface_hub + authlib).
FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 \
PYTHONPATH=/app \
HF_HOME=/tmp/hf
WORKDIR /app
COPY server/requirements.txt server/requirements.txt
RUN pip install --no-cache-dir -r server/requirements.txt
COPY src/ src/
COPY server/ server/
EXPOSE 7860
# --proxy-headers so request URLs/redirects are correct behind the HF Spaces proxy.
CMD ["uvicorn", "server.main:app", "--host", "0.0.0.0", "--port", "7860", \
"--proxy-headers", "--forwarded-allow-ips", "*"]