Install nVidia graphics card driver and cuda/cudnn in ubuntu 16.04.

Source: Internet
Author: User

Install nVidia graphics card driver and cuda/cudnn in ubuntu 16.04.

Recommended new version installation tutorial

Http://blog.csdn.net/chenhaifeng2016/article/details/78874883


To install the deep learning framework, you must use cuda/cudnn (GPU) to accelerate computing. To install cuda/cudnn, you must first install the nvidia graphics card driver.


During the installation process, I encountered a driver conflict and had to re-install the operating system.

The information on the internet is messy, and many of them are reprinted. Some versions of the operating system are too low. Now I write down the entire process for reference by people who encounter the same problem.


By default, the third-party open-source driver nouveau is installed in ubuntu 16.04. to install the nvidia graphics driver, you must first disable nouveau. Otherwise, the nvidia graphics driver cannot be installed due to a conflict.

Edit the file blacklist. conf

Sudo vim/etc/modprobe. d/blacklist. conf


Insert the following two lines at the end of the file:

Blacklist nouveau

Options nouveau modeset = 0


Update System

Sudo update-initramfs-u


Restart the system (Be sure to restart)


Verify that nouveau is disabled

Lsmod | grep nouveau


No information is displayed, indicating that nouveau has been disabled. Next, you can install the nvidia graphics driver.


Press ctrl + alt + f1 to Enter text mode

Sudo service lightdm stop

Sudo./cuda_8.0.61_375.26_linux.run


Do not install opengl. Otherwise, loop logon may occur even if the installation is successful (at least I have encountered such a situation ).

Do not install the/usr/local/cuda symbolic connection (this step is optional)

Sudo service lightdm start



Finally copy the header file of cudnn to/usr/local/cuda-8.0/include, library file copy to/usr/local/cuda-8.0/lib64

Set the environment variable file. bashrc or profile

Export PATH =/usr/local/The cuda-8.0/bin: $ PATH

Export LD_LIBRARY_PATH =/usr/local/cuda-8.0/lib64: # LD_LIBRARY_PATH

Update Environment Variables

Souce/etc/profile

Installation is complete.

Next, you can install the tensorflow, caffe, and mxnet deep learning frameworks.




Top
1
Step on
0
View comments

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.