diff --git a/docker/build_images.sh b/docker/build_images.sh index 20b8d84f9..d823bb75e 100755 --- a/docker/build_images.sh +++ b/docker/build_images.sh @@ -23,12 +23,15 @@ # 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=2607b docker/build_images.sh # override the tag (default 2607b) +# 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 now names its image explicitly: -# the rockys on 2607b, the ubuntus on 2608b. Build a single variant with, e.g.: -# TAG=2608b docker/build_images.sh ubuntu2404 +# 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: @@ -36,7 +39,7 @@ set -euo pipefail REGISTRY="${REGISTRY:-gitea.psi.ch/leonarski_f}" -TAG="${TAG:-2607b}" +TAG="${TAG:-2609}" PUSH="${PUSH:-0}" JOBS="${JOBS:-2}" diff --git a/docker/common/install-ninja.sh b/docker/common/install-ninja.sh new file mode 100755 index 000000000..2582ce376 --- /dev/null +++ b/docker/common/install-ninja.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +# Ninja, pinned, from the upstream release binary. +# +# Shared by all four build images (docker/*/Dockerfile). The build context is docker/, so each +# Dockerfile reaches this with COPY common/. Version inputs come from that Dockerfile's ARGs. +# +# Pinned for the same reason as CMake: the distro versions span 1.8.2 (EL8) to 1.11.1 (Noble), and +# 1.8.2 is too old to parse what recent Qt generates -- it fails with "multiple outputs aren't +# supported by depslog", which is a ninja limitation lifted in 1.10, not anything wrong with Qt. +# +# The zip is unpacked with python3 rather than unzip: python3 is in every image already and unzip +# is not, so this needs no extra package. +set -eux + +: "${NINJA_VERSION:?set NINJA_VERSION}" +: "${NINJA_SHA256:?set NINJA_SHA256}" + +cd /tmp +curl -fLO "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-linux.zip" +echo "${NINJA_SHA256} ninja-linux.zip" | sha256sum -c - +mkdir -p "/opt/ninja-${NINJA_VERSION}/bin" +python3 -m zipfile -e ninja-linux.zip "/opt/ninja-${NINJA_VERSION}/bin" +chmod +x "/opt/ninja-${NINJA_VERSION}/bin/ninja" +rm -f ninja-linux.zip + +test "$("/opt/ninja-${NINJA_VERSION}/bin/ninja" --version)" = "${NINJA_VERSION}" diff --git a/docker/rocky8/Dockerfile b/docker/rocky8/Dockerfile index 4099b709a..d349de053 100644 --- a/docker/rocky8/Dockerfile +++ b/docker/rocky8/Dockerfile @@ -2,7 +2,7 @@ FROM nvidia/cuda:12.9.1-devel-rockylinux8 LABEL authors="leonarski_f" ARG OPENSSL_VERSION=3.5.4 -ARG QT_VERSION=6.9.1 +ARG QT_VERSION=6.11.1 ARG DBUS_VERSION=1.14.10 ARG NODE_MAJOR=22 ARG EIGEN_VERSION=3.4.0 @@ -31,7 +31,6 @@ RUN dnf -y install epel-release && \ rpmdevtools \ numactl-devel \ redhat-rpm-config \ - ninja-build \ libxcb-devel \ xcb-util-*-devel \ xcb-util-devel \ @@ -72,10 +71,13 @@ RUN dnf -y install epel-release && \ # docker/ (see build_images.sh), which is what puts common/ in reach of this COPY. ARG CMAKE_VERSION=3.31.8 ARG CMAKE_SHA256=630615d8e98ac33eba7fbe472626dff5c899c85af3c024585ae109166a6909d0 +ARG NINJA_VERSION=1.13.2 +ARG NINJA_SHA256=5749cbc4e668273514150a80e387a957f933c6ed3f5f11e03fb30955e2bbead6 COPY common/ /opt/jfjoch-common/ RUN /opt/jfjoch-common/install-cmake.sh -# Ahead of the distro path: the pinned CMake is the one every later step and every CI build uses. -ENV PATH=/opt/cmake-${CMAKE_VERSION}/bin:${PATH} +RUN /opt/jfjoch-common/install-ninja.sh +# Ahead of the distro path: these are the CMake and Ninja every later step and every CI build uses. +ENV PATH=/opt/cmake-${CMAKE_VERSION}/bin:/opt/ninja-${NINJA_VERSION}/bin:${PATH} RUN /opt/jfjoch-common/build-openssl.sh diff --git a/docker/rocky9/Dockerfile b/docker/rocky9/Dockerfile index cf9a3202e..c46ef8613 100644 --- a/docker/rocky9/Dockerfile +++ b/docker/rocky9/Dockerfile @@ -2,7 +2,7 @@ FROM nvidia/cuda:13.3.0-devel-rockylinux9 LABEL authors="leonarski_f" ARG OPENSSL_VERSION=3.5.4 -ARG QT_VERSION=6.9.1 +ARG QT_VERSION=6.11.1 ARG DBUS_VERSION=1.14.10 ARG NODE_MAJOR=22 ARG EIGEN_VERSION=3.4.0 @@ -36,12 +36,12 @@ RUN dnf -y update && \ rpmdevtools \ numactl-devel \ redhat-rpm-config \ - ninja-build \ python3 \ python3.12 \ perl \ nasm \ pkgconf-pkg-config \ + xcb-util-devel \ xcb-util-*-devel \ libxcb-devel \ libxkbcommon-devel \ @@ -75,10 +75,13 @@ RUN dnf -y update && \ # docker/ (see build_images.sh), which is what puts common/ in reach of this COPY. ARG CMAKE_VERSION=3.31.8 ARG CMAKE_SHA256=630615d8e98ac33eba7fbe472626dff5c899c85af3c024585ae109166a6909d0 +ARG NINJA_VERSION=1.13.2 +ARG NINJA_SHA256=5749cbc4e668273514150a80e387a957f933c6ed3f5f11e03fb30955e2bbead6 COPY common/ /opt/jfjoch-common/ RUN /opt/jfjoch-common/install-cmake.sh -# Ahead of the distro path: the pinned CMake is the one every later step and every CI build uses. -ENV PATH=/opt/cmake-${CMAKE_VERSION}/bin:${PATH} +RUN /opt/jfjoch-common/install-ninja.sh +# Ahead of the distro path: these are the CMake and Ninja every later step and every CI build uses. +ENV PATH=/opt/cmake-${CMAKE_VERSION}/bin:/opt/ninja-${NINJA_VERSION}/bin:${PATH} RUN /opt/jfjoch-common/build-openssl.sh diff --git a/docker/ubuntu2204/Dockerfile b/docker/ubuntu2204/Dockerfile index 24044cd7d..f2216d01e 100644 --- a/docker/ubuntu2204/Dockerfile +++ b/docker/ubuntu2204/Dockerfile @@ -5,7 +5,7 @@ LABEL authors="leonarski_f" ENV DEBIAN_FRONTEND=noninteractive ARG OPENSSL_VERSION=3.5.4 -ARG QT_VERSION=6.9.1 +ARG QT_VERSION=6.11.1 ARG DBUS_VERSION=1.14.10 ARG NODE_MAJOR=22 ARG EIGEN_VERSION=3.4.0 @@ -28,7 +28,6 @@ RUN set -eux; \ tar \ xz-utils \ build-essential \ - ninja-build \ python3 \ python3-venv \ python3-requests \ @@ -100,10 +99,13 @@ ENV CXX=/usr/bin/g++-12 # docker/ (see build_images.sh), which is what puts common/ in reach of this COPY. ARG CMAKE_VERSION=3.31.8 ARG CMAKE_SHA256=630615d8e98ac33eba7fbe472626dff5c899c85af3c024585ae109166a6909d0 +ARG NINJA_VERSION=1.13.2 +ARG NINJA_SHA256=5749cbc4e668273514150a80e387a957f933c6ed3f5f11e03fb30955e2bbead6 COPY common/ /opt/jfjoch-common/ RUN /opt/jfjoch-common/install-cmake.sh -# Ahead of the distro path: the pinned CMake is the one every later step and every CI build uses. -ENV PATH=/opt/cmake-${CMAKE_VERSION}/bin:${PATH} +RUN /opt/jfjoch-common/install-ninja.sh +# Ahead of the distro path: these are the CMake and Ninja every later step and every CI build uses. +ENV PATH=/opt/cmake-${CMAKE_VERSION}/bin:/opt/ninja-${NINJA_VERSION}/bin:${PATH} RUN /opt/jfjoch-common/build-openssl.sh diff --git a/docker/ubuntu2404/Dockerfile b/docker/ubuntu2404/Dockerfile index 0b4f0ce00..65c8051a8 100644 --- a/docker/ubuntu2404/Dockerfile +++ b/docker/ubuntu2404/Dockerfile @@ -5,7 +5,7 @@ LABEL authors="leonarski_f" ENV DEBIAN_FRONTEND=noninteractive ARG OPENSSL_VERSION=3.5.4 -ARG QT_VERSION=6.9.1 +ARG QT_VERSION=6.11.1 ARG DBUS_VERSION=1.14.10 ARG NODE_MAJOR=22 ARG EIGEN_VERSION=3.4.0 @@ -39,7 +39,6 @@ RUN set -eux; \ tar \ xz-utils \ build-essential \ - ninja-build \ python3 \ python3-venv \ python3-requests \ @@ -109,10 +108,13 @@ ENV CXX=/usr/bin/g++ # docker/ (see build_images.sh), which is what puts common/ in reach of this COPY. ARG CMAKE_VERSION=3.31.8 ARG CMAKE_SHA256=630615d8e98ac33eba7fbe472626dff5c899c85af3c024585ae109166a6909d0 +ARG NINJA_VERSION=1.13.2 +ARG NINJA_SHA256=5749cbc4e668273514150a80e387a957f933c6ed3f5f11e03fb30955e2bbead6 COPY common/ /opt/jfjoch-common/ RUN /opt/jfjoch-common/install-cmake.sh -# Ahead of the distro path: the pinned CMake is the one every later step and every CI build uses. -ENV PATH=/opt/cmake-${CMAKE_VERSION}/bin:${PATH} +RUN /opt/jfjoch-common/install-ninja.sh +# Ahead of the distro path: these are the CMake and Ninja every later step and every CI build uses. +ENV PATH=/opt/cmake-${CMAKE_VERSION}/bin:/opt/ninja-${NINJA_VERSION}/bin:${PATH} RUN /opt/jfjoch-common/build-openssl.sh