sudo yum install kernel-devel-$(uname -r)、kernel-headers-$(uname -r) 手动下载,rpm -ivh安装
禁用nouveau driver,创建
/etc/modprobe.d/blacklist-nouveau.conf
:12blacklist nouveauoptions nouveau modeset=0Regenerate the kernel initramfs and 重启机器:
sudo dracut --force
sh cuda_8.0.44_linux.run
(全部默认选项) &chmod 755 -R /usr/local/cuda-8.0
cudnn安装:
12345678tar -xzvf cudnn-8.0-linux-x64-v5.1.tgzcd cudnn-8.0-linux-x64-v5.1sudo cp lib64/* /usr/local/cuda/lib64/sudo cp include/* /usr/local/cuda/include/复制后软链接会失效,需要重新建立软链接:ln -s libcudnn.so.6.0.21 libcudnn.so.6ln -s libcudnn.so.6 libcudnn.so设置环境变量:
12export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64export PATH="/usr/local/cuda-8.0/bin:$PATH"pip install tensorflow/theano/keras
(若无法下载包,手动下载再安装)1pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.2.0-cp35-cp35m-manylinux1_x86_64.whl