Build Packages / Create release (push) Successful in 21s
Build Packages / build:rugnux-tgz (x86_64) (push) Successful in 9m40s
Build Packages / build:rugnux:aarch64 (cross) (push) Successful in 9m49s
Build Packages / build:viewer-tgz:cpu (push) Successful in 11m37s
Build Packages / build:viewer-tgz:cuda (push) Successful in 12m40s
Build Packages / build:windows:nocuda (push) Successful in 17m44s
Build Packages / build:windows:cuda (push) Successful in 20m13s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m41s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 25m59s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 15m5s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 14m35s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m53s
Build Packages / build:rugnux:windows (push) Successful in 11m29s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 18m51s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 18m43s
Build Packages / Generate python client (push) Successful in 51s
Build Packages / build:rpm (rocky8) (push) Successful in 18m51s
Build Packages / Build documentation (push) Successful in 1m21s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 18m38s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 18m24s
Build Packages / build:rpm (rocky9) (push) Successful in 19m19s
Build Packages / Unit tests (push) Successful in 1h37m15s
* Building Jungfraujoch no longer needs zlib or Eigen installed on the machine, and the dependencies the build fetches are pinned and updated to current releases. * rugnux: improvements in indexing, lattice selection and geometry post-refinement, which index crystals that previously returned no lattice and keep the better of the two geometries a run measures. * rugnux: improvements in beam-centre measurement, beam-stop detection and space-group determination. * rugnux: the unit cell reported with a determined space group now obeys that group - a cell whose symmetry was confirmed from the intensities is re-refined under it, and a cell the group cannot describe is reported with a warning rather than as it stands. * rugnux drops the stretches of a rotation sweep whose removal measurably improves the merged intensities and reports what became of every frame, and decides the resolution cut on the crystal's own diffraction rather than on its ice rings. * The rugnux results report is machine-readable - every line that is not `KEY= value` data starts with `#` - and states the build it was written by, its authorship and its terms of use (`REPORT_VERSION= 8`). * `jfjoch_viewer`: improvements in the file manager (CBF frames beside HDF5 datasets, a remembered root), the dataset plots, the inspector and the image statistics, plus a settable font size, a view of the rugnux results report, usable performance over a remote display (`ssh -X`) and a reset of all settings to defaults; the reciprocal-space window is removed. * Broker fixes around DECTRIS collections and dark-mask calibration: re-initialising after a run that never started no longer freezes the broker, a cancelled calibration is abandoned instead of reported as done, and a collection whose start message never arrives ends by itself. Reviewed-on: #79 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
110 lines
4.7 KiB
Bash
Executable File
110 lines
4.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build (and optionally push) the jungfraujoch build-environment images, in parallel.
|
|
#
|
|
# Each docker/<variant>/Dockerfile is a *self-contained build environment* (toolchain, static Qt,
|
|
# static libdbus, static OpenSSL, Eigen, DIALS, XDS, Node, ...). It does NOT copy the project in --
|
|
# the source is mounted and built at run time (see build_in_rocky9.sh).
|
|
#
|
|
# The build context is docker/ rather than docker/<variant>/, because every variant COPYs the
|
|
# shared steps in docker/common/ (see common/README.md). That context is still only the Dockerfiles
|
|
# and those scripts; the huge repo is never sent to the Docker daemon.
|
|
#
|
|
# Images are tagged gitea.psi.ch/leonarski_f/jfjoch_<variant>:<TAG> (matches the CI runner images).
|
|
#
|
|
# Concurrency (JOBS):
|
|
# JOBS controls how many image builds run at once (default 2). Each build internally runs
|
|
# `make -j$(nproc)` for Qt/dbus, so J parallel builds ~= J*nproc compile threads and several GB of
|
|
# RAM each at link time. JOBS=2 is a safe default that overlaps the (network-bound) base-image
|
|
# pull / package-install / source-download phases across builds without thrashing the CPU. Bump to
|
|
# 4 for full parallelism on a big machine (enough RAM + disk for 4 CUDA bases), or JOBS=1 for serial.
|
|
#
|
|
# Usage:
|
|
# docker/build_images.sh # all four, JOBS=2
|
|
# docker/build_images.sh rocky9 rocky8 # subset
|
|
# JOBS=4 docker/build_images.sh # all four at once
|
|
# JOBS=1 docker/build_images.sh # serial
|
|
# TAG=2610 docker/build_images.sh # override the tag (default 2609)
|
|
#
|
|
# The tag has to match what .gitea/workflows/build_and_test.yml asks the runner for, or CI pulls a
|
|
# different image than the one just built. Every job there names its image explicitly, and all four
|
|
# are on the same tag (2609). Build a single variant with, e.g.:
|
|
# TAG=2609 docker/build_images.sh ubuntu2404
|
|
#
|
|
# JOBS: static Qt needs ~15-20 GB of scratch per concurrent build on top of a 10-20 GB result, so
|
|
# four at once will exhaust a 200 GB disk. JOBS=1 is the safe choice on a box that also runs CI.
|
|
# PUSH=1 docker/build_images.sh # build (parallel) then push (serial; needs docker login)
|
|
#
|
|
# Parallel stdout would be an unreadable interleave, so each build streams to its own log file:
|
|
# docker/build-logs/<variant>-<TAG>.log (follow live with: tail -f docker/build-logs/*.log)
|
|
set -euo pipefail
|
|
|
|
REGISTRY="${REGISTRY:-gitea.psi.ch/leonarski_f}"
|
|
TAG="${TAG:-2609}"
|
|
PUSH="${PUSH:-0}"
|
|
JOBS="${JOBS:-2}"
|
|
|
|
here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
logdir="$here/build-logs"
|
|
mkdir -p "$logdir"
|
|
|
|
all=(rocky8 rocky9 ubuntu2204 ubuntu2404)
|
|
variants=("$@"); [ "${#variants[@]}" -eq 0 ] && variants=("${all[@]}")
|
|
|
|
for v in "${variants[@]}"; do
|
|
[ -f "$here/$v/Dockerfile" ] || { echo "!! no Dockerfile for variant '$v' ($here/$v/Dockerfile)"; exit 1; }
|
|
done
|
|
|
|
# One image build. Records OK/FAIL to a status file so the parent can summarise after wait; never
|
|
# returns non-zero itself, so the job-pool's `wait -n` under `set -e` stays happy.
|
|
build_one() {
|
|
local v="$1"
|
|
local img="$REGISTRY/jfjoch_$v:$TAG"
|
|
local log="$logdir/${v}-${TAG}.log"
|
|
if docker build --pull -t "$img" -f "$here/$v/Dockerfile" "$here" >"$log" 2>&1; then
|
|
echo OK > "$logdir/${v}-${TAG}.status"
|
|
else
|
|
echo FAIL > "$logdir/${v}-${TAG}.status"
|
|
fi
|
|
}
|
|
|
|
echo "==> building ${#variants[@]} image(s): ${variants[*]}"
|
|
echo "==> JOBS=$JOBS TAG=$TAG REGISTRY=$REGISTRY"
|
|
echo "==> logs in $logdir/ (follow: tail -f $logdir/*.log)"
|
|
echo
|
|
|
|
# Launch with a concurrency cap of JOBS. `wait -n` reaps exactly one finished build before the next
|
|
# is started once we are at the cap; the trailing `wait` drains the rest.
|
|
running=0
|
|
for v in "${variants[@]}"; do
|
|
if [ "$running" -ge "$JOBS" ]; then wait -n || true; running=$((running - 1)); fi
|
|
: > "$logdir/${v}-${TAG}.status" # clear any stale status from a previous run
|
|
echo "==> [$v] started -> $REGISTRY/jfjoch_$v:$TAG"
|
|
build_one "$v" &
|
|
running=$((running + 1))
|
|
done
|
|
wait
|
|
|
|
echo
|
|
echo "===================== build summary ====================="
|
|
rc=0; ok_variants=()
|
|
for v in "${variants[@]}"; do
|
|
s="$(cat "$logdir/${v}-${TAG}.status" 2>/dev/null || echo '??')"
|
|
printf " %-12s %s\n" "$v" "$s"
|
|
if [ "$s" = OK ]; then ok_variants+=("$v"); else rc=1; fi
|
|
done
|
|
[ "$rc" -eq 0 ] || echo "!! one or more builds FAILED -- see the per-variant logs above"
|
|
|
|
echo
|
|
if [ "$PUSH" = "1" ]; then
|
|
for v in "${ok_variants[@]}"; do
|
|
img="$REGISTRY/jfjoch_$v:$TAG"
|
|
echo "==> push $img"
|
|
docker push "$img"
|
|
done
|
|
else
|
|
echo "Built locally. To push the successful ones (after 'docker login gitea.psi.ch'):"
|
|
for v in "${ok_variants[@]}"; do echo " docker push $REGISTRY/jfjoch_$v:$TAG"; done
|
|
fi
|
|
|
|
exit "$rc"
|