In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Preparatory work
1. Check whether GPU supports CUDA
Lspci | grep-I nvidia
two。 View Linux version
Uname-m & & cat / etc/*release
Nvidia driver
1. Uninstall the original N card driver first
# for case1: original driver installed by apt-get:sudo apt-get remove-- purge nvidia*#for case2: original driver installed by runfile:sudo chmod + x * .runsudo. / NVIDIA-Linux-x86_64-384.59.run-- uninstall
two。 Disable nouveau driver
Sudo gedit / etc/modprobe.d/blacklist.conf
Add at the end of the text:
Blacklist nouveauoptions nouveau modeset=0
Then execute:
Sudo update-initramfs-u
After restarting, you can check whether nouveau is running:
Lsmod | grep nouveau # No output means the disable takes effect
3. Disable the X-Window service
Sudo service lightdm stop # this closes the graphical interface
Press Ctrl-Alt+F1 to enter the command line interface and enter the user name and password to log in.
4. Command line installation driver
Drive URL https://www.nvidia.cn/Download/index.aspx?lang=cn
# Grant execution permission to the driver run file: the parameter after sudo chmod + x NVIDIA-Linux-x86_64-384.59.run# is very important and cannot be omitted: sudo. / NVIDIA-Linux-x86_64-384.59.run-no-opengl-files
5.Driver Test:
Nvidia-smi # if the information list of GPU is listed, the driver is installed successfully
Nvidia-settings # if the settings dialog box pops up, it also indicates that the driver is installed successfully
CUDA installation
1. Download the CUDA of the corresponding system
URL http://developer.nvidia.com/cuda-downloads Select runfile installation
two。 Installation
Sudo sh cuda__linux.run
After you start the installation, you need to read the instructions, which can be done directly using Ctrl + C, or slowly using the spacebar. The following are the installation options:
(agree to the terms and conditions, you must agree to continue with the installation) accept/decline/quit: accept (do not install the driver here, because the latest driver has already been installed, otherwise the old version of the video card driver may be installed, resulting in repeated login) Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 410.48? (y) es/ (n) o / (Q) uit: nInstall the CUDA 10.0 Toolkit? (whether to install CUDA 10 It must be installed here) (y) es/ (n) o / (Q) uit: yEnter Toolkit Location (installation path, use the default, just enter directly) [default is / usr/local/cuda-10.0]: Do you want to install a symbolic link at / usr/local/cuda? (agree to create a soft link) (y) es/ (n) o / (Q) uit: yInstall the CUDA 10.0 Samples? (no installation test is required ) (y) es/ (n) o / (Q) uit: nInstalling the CUDA Toolkit in / usr/local/cuda-10.0... (start installation)
3. Configure environment variables
Sudo gedit / .bashrc
Add at the end
Export PATH=/usr/local/cuda-8.0/bin:$PATHexport LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
Update
Source / .bashrc
4. Verify installation
View cuda version
Nvcc-VCUDA Sample test: # compile and test device deviceQuery:cd / usr/local/cuda-8.0/samples/1_Utilities/deviceQuerymake./deviceQuery# compile and test bandwidth bandwidthTest:cd.. / bandwidthTestmake./bandwidthTest
If the final result of both tests is Result = PASS, CUDA is installed successfully.
* 5.CUDA uninstall
Enter on the command line
Sudo apt-get remove cuda sudo apt-get autocleansudo apt-get remove cuda*
Then change to usr/local/ in the directory
Cd / usr/local/sudo rm-r cuda-9.1
CuDNN installation
Download the corresponding version of cuDNN https://developer.nvidia.com/cudnn
Tar xvzf cudnn-9.2-linux-x64-v7.1sudo cp-P cuda/include/cudnn.h / usr/local/cuda/includesudo cp-P cuda/lib64/libcudnn* / usr/local/cuda/lib64sudo chmod astatr / usr/local/cuda/include/cudnn.h / usr/local/cuda/lib64/libcudnn*sudo ldconfig
Reference
Https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions
Summary
The above is the tutorial of installing nvidia driver + CUDA+cuDNN in Ubuntu16.04 introduced by Xiaobian. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website!
If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.