cuda及nvidia驱动安装

cuda及nvidia驱动安装


1. Install nvidia driver

  • dependences
1
2
3
apt install dkms build-essential linux-headers-amd64(or linux-headers-$(uname -r))
dpkg --add-architecture i386
apt install lib32z1 lib32ncurses5
  • disable nouveau module(optional)

    • vim /etc/modprobe.d/blacklist-nouveau.conf
    1
    2
    blacklist nouveau
    options nouveau modeset=0
    • update module
    1
    update-initramfs -u
  • execute installer

1
2
service lightdm stop // service gdm3 stop
sh NVIDIA-Linux-x86_64-XX.run -no-opengl-files

2. Install cuda/cudnn

1
2
3
sh cuda_XX.run
echo "/usr/local/cuda/lib64">>/etc/ld.so.conf.d/libcuda.conf
ldconfig

3. Issues

  • nvidia driver 登录管理器循环登录问题
1
2
// bios 安全登录问题
# sh ./NVIDIA-xxx.run -no-x-check -no-nouveau-check -no-opengl-files
  • cuda install Can't locate InstallUtils.pm in @INC
1
export PERL5LIB=.