ubuntu16.04-cuda10.2-cudnn7.6.4 安装

1.禁用nouveau

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

blacklist nouveau

sudo update-initramfs -u

reboot

lsmod | grep nouveau

2.停止可视化桌面
sudo telinit 3

3.安装驱动
sudo chmod a+x NVIDIA-Linux-x86_64-440.44.run
sudo sh ./NVIDIA-Linux-x86_64-440.44.run --no-opengl-files
显卡驱动安装完成。

其实在cuda里面也自带显卡驱动,不需要单独安装.

更新安装源
cp -i /etc/apt/sources.list /etc/apt/sources.list_backup
vim /etc/apt/sources.list

# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

apt-get update

如果报错
echo ‘nameserver 8.8.8.8’ >> /etc/resolv.conf
echo ‘nameserver 223.5.5.5’ >> /etc/resolv.conf
echo ‘nameserver 223.6.6.6’ >> /etc/resolv.conf

安装其他软件
apt-get install build-essential gcc g++ make binutils linux-headers-uname -r -y

  1. cuda cudnn安装

下载:cuda
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=runfilelocal

wget http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run
sudo sh cuda_10.2.89_440.33.01_linux.run

下载:cudnn
https://developer.nvidia.com/rdp/cudnn-download

wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-Linux-x86_64.sh

bash Anaconda3-5.3.1-Linux-x86_64.sh -b -p /usr/local/anaconda

anaconda 最好安装在自己home下

你可能感兴趣的:(python)