# Python 3.10 slim image (lightweight) FROM python:3.10-slim # Working directory WORKDIR /app # Install system dependencies including FFmpeg RUN apt-get update && apt-get install -y \ ffmpeg \ wget \ curl \ && rm -rf /var/lib/apt/lists/* # Copy requirements first (better caching) COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY app.py . # Create upload directory RUN mkdir -p /tmp/uploads # Expose port EXPOSE 7860 # Environment variables ENV FLASK_APP=app.py ENV FLASK_ENV=production # Run the application CMD ["python", "app.py"]