Ubuntu非要换centOS。。。好吧。。。
yum -y install gcc-c++
$ sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org $ sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
$ sudo yum install nvidia-detect $ nvidia-detect -v
$ cd ~/downloads $ wget -r -np -nd http://us.download.nvidia.com/XFree86/Linux-x86_64/384.59/NVIDIA-Linux-x86_64-384.59.run
$ lsmod | grep nouveau
$ su root # echo -e "blacklist nouveau\noptions nouveau modeset=0" > /etc/modprobe.d/blacklist.conf
# mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak # dracut /boot/initramfs-$(uname -r).img $(uname -r)
$ chmod +x NVIDIA-Linux-x86_64-384.59.run $ sh NVIDIA-Linux-x86_64-384.59.run
$ nvidia-smi
$ sudo rpm -i cuda-repo-rhel7-8-0-local-ga2-8.0.61-1.x86_64.rpm $ sudo yum clean all $ sudo yum install cuda
Error: Package: 1:nvidia-kmod-375.26-2.el7.x86_64 (cuda-8-0-local-ga2)Requires: dkmsYou could try using --skip-broken to work around the problemYou could try running: rpm -Va --nofiles --nodigest
sudo vim /etc/yum.repos.d/linuxtech.testing.repo
[linuxtech-testing]name=LinuxTECH Testingbaseurl=http://pkgrepo.linuxtech.net/el6/testing/enabled=0gpgcheck=1gpgkey=http://pkgrepo.linuxtech.net/el6/release/RPM-GPG-KEY-LinuxTECH.NET
sudo yum --enablerepo=linuxtech-testing install libvdpau
yum -y install epel-release yum -y install --enablerepo=epel dkms
cd /usr/local/cuda-8.0/samples/1_Utilities/deviceQuery sudo make ./deviceQuery
vim .bashprofile
PATH=$PATH:$HOME/bin:/usr/local/cuda/binLD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64/CUDA_HOME=/usr/local/cudaexport PATHexport LD_LIBRARY_PATHexport CUDA_HOME
nvcc -V
yum install lrzsz
tar -xvf cudnn-8.0-linux-x64-v6.0.tgz -C /usr/local
yum install python-pip pip install --upgrade pip
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.3.0-cp27-none-linux_x86_64.whl