rig-build: -j12, and a deps image that has wxInspector

Raises the bound from -j8 to -j12: the incident dump measured 1.17 GB average per cc1plus,
so 12 in flight is ~14 GB typical, well inside the 40 GB cgroup ceiling that is the real
guarantee. Keeps the file byte-identical to snaporca's copy, which the header requires.

Dockerfile.deps builds the deps with -j 12 for the same reason, and symlinks
deps/build/destdir -> deps/build/OrcaSlicer_dep: this tree installs under the latter name
while the orcacad_buildcache volume has the former baked as absolute paths in its CMakeCache.
Same tree, two names — without the link, one directory rename costs a full cold rebuild.
This commit is contained in:
Tommaso Bianchi
2026-08-22 08:49:39 +02:00
parent 8906bfa72b
commit 9764815cc3
2 changed files with 15 additions and 5 deletions
+11 -1
View File
@@ -67,4 +67,14 @@ RUN ./build_linux.sh -u
# Pinned dependencies in ./deps (OCCT 7.6 with ModelingAlgorithms enabled, OpenCV,
# OpenVDB, Boost, wxWidgets, ...). This is the long step; it is baked into the image.
RUN ./build_linux.sh -dr
# -j 12, not the default all-cores: on 2026-08-21 an unbounded deps build plus an unbounded
# app build put 42 GB of cc1plus on a 62 GB box and OOM-killed the host for 2h28m. 12 keeps
# the compile fast while leaving the machine usable. Pair with `docker build --memory`.
RUN ./build_linux.sh -dr -j 12
# Compatibility symlink. This deps tree installs into deps/build/OrcaSlicer_dep/, while the
# orcacad_buildcache volume was configured against the previous image, whose prefix was
# deps/build/destdir/. Those paths are baked as absolute strings into the app's CMakeCache, so
# without this symlink a rebuild on the new image reconfigures from scratch — hours of compile
# to change one directory name. Same tree, two names.
RUN ln -sfn /OrcaSlicer/deps/build/OrcaSlicer_dep /OrcaSlicer/deps/build/destdir
+4 -4
View File
@@ -42,13 +42,13 @@ fi
# build produced a single object. The bounds, weakest to strongest:
# flock — the lock path is shared by both forks on purpose, so they SERIALISE instead of
# summing. Peak is one build's worth no matter who else starts one.
# -j8 ~8 TUs in flight, ~10-20 GB, and the box stays usable while it compiles.
# JOBS=n overrides for a machine with more headroom.
# -j12measured 1.17 GB average per cc1plus in the incident dump, so 12 in flight
# is ~14 GB typical and leaves the box usable. JOBS=n overrides.
# --memory — the actual guarantee. A runaway build hits its own cgroup limit and dies alone;
# the host never reaches global OOM again, whatever -j or flock do.
# --memory-swap equal to --memory forbids swap, which is what made ssh hang.
JOBS="${JOBS:-8}"
MEM="${MEM:-32g}"
JOBS="${JOBS:-12}"
MEM="${MEM:-40g}"
LOCK=/tmp/orca-rig-build.lock
exec 9>"$LOCK"