FROM python:3.11-slim # Install ffmpeg and other dependencies RUN apt-get update && apt-get install -y \ ffmpeg \ libgl1 \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender-dev \ libgomp1 \ wget \ && rm -rf /var/lib/apt/lists/* # Create app directory WORKDIR /app # Install Python dependencies RUN pip install --no-cache-dir \ ultralytics \ opencv-python-headless \ numpy # Copy the thumbnail generation script COPY generate_thumbnail.py /app/ # Make script executable RUN chmod +x /app/generate_thumbnail.py # Set the entrypoint ENTRYPOINT ["python", "/app/generate_thumbnail.py"]