我采取的步骤如下。在./configure
步骤期间,除非我允许cuDNN版本(v5)的系统默认值而不是指定v5.1.5(我想要),否则我会收到一条错误消息,指出cuDNN的环境版本(v5)没有t匹配目标版本(5.1.5)。由于我从Nvidia下载了CUDA 8.0的cuDNN v5.1.5文件,我感到很困惑。
更重要的是,在第240行挖掘https://github.com/tensorflow/tensorflow/blob/master/third_party/gpus/cuda_configure.bzl之后,我发现bazel配置脚本检查的版本似乎只考虑了cuDNN版本的主要数字(我的主要,次要和cudnn.h中的补丁数字分别为5,1,5)。所以,我不确定如何安装版本5.1.5。也许我看错了?
在任何情况下,有没有人有一种方法在g2.2xlarge实例上安装带有CUDA 8.0和Tensorflow 0.12的cuDNN 5.1.5?
谢谢!
sudo apt-get update && sudo apt-get -y upgrade
)sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y build-essential git python-pip libfreetype6-dev libxft-dev libncurses-dev libopenblas-dev gfortran python-matplotlib libblas-dev liblapack-dev libatlas-base-dev python-dev python-pydot linux-headers-generic linux-image-extra-virtual unzip python-numpy swig python-pandas python-sklearn unzip wget pkg-config zip g++ zlib1g-dev libcurl3-dev
sudo pip install -U pip
wget https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb
sudo dpkg -i cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb
rm cuda-repo-ubuntu1604-8-0-local_8.0.44-1_amd64-deb
sudo apt-get update
sudo apt-get install -y cuda
sudo tar -xzvf cudnn-8.0-linux-x64-v5.1.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*
~/.bashrc
结尾处添加以下内容:
export CUDA_HOME=/usr/local/cuda
export CUDA_ROOT=/usr/local/cuda
export PATH=$PATH:$CUDA_ROOT/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_ROOT/lib64:$CUDA_ROOT/extras/CUPTI/lib64
source ~/.bashrc
sudo reboot
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf- set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf- set-selections
sudo apt-get install -y oracle-java8-installer
sudo apt-get install pkg-config zip g++ zlib1g-dev
https://github.com/bazelbuild/bazel/releases/download/0.3.2/bazel-0.3.2-installer-linux-x86_64.sh
chmod +x bazel-0.1.4-installer-linux-x86_64.sh
./bazel-0.1.4-installer-linux-x86_64.sh --user
rm bazel-0.1.4-installer-linux-x86_64.sh
bazel version
git clone --recurse-submodules https://github.com/tensorflow/tensorflow
cd tensorflow
TF_UNOFFICIAL_SETTING=1 ./configure
bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
sudo pip install --upgrade /tmp/tensorflow_pkg/tensorflow-0.12.0rc1-cp27-cp27mu-linux_x86_64.whl