Files
video-render/dockerfile
2025-10-20 17:56:36 -03:00

49 lines
1.4 KiB
Plaintext

FROM python:3.11-slim
# Create and set the working directory
WORKDIR /app
# Prevent some interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Install ffmpeg and other system dependencies. The list largely mirrors
# the original project but omits PostgreSQL development headers which are
# unused here. We include libgl1 and libglib2.0-0 so that MoviePy
# (through its dependencies) can find OpenGL and GLib when using the
# Pillow and numpy backends.
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg \
libgl1 \
libglib2.0-0 \
build-essential \
xvfb \
xdg-utils \
wget \
unzip \
ffmpeg \
libgomp1 \
libpq-dev \
vim \
libmagick++-dev \
imagemagick \
fonts-liberation \
sox \
bc \
gsfonts && \
rm -rf /var/lib/apt/lists/*
# Copy dependency specification and install Python dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Declare volumes for videos and outputs. These paths correspond to the
# mount points defined in the docker-compose file. Using VOLUME here
# documents the intended persistent storage locations.
VOLUME ["/app/videos", "/app/outputs"]
# The default command starts the consumer loop
CMD ["python", "-u", "main.py"]