[Misc] Use dracut on CentOS and skip clone if repo exists for EP kernel installation (#21635)

Signed-off-by: Ming Yang <minos.future@gmail.com>
This commit is contained in:
Ming Yang
2025-07-30 13:15:06 -07:00
committed by GitHub
parent b9b753e7a7
commit f12d9256b3
2 changed files with 49 additions and 3 deletions

View File

@@ -2,6 +2,16 @@ set -ex
# turn on IBGDA
echo 'options nvidia NVreg_EnableStreamMemOPs=1 NVreg_RegistryDwords="PeerMappingOverride=1;"' | tee -a /etc/modprobe.d/nvidia.conf
update-initramfs -u
if command -v update-initramfs &> /dev/null; then
# for Debian/Ubuntu
sudo update-initramfs -u
elif command -v dracut &> /dev/null; then
# for Fedora/CentOS
sudo dracut --force
else
echo "No supported initramfs update tool found."
exit 1
fi
echo "Please reboot the system to apply the changes"