Authors: Antônio H. Ribeiro and Manoel H. Ribeiro
This is a guide containing practical steps to install nvidia gpu drivers and tensorflow which combines successful steps
from previous (troublesome) experiences. We currently use nvidia cuda toolkit v9.0
and cudnn v7.0.5
. This
methodology has worked for Ubuntu v16.04
and for graphic cards GTX 980Ti
and GTX 1080Ti
.
-
Add repository for downloading nvidia graphic drivers:
sudo add-apt-repository ppa:graphics-drivers sudo apt update
-
Check which driver is appropriate for your GPU here.
-
Install driver via
apt-get install
, for the appropriate driver:sudo apt install nvidia-*
-
Download CUDA toolkit 9.0 from this website.
-
Install the toolkit by running:
sudo sh cuda_9.0.*_linux.run
-
On the installation prompt, do not let the installation to include the graphical driver.
-
Add the cuda location to the path, in the end of the
~/.bashrc
:export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
-
Download the
.deb
files from here, remember that the password require a capital letter:cuDNN v7.0.5 Runtime Library for Ubuntu16.04 (Deb) cuDNN v7.0.5 Developer Library for Ubuntu16.04 (Deb) cuDNN v7.0.5 Code Samples & User Guide for Ubuntu16.04 (Deb)
-
Go to the download folder and in the terminal perform the following:
sudo dpkg -i libcudnn7_7.0.5.*+cuda9.0_amd64.deb sudo dpkg -i libcudnn7-dev_7.0.5.*+cuda9.0_amd64.deb sudo dpkg -i libcudnn7-doc_7.0.5.*+cuda9.0_amd64.deb
-
Verify the installation as follows:
cp -r /usr/src/cudnn_samples_v7/ $HOME cd $HOME/cudnn_samples_v7/mnistCUDNN make clean && make ./mnistCUDNN
-
Download Miniconda here.
-
Run installation script on terminal:
bash Miniconda3-latest-Linux-x86_64.sh
-
Follow the prompt on the installer screens. Upon finishing, close and open your terminal again.
-
Test your installation by running
conda list
.
-
Create a new conda enviroment
conda create --name neural python=3.6
-
Activate enviroment
source activate neural
-
Install required packages
pip install numpy
-
Install tensorflow, getting
tfBinaryURL
from here:pip install --ignore-installed --upgrade tfBinaryURL
To install on Ubuntu 18.04 with a NVidia GTX 1050Ti, this is a good material to complement this guide: https://medium.com/@taylordenouden/installing-tensorflow-gpu-on-ubuntu-18-04-89a142325138 (we should prob add some stuff to ours later)