FROM python:3.12-slim WORKDIR /app RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg fonts-dejavu-core && rm -rf /var/lib/apt/lists/* RUN pip install --no-cache-dir "beautifulsoup4>=4.12" lxml RUN pip install --no-cache-dir fastapi uvicorn requests beautifulsoup4 jinja2 yt-dlp huggingface_hub gTTS pillow edge-tts python-dateutil httpx COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt || true COPY . . EXPOSE 7860 CMD ["uvicorn", "_run:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]