FROM python:3.10 # Install system-level ffmpeg and shared libs RUN apt-get update && apt-get install -y \ ffmpeg \ libavcodec-dev \ libavformat-dev \ libavutil-dev \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Upgrade torchcodec to version matching PyTorch 2.3+ RUN pip install --no-cache-dir torchcodec>=0.2.1 COPY . . CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]