[https://developer.nvidia.com/cuda-downloads]
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/7fa2af80.pub
as root not sudo
add
cat 7fa2af80.pub | apt-key add -
remove old
apt-key del 5C37D3BE
sudo dpkg -i cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda
Download [https://developer.nvidia.com/cudnn]
tar xvzf cudnn-8.0-linux-x64-v5.1-ga.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
Python 3.4
create env
conda create -n tensorflow python=3.4
Activate
source activate tensorflow
set Binary
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0-cp34-cp34m-linux_x86_64.whl
Install (pip3 didn't work this did)
pip install --ignore-installed --upgrade $TF_BINARY_URL
Set conda envs to enable GPU
[http://conda.pydata.org/docs/using/envs.html#linux-and-macos]
cd /home/jsmith/anaconda3/envs/analytics
mkdir -p ./etc/conda/activate.d
mkdir -p ./etc/conda/deactivate.d
nano ./etc/conda/activate.d/env_vars.sh
# add these lines
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"
export CUDA_HOME=/usr/local/cuda
nano ./etc/conda/deactivate.d/env_vars.sh
# different
unset LD_LIBRARY_PATH
unset CUDA_HOME
Test
$ python
...
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print(sess.run(a + b))
42
>>>