1

I have an NVIDIA driver installed, verified by the output of cat /proc/driver/nvidia/version:

NVRM version: NVIDIA UNIX x86_64 Kernel Module 390.30 Wed Jan 31 22:08:49 PST 2018 GCC version: gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)

However, running nvidia-smi gives the following error: bash: nvidia-smi: command not found...

More info: I am running CentOS 7, and trying to a) get nvidia-smi working and b) then install CUDA.

2
  • I suspect that nvidia-smi is missing from your $PATH even is it has been successfully installed. What is the result of (as root or sudo): find /usr -iname nvidia-smi ? – andrew.46 May 19 '18 at 9:31
  • As you have installed and u won't see the nvidia-smi because its jus ignorning the PATH, try reinstall the driver and reboot ur machine. Thats it!! – karthik Aug 22 '18 at 10:28
0

I run an HPC cluster at work and we have the cuda-driver RPM installed. It provides nvidia-smi, but its in the $INSTALL_ROOT/libs/440.64.00/bin directory. $INSTALL_ROOT might vary from system to system, so you'll have to find that first.

After I remembered we'd used an RPM named cuda-driver and not one with nvidia in the name, I found the nvidia-smi tool like this:

rpm -qa | grep -i cuda | xargs rpm -ql | grep -i nvidia-smi

Which gave me three pathnames (you can see my INSTALL_ROOT here)

/cm/local/apps/cuda-driver/libs/440.64.00/bin/nvidia-smi /cm/local/apps/cuda-driver/libs/440.64.00/share/doc/NVIDIA_GLX-1.0/html/nvidia-smi.html /cm/local/apps/cuda-driver/libs/440.64.00/share/man/man1/nvidia-smi.1.gz

And then I used rpm -qf on one of those to get the name of the RPM.

Hope that helps!

0

Asked 3 years, 1 month ago

you stated I have an NVIDIA driver installed however you did not describe how you installed it. Be aware the nvidia driver is a kernel module and it is often lost after doing a yum update when a kernel update happens; the nvidia kernel module is not preserved (unless you have DKMS installed) so nvidia functionality will then cease.

However that does not explain why /usr/bin/nvidia-smi says command not found which is another matter, but that is where nvidia-smi should be and /usr/bin should obviously be in your PATH. Simply reinstalling nvidia via the nvidia.run file will fix that...

Below is my preferred method for doing NVIDIA install (and cuda) under RHEL/CentOS 7.x which has served me well (for about the last 3 years)

  • download NVIDIA-Linux-x86_64-460.67.run from nvidia {get the correct one for your graphics card} approx 150mb
  • download cuda_11.2.2_460.32.03_linux.run from nvidia {whatever the latest version is, over 2gb}
  • su to root; copy both to /root; chmod 700 on both;
  • systemctl set-default multi-user.target
  • reboot or systemctl isolate multi-user.target or init 3
  • run /root/NVIDIA-Linux-x86_64-460.67.run {and observe the building kernel module part}
  • after successful install, /usr/bin/nvidia-smi should be present and work;
  • then do a systemctl isolate graphical.target or init 5 and if a graphical console works then log in, and set back to systemctl set-default graphical.target if you prefer.
  • ideally do one last reboot to validate everything is working

The CUDA install is basically the same process.

The bundled nvidia graphics driver within the cuda.run file is not always the latest.

The latest nvidia.run driver will (should) always work with whatever cuda version.

You are not required to install the bundled nvidia graphics driver within the cuda.run file, so my preference is to uncheck that when installing cuda.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.