mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-16 14:28:35 +00:00
tools/snap: simplify nproc
Replaces calls of nproc with nproc with nproc ${CI:+--ignore 1} to run nproc with one less processing unit than the maximum to prevent DOS-ing the local machine. If process is being run in a container (determined via whether $CI is null), all processing units avaliable will be used. Fixes #3967 Signed-off-by: Derek Lee <derlee@redhat.com>
This commit is contained in:
@@ -74,6 +74,6 @@ RUN git clone --depth=1 "${QEMU_REPO}" qemu && \
|
||||
/root/patch_qemu.sh "${QEMU_VERSION}" "/root/kata_qemu/patches" && \
|
||||
(PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s "kata-qemu${BUILD_SUFFIX}" | xargs ./configure \
|
||||
--with-pkgversion="kata-static${BUILD_SUFFIX}") && \
|
||||
make -j"$(nproc)" && \
|
||||
make -j"$(nproc ${CI:+--ignore 1})" && \
|
||||
make install DESTDIR="${QEMU_DESTDIR}" && \
|
||||
/root/static-build/scripts/qemu-build-post.sh
|
||||
|
Reference in New Issue
Block a user