# 1. Base Image FROM python:3.10-slim # 2. Install System Dependencies (FFMPEG is crucial here) RUN apt-get update && \ apt-get install -y ffmpeg && \ rm -rf /var/lib/apt/lists/* # 3. Setup App WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . # 4. Permissions RUN useradd -m -u 1000 user USER user ENV PATH="/home/user/.local/bin:$PATH" # 5. Run Streamlit (Port 7860 for Hugging Face) CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false"]