Files
esh-pfi-infrastructure/services/draupnir-slicer/Dockerfile
T
vh 2e08edcaab fix(draupnir-slicer): warn that every invocation writes result.json to CWD
brokkr-smithy-dev exercised the slicer on real geometry and found OrcaSlicer
writes result.json into the working directory on --info. I verified it here and
it is worse: --help does it too, which is as read-only as an invocation gets.
An empty directory gained a result.json from --help alone.

Encoded in the wrapper and the Dockerfile rather than left to be rediscovered,
and the wrapper is now committed beside the image that backs it instead of
living only in a home directory on one host.

⚠ The reason they found it and I did not is worth keeping in the header: I
verified --help and called the slicer done. Usage text proves the binary
starts, not that it ingests our geometry or that it behaves while doing so.
They ran both controls through to STL and got manifold=yes, 520 facets,
return_code 0 on each -- which is the verification I should have run before
reporting the provisioning complete.
2026-09-21 11:33:27 -07:00

34 lines
1.9 KiB
Docker

# OrcaSlicer CLI for the Draupnir sliceability check.
#
# ⚠ THIS IS A CONTAINER BECAUSE THE HOST CANNOT RUN IT, not for tidiness.
# irv-ml1 is Debian 12 (glibc 2.36). Every OrcaSlicer release ships only an
# Ubuntu 24.04 AppImage, which needs GLIBC_2.38 and GLIBCXX_3.4.32 — verified
# by ldd, not assumed. That gap is not installable on Debian 12 without moving
# the whole host to Debian 13, which is not a thing to do to a box running
# twelve GPU and audio services in order to slice a plate.
#
# Reaching back to an OrcaSlicer built for Ubuntu 22.04 would work and would
# mean pinning permanently to a stale build — the exact trap brokkr-smithy-dev
# rejected when choosing Orca over an old PrusaSlicer tag. A container keeps
# the slicer current AND leaves the host untouched.
# ⚠ RUNTIME TRAP, verified not inferred: OrcaSlicer writes result.json into the
# WORKING DIRECTORY on every invocation — including --help, which is as
# read-only as a call gets. An empty dir gained a result.json from --help alone.
# Always invoke from inside the run's own artifact directory. The orca-slice
# wrapper beside this file carries the same warning.
FROM ubuntu:24.04
ARG ORCA_VERSION=2.4.2
ARG ORCA_URL=https://github.com/OrcaSlicer/OrcaSlicer/releases/download/v2.4.2/OrcaSlicer_Linux_AppImage_Ubuntu2404_V2.4.2.AppImage
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
ca-certificates curl libwebkit2gtk-4.1-0 libglu1-mesa libmspack0 \
libsm6 libice6 libxtst6 libgtk-3-0 \
&& rm -rf /var/lib/apt/lists/*
# Extract once at build time: --appimage-extract-and-run re-extracts to /tmp on
# EVERY invocation, which is wasted seconds and wasted disk per slice.
RUN curl -sL -o /tmp/orca.AppImage "$ORCA_URL" \
&& chmod +x /tmp/orca.AppImage \
&& cd /opt && /tmp/orca.AppImage --appimage-extract >/dev/null \
&& mv squashfs-root orca && rm -f /tmp/orca.AppImage
ENV LD_LIBRARY_PATH=/opt/orca/usr/lib
ENTRYPOINT ["/opt/orca/bin/orca-slicer"]