CUDA Deployment
- Use PuTTY to log in to the server as the root user.
- Check whether the nouveau driver is disabled.
- Disable the nouveau driver.
- Create a /etc/modprobe.d/disable-nouveau.conf file.
vim /etc/modprobe.d/disable-nouveau.conf
- Add the following two lines:
blacklist nouveau options nouveau modeset=0
- Create a /etc/modprobe.d/disable-nouveau.conf file.
- Back up the initramfs file and generate a new one.
cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img dracut -f /boot/initramfs-$(uname -r).img $(uname -r)
- Reboot the server.
reboot
- Check that the nouveau driver is disabled.
lsmod |grep nouveau
If the command output is empty, the driver is disabled.
- Install NVIDIA CUDA.
wget https://developer.download.nvidia.com/compute/cuda/11.4.0/local_installers/cuda_11.4.0_470.42.01_linux_sbsa.run sudo sh cuda_11.4.0_470.42.01_linux_sbsa.run
- Configure environment variables.
export CUDA_HOME=/usr/local/cuda export PATH=$CUDA_HOME/bin:$PATH export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
- Check whether the installation is successful.
nvcc -v
If the version information is displayed, the installation is successful.
Parent topic: Software Stack Deployment