| # Use Python 3.10 Slim as Base Image | |
| FROM python:3.10-slim-buster | |
| # Set the working directory | |
| WORKDIR /app | |
| # Install system dependencies required for moviepy & opencv | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements file and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the application code | |
| COPY . . | |
| # Run the application | |
| CMD ["python", "app.py"] | |