TensorFlow and ROS Kinetic with Python 2.7
- Create a working directory
$ mkdir ~/tf_ros && cd ~/tf_ros
Download and Install an NVIDIA Driver >= 384.x (
https://www.nvidia.co.jp/Download/index.aspx
) We recommend RUN files, please check our other post on this topic.Download and Install CUDA 9.0 (
https://developer.nvidia.com/cuda-90-download-archive
)Download and Install CUDNN for CUDA 9.0 (
https://developer.nvidia.com/rdp/cudnn-download
;https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#installlinux
)Download TensorFlow for Python 2.7
$ wget https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.10.1-cp27-none-linux_x86_64.whl
Install Python VirtualEnv
$ sudo apt-get install python-virtualenv
Create Python 2.7 virtual environment.
$ virtualenv --system-site-packages -p python2 p2tf_venv
(p2tf_venv
can be any name)Activate environment
$ source p2tf_venv/bin/activate
Install TensorFlow
(p2_venv) $ pip install --upgrade tensorflow_gpu-1.10.1-cp27-none-linux_x86_64.whl
Make sure you have in
LD_LIBARY_PATH
, the cuda 9 libraries and binaries.
$ export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH && export PATH=/usr/local/cuda/bin:$PATH