FROM python:3.11-slim # Install ffmpeg RUN apt-get update && \ apt-get install -y ffmpeg && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy requirements and install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application files COPY app.py . COPY templates/ ./templates/ # Create necessary directories RUN mkdir -p uploads outputs # Expose port EXPOSE 5000 # Set environment variables ENV FLASK_APP=app.py ENV PYTHONUNBUFFERED=1 # Run the application CMD ["python", "app.py"]