Posted on

Disable Nouveau

Create a file named /etc/modprobe.d/blacklist.conf and add the following line to it:

blacklist nouveau

Then run the following commands

$ mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak   
$ dracut -v /boot/initramfs-$(uname -r).img $(uname -r)
$ sudo reboot

After reboot, you can try to ping the server until you get a reply from the server, then ssh login it again to install the driver.

Installation

NOTE: if you find that the following commands fail, you may have to configure the DNS server.

Firstly, install the dependencies.

$ sudo yum install -y tar bzip2 make automake gcc gcc-c++ pciutils elfutils-libelf-devel libglvnd-devel iptables firewalld vim bind-utils wget yum-utils
$ sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ distribution=rhel7
$ ARCH=$( /bin/arch )
$ sudo yum-config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/$distribution/${ARCH}/cuda-$distribution.repo
$ sudo yum install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r)

Then download the offline installer, following is an example, you may find the latest driver from here.

$ wget https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux.run
$ sudo sh cuda_11.2.2_460.32.03_linux.run

Now you can verify you installation.

$ nvidia-smi

References

  1. https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes/index.html#centos7
  2. https://wiki.cdot.senecacollege.ca/wiki/CentOS7_Disable_Nouveau

Leave a Reply

Your email address will not be published. Required fields are marked *