Editing
Tutorials:Install nVidia CUDA and GPU drivers
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Guide == If you have a freshly installed Ubuntu 18.04 or some derivative (such as Linux Mint 19), this should be simply a matter of running the following script (run with sudo): <syntaxhighlight lang="bash"> #!/bin/bash wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.168-1_amd64.deb dpkg -i cuda-repo-ubuntu1804_10.1.168-1_amd64.deb apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub apt-get update apt-get install -y cuda </syntaxhighlight> In case you had the driver or an earlier release of CUDA already installed, my recommendation is to first uninstall them. If you cannot get the script to run or have a different linux version, head over to [https://developer.nvidia.com/cuda-downloads the nVidia CUDA download page] and install CUDA 10.1 by following their instructions. I strongy recommend the networked ".deb" package installation. Make sure to explain any problems you encounter on the discussion page so that we can troubleshoot this guide. Post installation, you should reboot your system to make sure it still works. Run the following commands in a shell to test installation, which should produce a similar output than what is shown: <syntaxhighlight lang="bash"> # show version of the nVidia driver > glxinfo | grep NVIDIA TODO: copy reference output # show version of the CUDA compiler toolchain > /usr/local/cuda/nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Wed_Apr_24_19:10:27_PDT_2019 Cuda compilation tools, release 10.1, V10.1.168 # show detected GPUs > nvidia-smi Sat May 18 12:51:46 2019 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 418.39 Driver Version: 418.39 CUDA Version: 10.1 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Quadro GV100 On | 00000000:03:00.0 On | Off | | 35% 48C P0 27W / 250W | 1490MiB / 32475MiB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 1354 G /usr/lib/xorg/Xorg 800MiB | | 0 1762 G cinnamon 331MiB | | 0 10767 G /usr/lib/firefox/firefox 6MiB | | <... more processes> | |=============================================================================| </syntaxhighlight> You should also add the path for the binaries and libraries to your environment so that all tools are able to find them. For example, add the following two lines to your ".bashrc" in your home folder: <syntaxhighlight lang="bash"> export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH </syntaxhighlight> [[Category:Tutorials]]
Summary:
Please note that all contributions to Collective Computational Unit may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
CCU:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Collective Computational Unit
Main page
Projects
Tutorials
GPU Cluster
Core Facilitys
Mediawiki
Recent changes
Random page
Help
Tools
What links here
Related changes
Page information