Install NVIDIA Graphics Driver:
sudo apt-get install nvidia-384 nvidia-modprobeDownload CUDA 9.0:
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-runExtract cuda_9.0.176_384.81_linux-run:
chmod +x cuda_9.0.176_384.81_linux-run
./cuda_9.0.176_384.81_linux-runRun:
sudo ./cuda-linux.9.0.176-22781540.run
sudo ./cuda-samples.9.0.176-22781540-linux.runConfigure the runtime library:
sudo bash -c "echo /usr/local/cuda/lib64/ > /etc/ld.so.conf.d/cuda.conf"
sudo ldconfigOpen /etc/environment:
sudo nano /etc/environmentAppend PATH with :/usr/local/cuda/bin in /etc/environment file.
Install gcc-6 and g++-6 and link them with CUDA:
sudo apt-get install gcc-6 g++-6
sudo ln -s /usr/bin/gcc-6 /usr/local/cuda/bin/gcc
sudo ln -s /usr/bin/g++-6 /usr/local/cuda/bin/g++Restart the computer:
rebootGo to /usr/local/cuda-9.0/samples:
cd /usr/local/cuda-9.0/samplesRun:
sudo makeIf there are no errors and just warnings, installation is complete.
Go to https://developer.nvidia.com/rdp/cudnn-download.
Press Download cuDNN v7.X.Y, for CUDA 9.0.
Then press to download these selections:
- cuDNN Runtime Library for Ubuntu16.04 (Deb),
- cuDNN Developer Library for Ubuntu16.04 (Deb),
- cuDNN Code Samples and User Guide for Ubuntu16.04 (Deb).
Install downloaded files:
sudo dpkg -i libcudnn7_7.X.Y.Z-1+cuda9.0_amd64.deb
sudo dpkg -i libcudnn7-dev_7.X.Y.Z-1+cuda9.0_amd64.deb
sudo dpkg -i libcudnn7-doc_7.X.Y.Z-1+cuda9.0_amd64.debCopy cuDNN samples:
cp -r /usr/src/cudnn_samples_v7/ ~Go to mnistCUDNN folder:
cd ~/cudnn_samples_v7/mnistCUDNNCompile and run:
make clean && make
./mnistCUDNNIf you see Test passed! at the end of the output then installation is complete.
Download Anaconda from https://www.anaconda.com/download/#linux.
Run installation:
chmod u+x Anaconda3-X.Y.Z-Linux-x86_64.sh
./Anaconda3-X.Y.Z-Linux-x86_64.shClose and open terminal.
Create Tensorflow environment for Python 3.6:
conda create -n tensorflow python=3.6Activate environment:
conda activate tensorflowInstall TensorFlow GPU version
pip install tensorflow-gpu