limit Docker build parallelism to min(nproc, 16)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 08:20:27 +02:00
parent 5fc50bcefc
commit 18de7dd3db
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ RUN rm -f /tmp/geant4-src/.git && \
-DGEANT4_BUILD_TLS_MODEL=global-dynamic \
-DGEANT4_USE_RAYTRACER_X11=ON \
>/dev/null && \
cmake --build /tmp/geant4-build --parallel $(nproc) >/dev/null && \
cmake --build /tmp/geant4-build --parallel $(( $(nproc) < 16 ? $(nproc) : 16 )) >/dev/null && \
cmake --install /tmp/geant4-build >/dev/null && \
rm -rf /tmp/geant4-src /tmp/geant4-build
@@ -98,7 +98,7 @@ ADD minicalosim /root/minicalosim
RUN cd /root/minicalosim && git checkout $COMMIT && \
git submodule update --init lib/pybind11 && \
mkdir -p build && cd build && rm -rf * && cmake ../ && make -j4
mkdir -p build && cd build && rm -rf * && cmake ../ && make -j$(( $(nproc) < 16 ? $(nproc) : 16 ))
RUN echo "commit = '${COMMIT}'" > /root/minicalosim/bind/minicalo_version.py
+2 -2
View File
@@ -66,7 +66,7 @@ RUN rm -f /tmp/geant4-src/.git && \
-DGEANT4_BUILD_TLS_MODEL=global-dynamic \
-DGEANT4_USE_RAYTRACER_X11=ON \
>/dev/null && \
cmake --build /tmp/geant4-build --parallel $(nproc) >/dev/null && \
cmake --build /tmp/geant4-build --parallel $(( $(nproc) < 16 ? $(nproc) : 16 )) >/dev/null && \
cmake --install /tmp/geant4-build >/dev/null && \
rm -rf /tmp/geant4-src /tmp/geant4-build
@@ -98,7 +98,7 @@ ADD minicalosim /root/minicalosim
RUN cd /root/minicalosim && git checkout $COMMIT && \
git submodule update --init lib/pybind11 && \
mkdir -p build && cd build && rm -rf * && cmake ../ && make -j$(nproc) &&\
mkdir -p build && cd build && rm -rf * && cmake ../ && make -j$(( $(nproc) < 16 ? $(nproc) : 16 )) &&\
echo "commit = '${COMMIT}'" > ../bind/minicalo_version.py && \
cp minicalo* ../bind/G4Calo.py ../bind/minicalo_version.py /usr/local/lib/python3.8/dist-packages/
+2 -2
View File
@@ -29,7 +29,7 @@ RUN rm -f /tmp/geant4-src/.git && \
-DGEANT4_BUILD_MULTITHREADED=OFF \
-DGEANT4_BUILD_TLS_MODEL=global-dynamic \
> /dev/null && \
cmake --build /tmp/geant4-build --parallel $(nproc) > /dev/null && \
cmake --build /tmp/geant4-build --parallel $(( $(nproc) < 16 ? $(nproc) : 16 )) > /dev/null && \
cmake --install /tmp/geant4-build > /dev/null && \
rm -rf /tmp/geant4-src /tmp/geant4-build
@@ -49,7 +49,7 @@ RUN cd /root/minicalosim && git checkout $COMMIT && \
-S . -B build \
-DWITH_GEANT4_UIVIS=OFF \
> /dev/null && \
cmake --build build --parallel $(nproc) && \
cmake --build build --parallel $(( $(nproc) < 16 ? $(nproc) : 16 )) && \
cp build/minicalo*.so /usr/local/lib/python3.10/dist-packages/
RUN echo "commit = '${COMMIT}'" > /root/minicalosim/bind/minicalo_version.py && \