CUDA8.0+CUDNN5.1环境搭建

1.依赖项

sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
sudo apt-get install libopenblas-dev liblapack-dev libatlas-base-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
sudo apt-get install git cmake build-essential

2.CUDA

  1. sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
  2. sudo apt-get update
  3. sudo apt-get install cuda

3.环境变量

sudo gedit ~/.bashrc
$ export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
$ export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
source ~/.bashrc

4.验证

cd /usr/local/cuda-8.0/samples/1_Utilities/deviceQuery
sudo make
./deviceQuery

5.CUDNN

tar xvzf cudnn-8.0-linux-x64-v5.1-ga.tgz

sudo cp -P cuda/include/cudnn.h  /usr/local/cuda/include

sudo cp -P cuda/lib64/libcudnn*  /usr/local/cuda/lib64

sudo chmod a+r /usr/local/cuda/include/cudnn.h  /usr/local/cuda/lib64/libcudnn*

 

sudo apt-get install libcupti-dev

 

你可能感兴趣的:(CUDA8.0+CUDNN5.1环境搭建)