Ubuntu P40 graphics configuration CUDA 10.1, CUDNN 7.6, Conda 5.2.0, Tensorflow-gpu 1.8

1. Install CUDA

Disable nouveau

vim /etc/modprobe.d/blacklist.conf

The last two lines join

blacklist nouveau
options nouveau modeset=0

Rebuild the kernel initramfs:

update-initramfs -u

Restart

reboot

Entry

lsmod | grep nouveau

No output is disabled success

Installation CUDA 10.1

Official website to download

cuda_10.1.168_418.67_linux.run

Increase the executable permissions

chmod +x cuda_10.1.168_418.67_linux.run

Direct Installation

./cuda_10.1.168_418.67_linux.run

After the installation, add the environment variable to ~/.bashrc

export PATH="/usr/local/cuda-10.1/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-10.1/lib64:$LD_LIBRARY_PATH"

The environment variables to take effect

source ~/.bashrc

The library was added to the catalog go vim /etc/ld.so.conf.d/cuda-10-1.conf, add a line

/usr/local/cuda-10.1/lib64

2. Install CUDNN 7.6

Official website to download

cudnn-10.1-linux-x64-v7.6.1.34.so.tgz

Decompression

tar -zxvf cudnn-10.1-linux-x64-v7.6.1.34.so.tgz

CUDA copied to the corresponding directory to

cp lib64/* /usr/local/cuda/lib64/
cp include/cudnn.h /usr/local/cuda/include/

3. Install Anaconda 5.2.0

Download directly from tuna

Anaconda3-5.2.0-Linux-x86_64.sh

Increase the executable permissions, you can install

chmod +x Anaconda3-5.2.0-Linux-x86_64.sh
./Anaconda3-5.2.0-Linux-x86_64.sh

Installing automatically added to the environment variable, but it needs to refresh the environment variables

source ~/.bashrc

4. Installation Tensorflow-gpu 1.8

Directly condainstall

conda install tensorflow-gpu=1.8

5. Verify whether some of the measures installed CUDA

View version

nvcc -V

To enter /usr/local/cuda/samples, makecompile it

Find bin/x86_64/linux/release/the directory, there are deviceQuery, bandwidthTestetc., run what appear to explain PASS OK.

./deviceQuery
./bandwidthTest 

6. stepped pit

System a. Be sure to use Nvidia officially supported, most started using ubuntu 19.04 installation process a lot of questions, barely fitted with a code to run down, too pit.

b. There are online ways to add ppa source and the like, does not work, estimated to be the cause of the wall, could not have been downloaded, it is best to download the installation file, a little more stable.

c. If you use someone else's methods can be successful, it really is odd strange.

Guess you like

Origin www.cnblogs.com/willwell/p/12195611.html