Notes install TensorFlow

Voir aussi :

Pytorch

Keras

install prérequis

Install de CUDA 9.0 et patches

Voir Install drivers graphique propriétaire Nvidia CUDA

puis

echo 'export PATH=$PATH:/usr/local/cuda/bin' |sudo tee /etc/profile.d/cuda.sh echo "/usr/local/cuda/lib64" |sudo tee /etc/ld.so.conf.d/cuda.conf sudo ldconfig
sudo apt-get install python3-numpy python3-venv
pyvenv plop cd plop source bin/activate pip install -U pip pip install -U pillow pip install -U opencv-python

Install Tensor

Install libcudnn.so

nvidia-docker pull tensorflow/tensorflow:latest-gpu updatedb locate libcudnn.so sudo cp -p /var/lib/docker/overlay2/64b8c9d64be38b0853ce15db5bfbf53c3fcfed8887fcd651faa27b3c37c4cd00/diff/usr/lib/x86_64-linux-gnu/libcudnn.so.7.1.4 /usr/lib/x86_64-linux-gnu/ ldconfig

Install de TensorFlow

pip install -U tensorflow==1.8.0 pip install -U tensorflow-gpu==1.8.0

Test

python3
import tensorflow as tf

Pb

error: invalid command 'bdist_wheel'

error: invalid command 'bdist_wheel'
Failed building wheel for absl-py

Solution

pip install -U pip

ImportError: libcudnn.so.7

ImportError: libcudnn.so.7: cannot open shared object file: No such file or directory

Solution

nvidia-docker pull tensorflow/tensorflow:latest-gpu updatedb locate libcudnn.so sudo cp -p /var/lib/docker/overlay2/64b8c9d64be38b0853ce15db5bfbf53c3fcfed8887fcd651faa27b3c37c4cd00/diff/usr/lib/x86_64-linux-gnu/libcudnn.so.7.1.4 /usr/lib/x86_64-linux-gnu/ ldconfig