#/bin/bash ## Note that this package will reboot half way. Hence the procedure after the reboot has to be carried out manually. #1-Stage (before rebooting) #========================= cd /share/apps/configrepo/ wget http://anicca.usm.my/configrepo/howto/customise_centos/nvidia_cuda/inst_cuda_10.1.243_418.87.00_linux.run.txt chmod +x inst_cuda_10.1.243_418.87.00_linux.run.txt wget http://anicca.usm.my/configrepo/howto/customise_centos/nvidia_cuda/inst_cuda_9.2.148_396.37_linux.run chmod +x inst_cuda_9.2.148_396.37_linux.run #Check that the nvidia gpu is seen by the system update-pciids lspci | grep -i nvidia ## Check if see if nouveau is on. lsmod | grep nouveau ## if something is printed that means nouveau is on. We need to disable it. # Disable Nouveau by creating a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents: rm -rf /etc/modprobe.d/blacklist-nouveau.conf echo blacklist nouveau > /etc/modprobe.d/blacklist-nouveau.conf echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nouveau.conf # Regenerate the kernel initramfs: sudo dracut --force reboot now #2-Stage (after rebooting) - to be done manually after reboot #============================================================ ## After rebooting, log in as root. init 3 #Install cuda_10.1.243_418.87.00_linux.run (CUDA driver for CentOS 7, version 10.1) in /usr/local of a node. #Manual installation /share/apps/configrepo/inst_cuda_10.1.243_418.87.00_linux.run.txt #Install cuda_9.2.148_396.37_linux.run (CUDA driver for CentOS 7, version 9.2) immediately after the installation of CUDA 10.1 while the terminal is still init 3. #Install only the CUDA driver but not the video driver by following the instruction from /share/apps/configrepo/inst_cuda_9.2.148_396.37_linux.run # Set the CUDA default to CUDA-10 instead of CUDA-9.2