ubuntu16.04+cuda10.0+cudnn7.6+tensorflow_gpu-1.11.0 environment installation

In order to set up a deep learning environment, I installed various libraries again, and the installation version and process are recorded here.

ubuntu16.04+cuda10.0+cudnn7.6+tensorflow_gpu-1.11.0 environment installation

1 Install NVIDIA graphics card

Check your graphics card model:

lspci |grep -i nvidia

Insert image description here

nvidia official website: https://www.nvidia.cn/geforce/drivers/Search
for the corresponding driver
Insert image description here

Modify /etc/modprobe.d/blacklist.conf and add the following content

sudo gedit /etc/modprobe.d/blacklist.conf

blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist rivatv
blacklist nvidiafb

Create a new blacklist-nouveau.conf file and add the following content

sudo gedit /etc/modprobe.d/blacklist-nouveau.conf

blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
sudo update-initramfs -u
reboot

Check whether the nouveau module is loaded. If there is no output, proceed to the next step.

lsmod | grep nouveau

Install

sudo service lightdm stop
sudo ./NVIDIA-Linux-x86_64-xxx.run --no-opengl-files
sudo service lightdm start
nvidia-smi

Insert image description here

2 Install CUDA10.0

Download
https://link.csdn.net/?target=https%3A%2F%2Fdeveloper.nvidia.com%2Fcuda-10.0-download-archive
Insert image description here
Insert image description here

sudo gedit ~/.bashrc

# for CUDA 10.0
export CUDA_10_0_HOME=/usr/local/cuda-10.0
export PATH=$PATH:$CUDA_10_0_HOME/bin 
export LD_LIBRARY_PATH=CUDA_10_0_HOME/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}


3 Install CUDNN

https://developer.nvidia.com/rdp/cudnn-archive

sudo dpkg -i libcudnn7_7.6.0.64-1+cuda10.0_amd64.deb 
sudo dpkg -i libcudnn7-dev_7.6.0.64-1+cuda10.0_amd64.deb 
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

4 Install tensorflow_gpu-1.11.0

Query the version correspondence between cuda, cuDNN and tensorflow
https://tensorflow.google.cn/install/source_windows?hl=en#gpu

Insert image description here

Choose to install tensorflow-gpu-1.14.0

pip install tensorflow-gpu==1.14.0

Guess you like

Origin blog.csdn.net/slender_1031/article/details/127411613