Data Science Dev

Design, develop, deploy

Installing Tensorflow 1.3 / CUDA Toolkit 8.0 / cuDNN 6.0 on ASUS GL502VS-DS71 Laptop with Ubuntu 16.04 and Nvidia 1070

Image result for gl502vs-ds71

My ASUS GL502VS-DS71 laptop had some operating system problems recently so I decided to reinstall Ubuntu on it.  Somehow the Nvidia driver got updated to a more recent version (384.90) that didn't work with Tensorflow.  This is an excellent opportunity to refresh the installation procedure of Tensorflow in the blog.  If I installed the CUDA Toolkit 8.0 with the included Nvidia driver, it would not let me login to Ubuntu.  It kept returning to the login screen.  This is probably because the driver that comes with the CUDA Toolkit is too old to support the Nvidia 1070 card built into my laptop.  Therefore, we need to install a Nvidia driver that works with the 1070 card first, and then, install the CUDA Toolkit 8.0 without the included Nvidia driver.  The instructions are below:

1. Reboot computer and get into BIOS (delete/DEL key while restarting or other key)

2. If your motherboard has Secure Boot, turn it off/disable.  Save BIOS changes and reboot.

3. Install Ubuntu 16.04.x

4. After installation, open terminal.

5. sudo add-apt-repository ppa:graphics-drivers/ppa

6. sudo apt-get update

7. sudo apt-get upgrade

8. Open Software & Updates from launcher.

9. Select the Additional Drivers tab.

10. Select the Using NVIDIA binary driver - version 378.xx (I have 378.13)

11. Reboot computer.

12. Download NVIDIA CUDA Toolkit 8.0 (use .runfile only and you may have to search for this version in their archives since the newer version won't work with tensorflow) and NVIDIA cuDNN library 6.0 (again not the newest version 7.0) from NVIDIA's website.  You have to login for cuDNN libraries.  

13. Follow instructions on NVIDIA website to install cuda toolkit (and patch if available) but do not upgrade NVIDIA driver (you will be asked during .runfile execution) or change default install directories

14. Follow instructions on NVIDIA website to install cuDNN (i put it in my home directory in a folder called cuda)

15. Edit ~/.bashrc and add the following lines at the end of the file:
export LD_LIBRARY_PATH=~/cuda/lib64/:/usr/local/cuda-8.0/lib64/:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda-8.0/bin:$PATH

16. Logout of Ubuntu and log back in

17. Open terminal.

17. sudo apt-get install libblas-dev liblapack-dev libjpeg-dev python-dev

18a. For python 2.7:
sudo apt-get install python-pip
sudo apt-get install idle
sudo pip install --upgrade pip
sudo pip install tensorflow-gpu (if you have a GPU)

19b. For python 3.5:
sudo apt-get install python3-pip
sudo apt-get install idle3
sudo pip3 install --upgrade pip
sudo pip3 install tensorflow-gpu (if you have a GPU)

20. Reboot

Go Back


Blog Search


There are currently no blog comments.