Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ravikg/423e1a862b0c4289a5eb3c123bb3641e to your computer and use it in GitHub Desktop.
Save ravikg/423e1a862b0c4289a5eb3c123bb3641e to your computer and use it in GitHub Desktop.
Tensorflow setup instruction with GPU support in Ubuntu 16.04 Dell XPS Alienware
http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx
Unetbootin http://unetbootin.github.io/
get ubuntu 16.04 iso and create bootable usb
in dell go to boot setup and disable secure boot and disable uefi and enable legacy
set usb 1st boot option
insert the above bootable usb and reboot laptop
install ubuntu: mouse pointer might not come in live ubuntu, use usb mouse; it will come after install
sudo apt-get update
sudo apt-get upgrade
reboot
install nvidia drivers from additional drivers(tab in software and updates app in ubuntu)
reboot
CUDA
download cuda from : https://developer.nvidia.com/cuda-downloads
select linux->x86_64->Ubuntu->15.04->runfile(local)
verify md5sum
$ sudo sh cuda_7.5.18_linux.run --override
Ref:
https://askubuntu.com/questions/799184/how-can-i-install-cuda-on-ubuntu-16-04
https://www.pugetsystems.com/labs/hpc/NVIDIA-CUDA-with-Ubuntu-16-04-beta-on-a-laptop-if-you-just-cannot-wait-775/
cuDNN
register and download cudnn v4: https://developer.nvidia.com/cudnn
$ cd folder/extracted/contents
$ sudo cp -P include/cudnn.h /usr/include
$ sudo cp -P lib64/libcudnn* /usr/lib/x86_64-linux-gnu/
$ sudo chmod a+r /usr/lib/x86_64-linux-gnu/libcudnn*
Ref:
http://askubuntu.com/questions/767269/how-can-i-install-cudnn-on-ubuntu-16-04
install pip3
sudo apt-get install python3-pip
install tensor flow using pip
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.5
# Requires CUDA toolkit 7.5 and CuDNN v4.
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0-cp35-cp35m-linux_x86_64.whl
# Python 3
$ sudo pip3 install --upgrade $TF_BINARY_URL
Ref: https://www.tensorflow.org/versions/r0.9/get_started/os_setup.html#pip-installation
before running tensor flow code:
setup CUDA_HOME and LD_LIBRARY_PATH
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64"
export CUDA_HOME=/usr/local/cuda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment