| FROM python:3.12-slim | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ffmpeg \ | |
| pkg-config \ | |
| libavformat-dev \ | |
| libavcodec-dev \ | |
| libavdevice-dev \ | |
| libavutil-dev \ | |
| libavfilter-dev \ | |
| libswscale-dev \ | |
| libswresample-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Force clean pip cache | |
| RUN pip cache purge 2>/dev/null || true | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip && pip install --no-cache-dir -r requirements.txt | |
| COPY api_server.py . | |
| # Data directory for stories (mounted at runtime) | |
| RUN mkdir -p /app/data/stories | |
| EXPOSE 7860 | |
| CMD ["python", "api_server.py"] | |