深度学习入门教程-ubuntu18.04安装CUDA 10
深度学习入门教程-安装CUDA 10
说明:
- 介绍如何安装CUDA 10
环境:
- 系统:ubuntu 18.04
- 显卡:GTX1080Ti
安装PPA:
- 安装依赖:
$ sudo apt-get install linux-headers-$(uname -r)
- 进入官方找到合适版本:https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/
- 我们选择这个cuda-repo-ubuntu1804_10.1.168-1_amd64.deb版本
- 安装:
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.168-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo apt update
sudo dpkg -i cuda-repo-ubuntu1804_10.1.168-1_amd64.deb
sudo apt update
sudo apt install -y cuda
- 增加路径
export PATH=/usr/local/cuda-10.1/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64:$LD_LIBRARY_PATH
- 启用环境
source ~/.bashrc
检测:
- 执行命令:
nvcc --version
- 效果如下:
ubuntu@AiDLHost:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:17_PST_2019
Cuda compilation tools, release 10.1, V10.1.105
- 查看cuda版本也可以执行
cat /usr/local/cuda/version.txt
参考:
- https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
- https://gist.github.com/bogdan-kulynych/f64eb148eeef9696c70d485a76e42c3a
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号