Install ubuntu nvidia drivers; Reboot the PC; Check if NVIDIA card is working properly or not; This tutorial is for desktops only, so if you have a laptop with Optimus GPU, check this tutorial about NVIDIA Optimus on Ubuntu. It's not like you always need to install the propitiatory ubuntu nvidia drivers. Ubuntu NVIDIA Optimus setup - Install bumblebee and nvidia drivers Updated - December 31, 2017 by Arnab Satapathi If you're looking for how to setup nVIDIA Optimus in Ubuntu, Linux Mint to harness that crazy GPU in your laptop, then you're in the right place. How can the answer be improved?
Active9 months ago
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.
Martin Thornton2,68377 gold badges2020 silver badges3232 bronze badges
GabsGabs50122 gold badges88 silver badges1616 bronze badges
8 Answers
I have installed CUDA 9.1 on Ubuntu 18.04, and runs very well.
However, I should modify default gcc, g++, and use .run files instead of .deb files.
DevExpress Universal Complete Crack (includes all DevExpress.NET products in an integrated set). It was built for those who demand the highest quality and expect the best performance for those who require reliable tools designed for today and tomorrow. DevExpress Universal 2017 Final Release is a professional software designed to build apps with perfect quality. DevExpress Universal 17.1 Crack provides a diversity of tools to build great apps. The software integrates a variety of visual studio products all in one. DevExpress Crack 18.1.4 Latest version available for free with direct download link at Viafiles, DevExpress Universal Complete 18.1.4 Full Crack + Patch is a wonderful and comprehensive Software that assists users in creating applications for Windows, mobile and tablet with all of the DevExpress single platform controls as WinForms to ASP.NET, WPF and Windows 10 apps. Devexpress and crack. DevExpress Crack Full v17.1 Latest Version is a comprehensive software that helps users build Windows, Web, mobile and tablet applications. It works for the platform of WinForms to ASP.NET, WPF and Windows 10 applications. DevExpress Universal 17.1 Crack is a comprehensive software that helps users for build applications for Windows, Web, mobile and tablet with all of the DevExpress single platform controls – from WinForms to ASP.NET, WPF and Windows 10 apps. DevExpress Universal 17.1 License Key is available as a free download from our software library.
- install gcc-6, g++-6 (CUDA requires gcc-6 !)
- In /usr/bin as root, rm gcc, gcc-ar, gcc-nm, gcc-ranlib g++, then ln -s gcc-6 gcc; ln -s gcc-ar-6 gcc-ar; ln -s gcc-nm-6 gcc-nm; ln -s gcc-ranlib-6 gcc-ranlib; and ln -s g++-6 g++
- install CUDA using .run files. You may not istall driver. Instead, installthe 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 conflict so that I've changed the way.
Enjoy it!!
Dae-Chul Jo 조대철Dae-Chul Jo 조대철
In a terminal, type:
reboot
I have a gtx970 graphics card and a fresh install of Ubuntu 18.04
This worked for me
N0rbert31.8k1010 gold badges7676 silver badges154154 bronze badges
eromoderomod1,06111 gold badge22 silver badges33 bronze badges
Enable multiverse repository, install nvidia drivers and nvidia-cuda-toolkit and gcc6 (preferably using update-alternatives to easily switch versions):
- In software & updates, select the restricted and multiverse repositories
- In the Additional Drivers tab in software & updates select the NVIDIA proprietary driver (390 for CUDA 9)
- sudo apt update && sudo apt install nvidia-cuda-toolkit, or install it from the ubuntu software center.
- CUDA requires gcc6, use update-alternatives to maintain both gcc7 and gcc6 as explained here.
Alternatively you can follow Taylor's instructions:
- After installing the proprietary NVIDIA driver, download CUDA 9 installation from their site (get Ubuntu the 17.04 runfile version)
- make the downloaded file executable with
sudo chmod +x
- run it with --override flag
- Accept the terms and conditions, say yes to installing with an unsupported configuration, and no to “Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?”. Make sure you don’t agree to install the new driver.
- See above about using gcc6
The second method has the downside that it's not as easy to upgrade or remove.
Mr.WorshipMeMr.WorshipMe
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:
sudo apt-get install nvidia-driver-390
Hayvan MHayvan M
The CUDA toolkit finally released the 18.04 ubuntu support
FlyingZipperFlyingZipper
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).
Ubuntu Install Nvidia 396
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)
Community♦
Derek StinsonDerek Stinson
Let's see how my answer for 16.04 goes:
- Download CUDA for Ubuntu 17.10 (runfile local) - Tensorflow recommends CUDA 9.0 - CUDA 9.2 seems not to work with tf
- Install CUDA requirements (see section below)
- Run
sudo sh cuda_7.5.18_linux.run
- Follow the command line prompts.
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
Scott Stensland6,05955 gold badges2929 silver badges4646 bronze badges
Martin ThomaMartin Thoma7,8211616 gold badges5353 silver badges8181 bronze badges
My own experience in CUDA installation. Tested on Ubuntu 18.04.Task:
- Install graphical driver for Palit GeForce GTX 1080 Ti GameRock 11GB GDDR5X [NEB108TT15LC-1020G].
- Install CUDA library for all users.
Related links:
- How to Install Nvidia CUDA Toolkit on Ubuntu 18.04 LTS - https://www.howtoforge.com/tutorial/how-to-install-nvidia-cuda-on-ubuntu-1804/
- How to install CUDA 9.2 on Ubuntu 18.04 - https://www.pugetsystems.com/labs/hpc/How-to-install-CUDA-9-2-on-Ubuntu-18-04-1184/
- How to install Nvidia driver in ubuntu 18.04 - https://askubuntu.com/a/1056128/672237
- NVIDIA CUDA Installation Guide for Linux - https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
- Commands for NVIDIA install on Ubuntu 16.04 - http://christopher5106.github.io/nvidia/2016/12/30/commands-nvidia-install-ubuntu-16-04.html
NVIDIA driver installation
Go to NVIDIA web-site - https://www.nvidia.com/Download/index.aspxand 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-downloadsSelect:
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 systemcreate two files (use sudo and a text editor of your choice)
foo barfoo bar
![Ubuntu Ubuntu](/uploads/1/2/6/0/126064299/489137183.jpg)
Not the answer you're looking for? Browse other questions tagged nvidiacuda18.04 or ask your own question.
Our previous guide was on installing PyTorch. Then, why TensorFlow needed a separate guide? Is not running few commands would install TensorFlow on that setup? There are practical differences when current version of Ubuntu server considered, some way would invite crush of server out of slightly buggy packages. With symlinking somehow works and most human forget what exactly done to someway fix.
We have discussed about GPU computing as minimally needed theoretical background. Also, in an earlier guide we have shown Nvidia CUDA tool installation on MacOS X. Here is Practical Guide On How To Install TensorFlow on Ubuntu 18.04 Server With Nvidia GPU. Installation demands server architecture which has Nvidia graphics card – there are such dedicated servers available for various purposes including gaming. Installing on localhost for intense and time consuming work not recommended for the sake of life of the device. The graphics card must support at least Nvidia compute 3.0 for more works than just TensorFlow.
Steps To Install TensorFlow on Ubuntu 18.04 Server
We are assuming a 64 bit version of OS with card like GeForce 740m. SSH to server. Update and upgrade :
2 | apt upgrade-y |
Run this big command to install the Python libraries :
2 | export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64' |
Reload :
2 | sudo ldconfig |
Install Bazel :
2 4 6 8 | echo'deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8'|sudo tee/etc/apt/sources.list.d/bazel.list curl https://bazel.build/bazel-release.pub.gpg|sudo apt-key add- sudo apt upgrade-y sudo apt upgrade bazel |
That is it. Check Nvidia version :
2 4 6 8 10 12 14 16 18 20 22 | Please specify the location of python.[Default is/usr/bin/python]:/usr/bin/python3 Do you wish to build TensorFlow with jemalloc as malloc support?[Y/n]:Y Do you wish to build TensorFlow with Google Cloud Platform support?[Y/n]:N Do you wish to build TensorFlow with Hadoop File System support?[Y/n]:N Do you wish to build TensorFlow with Amazon S3 File System support?[Y/n]:N Do you wish to build TensorFlow with Apache Kafka Platform support?[y/N]:N Do you wish to build TensorFlow with XLA JIT support?[y/N]:N Do you wish to build TensorFlow with GDR support?[y/N]:N Do you wish to build TensorFlow with VERBS support?[y/N]:N Do you wish to build TensorFlow with OpenCL SYCL support?[y/N]:N Do you wish to build TensorFlow with CUDA support?[y/N]:Y Please specify the CUDA SDK version you want to use,e.g.7.0.[Leave empty to default to CUDA9.0]:9.0 Please specify the location where CUDA9.1toolkit is installed.Refer to README.md formore details.[Default is/usr/local/cuda]:/usr/local/cuda Please specify the cuDNN version you want to use.[Leave empty to default to cuDNN7.0]:7.1 Please specify the location where cuDNN7library is installed.Refer to README.md formore details.[Default is/usr/local/cuda]:/usr/local/cuda Do you wish to build TensorFlow with TensorRT support?[y/N]:N Please note that each additional compute capability significantly increases your build time and binary size.[Default is:5.0]3.0 Please specify which gcc should be used by nvcc as the host compiler.[Default is/usr/bin/gcc]:/usr/bin/gcc-4.8 Do you wish to build TensorFlow with MPI support?[y/N]:N Please specify optimization flags to use during compilation when bazel option'--config=opt'is specified[Default is-march=native]:-march=native Would you like to interactively configure./WORKSPACE forAndroid builds?[y/N]:N |
Build TensorFlow :
sudo bazel build--config=opt--config=cuda--action_env='/usr/local/cuda/lib64'//tensorflow/tools/pip_package:build_pip_package |
Last steps :
2 4 | hello=tf.constant('Hello World!') print(sess.run(hello)) |
You’ll get
Hello World!
output. TensorFlow has models :You can run :