Azure N-series(GPU) : install CUDA, cudnn, Tensorflow on UBUNTU 16.04 LTS



After spending more than 5 hours, i found this easy solution:

  • -To verify that the system has a CUDA-capable GPU, run the following command:
lspci | grep -i NVIDIA
click below button to copy the code. By azure tutorial team
  • You will see output similar to the following example (showing an NVIDIA Tesla K80/M60 card):

Learn Azure - Azure tutorial - CUDA Capable GPU - Azure examples - Azure programs

  • -Disabling the nouveau driver:
sudo -i
rmmod nouveau
click below button to copy the code. By azure tutorial team
  • -After a reboot: sudo reboot, verify the driver is installed properly by issuing:
lsmod | grep -i nvidia
click below button to copy the code. By azure tutorial team
  • -Next, download the CUDA package from Nvidia, ...
wget https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb
click below button to copy the code. By azure tutorial team
  • -... make it known to apt-get and install the CUDA Toolkit:
sudo dpkg -i cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb
sudo apt-get update
sudo apt-get install -y cuda
click below button to copy the code. By azure tutorial team
  • -Now we can check the status of the GPU(s) by running:
nvidia-smi
click below button to copy the code. By azure tutorial team
  • Next, we download cuDNN...
wget http://developer.download.nvidia.com/compute/redist/cudnn/v5.1/cudnn-8.0-linux-x64-v5.1.tgz
click below button to copy the code. By azure tutorial team
  • -... unzip, copy the lib64 and include folders:
tar -zxf cudnn-8.0-linux-x64-v5.1.tgz
sudo cp cuda/lib64/* /usr/local/cuda/lib64/
sudo cp cuda/include/* /usr/local/cuda/include/
sudo rm -R cuda
click below button to copy the code. By azure tutorial team
  • -Time to do some clean up and remove the downloaded archives:
rm cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb
rm cudnn-8.0-linux-x64-v5.1.tgz
click below button to copy the code. By azure tutorial team
  • To install Tensorflow with CPU/GPU , go here :

Related Searches to Azure N-series(GPU) : install CUDA, cudnn, Tensorflow on UBUNTU 16.04 LTS