# Use Python 3.12 slim as base FROM python:3.12-slim # Install system dependencies RUN apt-get update && apt-get install -y \ ffmpeg \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy requirements and install COPY backend/requirements.txt . RUN pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.txt # Copy the rest of the application COPY . . # Exposure port EXPOSE 7860 # Run the application # Use 0.0.0.0 and port 7860 (default for Hugging Face Spaces) CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860", "--root-path", ""]