您的位置:首页 > 其它

ubuntu16.04 安装GeForce1080驱动+CUDA8.0

2017-07-24 16:22 302 查看
1.首先安装驱动:

sudo add-apt-repository ppa:graphics-drivers/ppa


第一次运行出现如下的警告:

第一次运行出现如下的警告:

Fresh drivers from upstream, currently shipping Nvidia.

Current Status

We currently recommend: nvidia−361 nvidia-361 , Nvidia’s current long lived branch.

For GeForce 8 and 9 series GPUs use nvidia−340nvidia-340

For GeForce 6 and 7 series GPUs use nvidia−304nvidia-304

What we’re working on right now:

– Normal driver updates– Investigating how to bring this goodness to distro on a cadence.

WARNINGS:

This PPA is currently in testing, you should be experienced with packaging before you dive in here. Give us a few days to sort out the kinks.

Volunteers welcome! See also: https://github.com/mamarley/nvidia-graphics-drivers/

http://www.ubuntu.com/download/desktop/contribute

更多信息: https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa

按回车继续或者 Ctrl+c 取消添加

sudo apt-get update
sudo apt-get install nvidia-367
sudo apt-get install mesa-common-dev
sudo apt-get install freeglut3-dev


2.CUDA8.0

官网下载对应版本的run文件

sudo sh cuda_8.0.27_linux.run


一直回车直到出现接下来的场景选择:

Do you accept the previously read EULA?accept/decline/quit: accept

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 361.62?(y)es/(n)o/(q)uit: n

Install the CUDA 8.0 Toolkit?(y)es/(n)o/(q)uit: y

Enter Toolkit Location[ default is /usr/local/cuda-8.0 ]:

Do you want to install a symbolic link at /usr/local/cuda?(y)es/(n)o/(q)uit: y

Install the CUDA 8.0 Samples?(y)es/(n)o/(q)uit: y

Enter CUDA Samples Location[ default is /home/textminer ]:

Installing the CUDA Toolkit in /usr/local/cuda-8.0 …

Installing the CUDA Samples in /home/textminer …

Copying samples to /home/textminer/NVIDIA_CUDA-8.0_Samples now…

Finished copying samples.

===========

= Summary =

Driver: Not Selected

Toolkit: Installed in /usr/local/cuda-8.0
4000

Samples: Installed in /home/textminer

Please make sure that

– PATH includes /usr/local/cuda-8.0/bin

– LD_LIBRARY_PATH includes /usr/local/cuda-8.0/lib64, or, add /usr/local/cuda-8.0/lib64 to /etc/ld.so.conf and run ldconfig as root

To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-8.0/bin

Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-8.0/doc/pdf for detailed information on setting up CUDA.

***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 361.00 is required for CUDA 8.0 functionality to work.

To install the driver using this installer, run the following command, replacing with the name of this run file:

sudo .run -silent -driver

Logfile is /opt/temp//cuda_install_6583.log

安装完毕后,再声明一下环境变量,并将其写入到 ~/.bashrc 的尾部:

export PATH=/usr/local/cuda-8.0/binPATH:+:$PATHexportLDLIBRARYPATH=/usr/local/cuda−8.0/lib64{LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

最后再来测试一下CUDA,运行:

nvidia-smi
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: