File size: 3,068 Bytes
dbaf81f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | # Build context: this environment directory. No verifier or answer is copied.
FROM debian:bookworm-slim@sha256:3783cc01769c7b2b1b83a5c5ad96c815348e28ed7da68e2e3687004faa906251 AS reference-builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg fonts-dejavu-core \
&& rm -rf /var/lib/apt/lists/*
COPY reference/reference.mov /tmp/reference.mov
RUN ffmpeg -v error -y -i /tmp/reference.mov \
-vf "scale=960:540,drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf:text='REFERENCE COPY':fontcolor=white@0.85:fontsize=56:x=(w-text_w)/2:y=(h-text_h)/2" \
-map 0:v:0 -map 0:a:0 -c:v libx264 -preset veryfast -pix_fmt yuv420p \
-c:a aac /tmp/reference.mp4
FROM debian:bookworm-slim@sha256:3783cc01769c7b2b1b83a5c5ad96c815348e28ed7da68e2e3687004faa906251
ENV DEBIAN_FRONTEND=noninteractive
ARG SHOTCUT_VERSION=26.8.1
ARG SHOTCUT_SHA256=c4befab2240964389df6139f00aae0b92949f398fd98083b922f3aabd8b7a844
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg melt tesseract-ocr python3 python3-pip curl ca-certificates xz-utils \
xvfb xfce4-session xfwm4 xfce4-panel xfce4-settings thunar mousepad xterm \
x11vnc xdotool wmctrl imagemagick webp dbus-x11 chromium \
fonts-dejavu-core fonts-liberation libgl1-mesa-dri libgl1 libglu1-mesa \
libsm6 libice6 libxrender1 libxext6 libxkbcommon-x11-0 libxcb-cursor0 \
libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 \
libxcb-xinerama0 libxcb-xinput0 libpulse0 libasound2 libnss3 \
&& pip3 install --no-cache-dir --break-system-packages \
pytest==8.4.1 pytest-json-ctrf==0.3.5 numpy==2.2.6 \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fsSL --retry 3 \
"https://github.com/mltframework/shotcut/releases/download/v${SHOTCUT_VERSION}/shotcut-linux-x86_64-${SHOTCUT_VERSION}.txz" \
-o /tmp/shotcut.txz \
&& echo "${SHOTCUT_SHA256} /tmp/shotcut.txz" | sha256sum -c - \
&& mkdir -p /opt/shotcut \
&& tar -xJf /tmp/shotcut.txz -C /opt/shotcut --strip-components=1 \
&& rm /tmp/shotcut.txz \
&& ln -s /opt/shotcut/shotcut /usr/local/bin/shotcut
ENV APP=shotcut SDL_AUDIODRIVER=dummy QSG_RHI_BACKEND=opengl \
LIBGL_ALWAYS_SOFTWARE=1 LANG=C.UTF-8
RUN mkdir -p /root/media /root/edit /root/Desktop /logs/verifier \
/root/.config/autostart
COPY media/*.MOV /root/media/
# Multi-stage copy keeps the full-quality answer render out of runtime layers.
COPY --from=reference-builder /tmp/reference.mp4 /root/Desktop/reference.mp4
COPY shotcut.desktop /root/.config/autostart/shotcut.desktop
COPY shotcut.desktop /root/Desktop/
COPY start-editor.sh preflight.py /usr/local/bin/
RUN chmod +x /usr/local/bin/start-editor.sh /root/Desktop/*.desktop \
&& ln -s /usr/local/bin/start-editor.sh /usr/local/bin/start-editor
COPY desktop-debs /opt/gui-only/desktop-debs
COPY desktop-files.py /opt/gui-only/files.py
COPY install-gui-only.py /opt/gui-only/install.py
RUN python3 /opt/gui-only/install.py
WORKDIR /root
CMD ["/usr/local/bin/start-editor"]
|