Repository navigation
openmontage in docker ? #841
Replies: 2 comments
|
Yes, it should be possible to run OpenMontage in Docker, but we don’t currently provide an official Docker image or Docker Compose setup. |
|
Yes. Here is a Dockerfile I tested on Linux: the image builds and the zero-key FROM python:3.12-slim-bookworm
# FFmpeg for assembly, Node 22 for Remotion and HyperFrames (HyperFrames needs >= 22),
# and the shared libraries the headless Chrome used by Remotion links against.
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg curl ca-certificates gnupg git make \
libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 \
libxdamage1 libxfixes3 libxrandr2 libgbm1 libasound2 libpango-1.0-0 libcairo2 fonts-liberation \
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt && pip install --no-cache-dir piper-tts
COPY remotion-composer/package*.json remotion-composer/
RUN cd remotion-composer && npm install
COPY . .
RUN cp -n .env.example .env
# Run as a regular user (uid 1000) so renders on a mounted folder are not owned by root.
# Remotion and webpack write caches under node_modules/.remotion and .cache, so those must be writable too.
RUN useradd -m -u 1000 montage \
&& mkdir -p remotion-composer/node_modules/.remotion remotion-composer/node_modules/.cache projects \
&& chown -R montage:montage remotion-composer/node_modules/.remotion remotion-composer/node_modules/.cache projects
USER montage
# Productions and renders are written under /app/projects; mount it to keep them.
VOLUME ["/app/projects"]
CMD ["python", "render_demo.py", "--list"]Put a Build and render a demo from the repo root: docker build -t openmontage .
mkdir -p projects
docker run --rm --env-file .env -v "$PWD/projects:/app/projects" openmontage python render_demo.py code-to-screenThe video lands in Notes:
|
Uh oh!
There was an error while loading. Please reload this page.
is it possible to install openmontage in docker ?
All reactions