需要文件夹cuda8.0-cudnn5, cuda8.0-cudnn6
switch_cudnn.sh
#usr/bin/env sh
VERSION=$1
cd /media/data_1/Yang/software_install/cudnn/cuda8.0-cudnn${VERSION}
sudo cp ./include/cudnn.h /usr/local/cuda/include
sudo cp ./lib64/lib* /usr/local/cuda/lib64/ ##复制动态链接库
cd /usr/local/cuda/lib64/
sudo ln -snf libcudnn.so.${VERSION} libcudnn.so ##强制建立软链接
echo 'cudnn.__version__='${VERSION}
运行: ./switch_cudnn.sh 5 ./switch_cudnn.sh 6
switch_python.sh
#usr/bin/env sh
VERSION=$1
sudo ln -snf /usr/bin/python${VERSION} /usr/bin/python
echo 'python.__version__='${VERSION}