- INSTALL CUDA 9 ON UBUNTU 18.04 HOW TO
- INSTALL CUDA 9 ON UBUNTU 18.04 INSTALL
- INSTALL CUDA 9 ON UBUNTU 18.04 DRIVER
- INSTALL CUDA 9 ON UBUNTU 18.04 DOWNLOAD
INSTALL CUDA 9 ON UBUNTU 18.04 DOWNLOAD
Download the latest ones from Verify CUDA installation
INSTALL CUDA 9 ON UBUNTU 18.04 INSTALL
*: Don't install the display drivers with this script. You might also be interested in How can I install CuDNN on Ubuntu 16.04?.
I strongly suggest not to use it, as it changes the paths and makes the installation of other tools more difficult. Notes: Yes, there is the possibility to install it via apt-get install cuda.
See also: NVIDIA CUDA with Ubuntu 16.04 beta on a laptop (if you just cannot wait)
INSTALL CUDA 9 ON UBUNTU 18.04 DRIVER
INSTALL CUDA 9 ON UBUNTU 18.04 HOW TO
If the above doesn't work, ask StackOverflow how to install an NVIDIA driver using a local run file. Installing the driver is usually the hardest part.
From here, check that the device files /dev/nvidia* exist and have the correct (0666) file permissions. If you get a bunch of display error messages, or can't see anything, drop to a virtual console by hitting Ctrl + Alt + F1. Some systems act up at this point, so make sure everything is displayed correctly once you log in to your machine again.
I would recommend rebooting your systems at this point. $ sudo apt install nvidia-384 nvidia-384-dev Make sure to get the development version, too: $ sudo add-apt-repository ppa:graphics-drivers/ppa Then you're finally ready to install the NVIDIA driver. Create a file at /etc/modprobe.d/nf with the following contents: The following is straight from the CUDA docs. The Nouveau drivers are loaded if the following command prints anything: $ sudo apt install g++ freeglut3-dev build-essential libx11-dev libxmu-dev \īefore installing the NVIDIA driver, you should make sure to disable the Nouveau drivers that come pre-installed with Ubuntu. Step 2: Install the required pre-installation packagesĪccording to the NVIDIA documentation, this step is no longer strictly required, but it is good to have the following packages anyway: Īpart from that, you will want to make sure you have GCC installed. This command should return one GPU per line, in my case: 02:00.0 VGA compatible controller: NVIDIA Corporation GM200. You can verify the GPU is being detected with the following command: Most importantly, you should verify that your system has a CUDA-capable GPU. The NVIDIA Developer Zone has a detailed guide on pre-installation actions. Below is a working recipe for installing the CUDA 9 Toolkit and CuDNN 7 (the versions currently supported by TensorFlow) on Ubuntu 18.04. Installing CUDA has gotten a lot easier over the years thanks to the CUDA Installation Guide, but there are still a few potential pitfalls to be avoided.