mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-16 22:39:01 +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:
@@ -90,14 +90,14 @@ build_qat_drivers()
|
||||
KERNEL_ROOTFS_DIR=${KERNEL_MAJOR_VERSION}.${KERNEL_PATHLEVEL}.${KERNEL_SUBLEVEL}${KERNEL_EXTRAVERSION}
|
||||
cd $QAT_SRC
|
||||
KERNEL_SOURCE_ROOT=${linux_kernel_path} ./configure ${QAT_CONFIGURE_OPTIONS}
|
||||
make all -j$(nproc)
|
||||
make all -j $($(nproc ${CI:+--ignore 1}))
|
||||
}
|
||||
|
||||
add_qat_to_rootfs()
|
||||
{
|
||||
/bin/echo -e "\n\e[1;42mCopy driver modules to rootfs\e[0m"
|
||||
cd $QAT_SRC
|
||||
sudo -E make INSTALL_MOD_PATH=${ROOTFS_DIR} qat-driver-install -j$(nproc)
|
||||
sudo -E make INSTALL_MOD_PATH=${ROOTFS_DIR} qat-driver-install -j$(nproc --ignore=1)
|
||||
sudo cp $QAT_SRC/build/usdm_drv.ko ${ROOTFS_DIR}/lib/modules/${KERNEL_ROOTFS_DIR}/updates/drivers
|
||||
sudo depmod -a -b ${ROOTFS_DIR} ${KERNEL_ROOTFS_DIR}
|
||||
cd ${kata_repo_path}/tools/osbuilder/image-builder
|
||||
|
Reference in New Issue
Block a user