Tutorial

==installation of cuda==
=Preinstallation actions==
a. verify cuda-capable gpu
lspci | grep -i nvidia

b. verify a supported version of linux 
uname -m && cat /etc/*-release

c. verify the system has gcc installed
gcc --version


1. disabling nouveau
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#package-manager-metas
if lsmod | grep nouveau prints anything, means nouveau is loaded and must be disabled before proceeding to install cuda

navigate to /etc/modprobe.d/ 

sudo nano ./blacklist.nouveau.conf

enter the following in the file
blacklist nouveau
options nouveau modeset=0

save

regenerate the kernel initrd:
sudo update-initramfs -u

==download cuda 9 deb from nvidia==
navigate to download
sudo dpkg -i cuda-repo-ubuntu~~~~.deb

installe public gpg key
sudo apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub 

sudo apt-get update
sudo apt-get install cuda

==postinstallation operations==
edit ~/.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}}


==installation of cudnn==
used version 
libcudnn7_7.0.5
libcudnn7-dev_7.0.5.15-1 for cuda9.0

navigate to download
sudo dpkg -i libcudnn7_~~~.deb
sudo dpkg -i libcudnn7-dev~~~~.deb




==install python 3 and virtualenv==
sudo apt update
sudo apt install python3-dev python3-pip
sudo pip3 install -U virtualenv

==install tensorflow==
create a new virtual environment
virtualenv --system-site-packages -p python3 tensorflow

source tensorflow/bin/activate

pip install --upgrade pip
pip list

pip install tensorflow-gpu==1.7.0

test tensorflow installation
source tensorflow/bin/activate
python
import tensorflow as tf

should be no error 



==install other dependencies for usiigaci==

pip install opencv-python tqdm docopt imgaug h5py
pip install keras==2.1.5




miscellneous
installation of exfat
sudo apt-get install exfat-fuse exfat-utils

Comments