学以致用

focus on Python , C++, and some interest in Go and R

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

# install TensorFlow GPU on CentOS 7.0
# https://www.server-world.info/en/note?os=CentOS_7&p=tensorflow&f=2
# https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#axzz4rhm3n5RO
# https://gist.github.com/lyastro/26e0cd8245bcf64914857dd5e8445724
yum -y update
yum -y install epel-release
yum -y install gcc gcc-c++ python-pip python-devel atlas atlas-devel gcc-gfortran openssl-devel libffi-devel

# CUDA
# https://developer.nvidia.com/cuda-downloads

# install using runfile
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/patches/1/cuda_9.0.176.1_linux-run
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/patches/2/cuda_9.0.176.2_linux-run
sudo sh cuda_9.0.176_384.81_linux-run
sudo sh cuda_9.0.176.1_linux-run
sudo sh cuda_9.0.176.2_linux-run
# https://docs.nvidia.com/cuda/cuda-installation-guide-linux/


# set environment
vi /etc/profile.d/cuda-9.0.sh
export PATH=/usr/local/cuda-9.2/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64\
                         ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:/usr/local/cuda/extras/CUPTI/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

# Please make sure that
# -   PATH includes /usr/local/cuda-9.0/bin
# -   LD_LIBRARY_PATH includes /usr/local/cuda-9.0/lib64, or, add /usr/local/cuda-9.0/lib64 to /etc/ld.so.conf and run ldconfig as root


# install cudnn
# https://docs.nvidia.com/deeplearning/sdk/cudnn-install/
# Download cuDNN v7.1.4 (May 16, 2018), for CUDA 9.0
wget https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.1.4/prod/9.0_20180516/cudnn-9.0-linux-x64-v7.1

tar zxf cudnn-9.0-linux-x64-v7.1.solitairetheme8
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*

sudo pip install tensorflow-gpu

posted on 2018-06-07 11:24  Jerry.Kwan  阅读(264)  评论(0编辑  收藏  举报