80 likes | 95 Views
Learn How to Configure GPU tensorflow Ubuntu 18 with our Artificial Intelligence services. Visit: https://www.paradisetechsoft.com/artificial-intelligence-services
E N D
Ubuntu comes with opensourceubuntu NVIDIA driver called nouveau. So first step would be disabling it. This tutorial is divided into following parts Disabling nouveau Install cuda 9.0 Toolkit for ubuntu 18.04 LTS Install Cudnn 7.0 Install libcupti Adding path of cuda toolkit Installing Tensorflow-GPU on virtual environment Configuring-GPU-Tensorflow-Ubuntu-18.04
1. Disabling nouveau Create below file nano /etc/modprobe.d/blacklist-nouveau.conf Please update the below content in this file blacklist nouveau options nouveau modeset=0
2. Install cuda 9.0 Toolkit for Ubuntu 18.04 LTS • Before this step, please install Nvidia Drivers (proprietary) • Please visit the link https://developer.nvidia.com/cuda-toolkit and download cuda 9.0 from archives • During the above step, you have to login details so make the account on nvidia and download drivers • Once the drivers are downloaded, please follow the below instructions • sudochmod +x cuda_9.0.xx_linux.run ./cuda_9.0.xx_linux.run --override • Please 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_xx
Please click on https://developer.nvidia.com/cudnn link and install Cudnn 7.0 for cuda 9.0 • Now we need to copy the files to the cuda drivers in the ubuntu machine. Please follow the below steps • tar -zxvf cudnn-9.0-linux-x64-v7.tgz • Move the unpacked contents to your CUDA directory • sudocp -P cuda/lib64/libcudnn* /usr/local/cuda-9.0/lib64/ sudocpcuda/include/cudnn.h /usr/local/cuda-9.0/include/ • Give read access to all users • sudochmoda+r /usr/local/cuda-9.0/include/cudnn.h /usr/local/cuda/lib64/libcudnn* 3. Install Cudnn 7.0
Please follow the below instruction to install libcupti • sudo apt-get install libcupti-dev 4. Install libcupti 5. Exporting the path Please open the file ~./bashrc with your favourite editor such as vim or nanoand paste the below code there. export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
So please install,create and activate the virtual environment using the below steps. sudo apt install -y python3-venv python3 -m venvenvironment_name source sample_environment/bin/activate Now, please run the below code to install tensorflow-gpu. pip3 install --upgrade tensorflow-gpu 6. Installing Tensorflow-GPU on virtual environment
Paradise Techsoft Solutions Pvt. Ltd. https://www.paradisetechsoft.com/