afa67's picture
deploy live demo
c1bb120 verified
Raw
History Blame
1.35 kB
# Hugging Face Space (Docker SDK) — free public DRY-RUN demo of the UGC pipeline UI.
# The Space repo root holds this Dockerfile + requirements-demo.txt + README.md and
# the app dirs (pipeline/ migrations/ fixtures/).
FROM python:3.11-slim
# ffmpeg drives assembly (smart stitch + concat + loudnorm + captions).
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements-demo.txt .
RUN pip install --no-cache-dir -r requirements-demo.txt
COPY pipeline ./pipeline
COPY migrations ./migrations
COPY fixtures ./fixtures
# MEDIA_DIR = /app/media (config.py); make it world-writable for the Space runtime.
RUN mkdir -p /app/media && chmod -R 777 /app/media
# Public LIVE demo: REAL Veo generation, hard-capped at MAX_GENERATIONS_PER_DAY/day
# (owner's call — open access). Points at the real `ugc` schema. Secrets on the Space:
# DATABASE_URL, ANTHROPIC_API_KEY, GOOGLE_CLOUD_PROJECT, VEO_MODEL_ID, VERTEX_LOCATION,
# GOOGLE_CREDENTIALS_JSON (the ADC json content).
ENV DRY_RUN=false \
DB_SCHEMA=ugc \
MAX_GENERATIONS_PER_DAY=400 \
PYTHONUNBUFFERED=1
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
EXPOSE 7860
# entrypoint writes the Google ADC json from the secret (if set), migrates, then serves.
CMD ["/app/entrypoint.sh"]