0.5 download display driver, cuda and cudnn
RTX2080 Display Driver
wonders
cudnn
1. Disable the default graphics driver
Open System blacklist
sudo gedit /etc/modprobe.d/blacklist.conf
the following code to fill the end of the file
# for nvidia display driver install
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist rivatv
blacklist nvidiafb
更新initramfs
sudo update-initramfs -u
restart the computer
sudo reboot
to see if the success is disabled, no output is disabled success
lsmod | grep again
2. RTX2080 graphics driver installation
First install gcc, g ++, make
-Y-GET APT the install the sudo GCC G ++ the make
the Ctrl + Fl ~ the Alt + F6 into the command line
the X-NVIDIA-Linux-x86_64-410.57.run chmod A + sudo
sudo ./NVIDIA-Linux-x86_64-410.57.run
Note 1: If you originally installed, you need to uninstall (previously installed version will uninstall), then install it
sudo ./NVIDIA-Linux-x86_64-410.57.run -uninstall
or
sudo apt-get --purge remove nvidia- *
The best performing
sudo apt-get autoremove
Note 2: mounting error (xxx nvidia-drm xxx), the following command, uninstall, then install
systemctl an isolate multi-user.target sudo
sudo modprobe -r the DRM-NVIDIA
# restart the graphical interface
# systemctl start graphical.target
Note 3: error (You appear to be running an X server) on a remote server, use the following command to close X server, and then uninstall, then install it
sudo service lightdm stop
3. cuda9.0 installation
gcc and g ++ version downgrade, ubuntu18.04 default gcc7.3, downgraded to gcc5, the ubuntu17.04 can be compiled and ubuntu16.04 of cuda9.0
sudo apt-get install gcc5 gcc5- multilib g ++ - 5 g ++ - 5-multilib
the gcc and g ++ versions switched gcc5. 5 and g ++
Alternatives --install-Update the sudo / usr / bin / GCC GCC / usr / bin /. 5 50 GCC-
the sudo-Update Alternatives --install / usr / bin / GCC GCC / usr / bin / GCC 40. 7-
the sudo-Update Alternatives --config gcc
enter the number you want to use gcc
the sudo Update-Alternatives --install / usr / bin / G ++ G ++ / usr / bin / G ++ -. 5 50
the sudo Update-Alternatives --install / usr / bin / G ++ G ++ / usr / bin / G ++ -. 7 40
the sudo Update-Alternatives --config g ++
enter the number you want to use g ++, see gcc version, it has switched to gcc5
-v gcc
cuda9.0 installation
sudo sh cuda_9.0.176_384.81_linux.run
whether to install the graphics driver select no, previously installed a
set environment variables cuda
gedit ~ / .bashrc
add the following code at the end of .bashrc file, the current user can use
Cuda9.0 #
Export the PATH = $ the PATH: / usr / local / CUDA / bin /
Export the LD_LIBRARY_PATH = $ the LD_LIBRARY_PATH: / usr / local / CUDA / the lib64 /
or added in the profile in the above code, all users can use
gedit / ect / profile
restart the computer
sudo reboot
to test whether the installation was successful cuda9.0
/usr/local/cuda-9.0/samples/1_Utilities/deviceQuery CD
the sudo the make
./deviceQuery
final output is Result = PASS, the successful installation instructions cuda9.0
Installation 4. cudnn
Decompression cudnn
tar -zxvf cudnn_xxx.tar.gz
cd cudnn-9.0-linux-x64-v7.3.1.20
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h
sudo chmod a+r /usr/local/cuda/lib64/libcudnn*
5. pycharm configuration
Run - Edit Configurations - Environment variables - on the right folders pattern - Click on the + sign
name, enter: LD_LIBRARY_PATH
value, enter: /usr/local/cuda-9.0/lib64
so the error will not import tensorflow that can not find libcublas. so.9.0
6. OK successful, enjoyable to use it
Reference blog
---------------------
Author: VcosmosV
Source: CSDN
Original: https: //blog.csdn.net/VcosmosV/article/details/83022682
copyright notice : This article is a blogger original article, reproduced, please attach Bowen link!