| FROM python:3.10-slim # Or a specific Python version you need | |
| # Install system dependencies for ffmpeg and common OpenCV needs | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| git \ | |
| build-essential \ | |
| # Add any other system libraries found in your specific error logs | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements.txt and install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy your application code | |
| COPY . . | |
| # Define the command to run your app | |
| CMD ["python", "app_gradio.py"] # Or "streamlit run app_streamlit.py" |