# HuggingFace Space (the "body"). Port 7860. # Build: docker build -t content-generator . # Run: docker run -p 7860:7860 --env-file .env content-generator # # PHASING NOTE: until the shared-services hoist (PLAN.md Phase 6), the running app is # variant_1's existing FastAPI backend, which is self-contained and runs from its own # directory. The harness (fitness/dispatcher) is wired into this body in Phases 3–5. FROM python:3.12-slim WORKDIR /app # System deps: fonts for meme captions + ffmpeg for video render. RUN apt-get update && apt-get install -y \ fonts-dejavu-core \ ffmpeg \ && rm -rf /var/lib/apt/lists/* # Install the root dependency superset first for layer caching. COPY requirements.txt ./requirements.txt RUN pip install --no-cache-dir -r requirements.txt # Copy the full repo (harness + variants). COPY . . ENV PORT=7860 EXPOSE 7860 # Phase 0–5: serve variant_1's self-contained backend from its own directory so its # absolute imports (`from backend_service import ...`, `import video_config`) resolve. WORKDIR /app/variants/variant_1 CMD ["sh", "-c", "uvicorn backend_service.main:app --host 0.0.0.0 --port ${PORT}"]