# Base image FROM python:3.12-slim # Prevent prompts ENV DEBIAN_FRONTEND=noninteractive # Set workdir WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ffmpeg \ git \ build-essential \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Copy everything COPY . . # Install Python dependencies RUN pip install --no-cache-dir \ torch \ torchaudio \ requests \ transformers \ fastapi \ uvicorn[standard] \ python-multipart \ starlette\ torchcodec # Expose port EXPOSE 7860 # Start API server CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]