FROM python:3.9-slim WORKDIR /app RUN apt-get update && apt-get install -y \ libgl1 \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender-dev \ && rm -rf /var/lib/apt/lists/* # Copy requirements (we will create this file next) COPY requirements.txt . # Install Python dependencies # Using --no-cache-dir to keep image small RUN pip install --no-cache-dir -r requirements.txt # Copy source code COPY . . # Run the application CMD ["python", "main.py"]