Is there any tutorial to install CUDA on Ubuntu 18.04?
The instructions on the Nvidia website for 17.04 and 16.04 do not work for 18.04.
I get a message telling me to reboot then re-run the installer. However when I do this I get that same message again.
In a terminal, type:
reboot
I have a gtx970 graphics card and a fresh install of Ubuntu 18.04
This worked for me
I have installed CUDA 9.1 on Ubuntu 18.04, and runs very well.
I modify THE default gcc and g++, and use
.run
files instead of.deb
files.Install gcc-6, g++-6 (CUDA requires gcc-6 !)
In
/usr/bin
runInstall CUDA using
.run
files. Installing the latest driver (if required, download NVIDIA-Linux-xxxxxxx.run from Nvidia) would be better.That's all.
I've tried to install using
.deb
files, but it causes package conflicts so I've switched to using this way.Enjoy it!!
Enable multiverse repository, install nvidia drivers and nvidia-cuda-toolkit and gcc6 (preferably using update-alternatives to easily switch versions):
Alternatively you can follow Taylor's instructions:
sudo chmod +x
The second method has the downside that it's not as easy to upgrade or remove.
I doubt the answers above qualify, because they seem to leave the system without the whole NVidia driver subsystem. I can guess why Cuda does not pull in the drivers, although I would probably prefer to have it otherwise. I am also not sure which is the proper way to get the latest driver, but right now this seems to do it:
The CUDA toolkit finally released the 18.04 ubuntu support
This is what I did. There might be added extra stuff that I could have probably not had to do, but I am going to include it anyways.
First get the ppa repository drivers. (I would say this is required before installing, unless you want to risk some login loop of death).
Then install the latest driver. I use the GUI updater for the most part called Software & Updates, in the Additional Drivers tab. As of today nvidia driver 396 is available.
Get g++-6 and gcc-6. (Required)
You can try using nvidia-cuda-toolkit, but the paths to the libraries wasn't familiar to me. I didn't want to mess with it.
(I would probably skip this one, but go to it if other stuff is giving issues)
I ended up installing the 9.1 run file for Ubuntu 17.04. Download it. Mark the file as executable(I right click on the file in desktop). Go into the terminal and put. (Required)
It will install it using the new gcc compilers. It will ask you a bunch of questions, and it will want them answered immediately.
Answer yes to the unsupported confguration.
No to the nvidia driver.
Yes- to the toolkit
I used default install locations
After that is installed then make sure you set up your paths. The run file will give you a reminder, too. Also the nvidia documentation will tell you what to export.
Finally you have to set up simlinks to gcc-6 and g++-6 or you will get a warning on compiling your own code.(Required)
Reboot the system. (Required)
Let's see how my answer for 16.04 goes:
sudo sh cuda_7.5.18_linux.run
Next step: Install cuDNN
CUDA 9.2
Warning: Do not install the display driver! (At least it didn't work on my Thinkpad T460p)
CUDA 9.0 for tf
and
CUDA Requirements
Verify with
My own experience in CUDA installation. Tested on Ubuntu 18.04. Task:
Related links:
NVIDIA driver installation
Go to NVIDIA web-site - https://www.nvidia.com/Download/index.aspx and obtain the latest driver for your GPU. In my case it is:
Download it. In my case filename is:
NVIDIA-Linux-x86_64-410.78.run
It is better to run driver installation in the text mode. For the text mode press
<Ctrl>+<Alt>+<F3>
and login to console.Most likely you'll have problems with previously installed graphical driver called Nouveau.
You should see terminal output of Nvidia Drivers:
You should see correct model of your GPU:
Installing CUDA library for all users
Download CUDA toolkit from - https://developer.nvidia.com/cuda-downloads Select:
Linux, x86_64, Ubuntu, 18.04, runfile (local)
.Download 2.0 GB file:
cuda_10.0.130_410.48_linux.run
To configure the CUDA environment for all users (and applications) on your system create two files (use sudo and a text editor of your choice)
I suggest you to use the following link on Nvidia: toolkit-archive
Here you can choose version and then get all the commands needed.