ubuntu18.04.2 1080ti配置docker深度学习环境

1 安裝或更新NVIDIA驱动

  • 安装之前先卸载已经存在的驱动版本
    sudo apt-get purge nvidia*
  • 只有在禁用掉 nouveau 后才能顺利安装 NVIDIA 显卡驱动,禁用方法就是在 /etc/modprobe.d/blacklist-nouveau.conf 文件中添加一条禁用命令,首先需要打开该文件,通过以下命令打开
    sudo vim /etc/modprobe.d/blacklist.conf
    按G后跳转到最后一行,追加blacklist nouveau
    :wq保存退出
    sudo update-initramfs -u执行该命令后生效
  • 重启后关闭桌面服务,安装驱动
    sudo reboot
    sudo service lightdm stop
  • 使用标准Ubuntu仓库进行自动化安装显卡驱动
    查看推荐驱动
    ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001B06sv00001043sd000085F1bc03sc00i00
vendor   : NVIDIA Corporation
model    : GP102 [GeForce GTX 1080 Ti]
driver   : nvidia-driver-410 - third-party free
driver   : nvidia-driver-396 - third-party free
driver   : nvidia-driver-430 - third-party free recommended
driver   : nvidia-driver-415 - third-party free
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-418 - third-party free
driver   : xserver-xorg-video-nouveau - distro free builtin

输入以下命令自动安装推荐版本的驱动
sudo proxychains4 ubuntu-drivers autoinstall

使用PPA仓库进行自动化安装最新版本

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

ubuntu-drivers devices  #查看自己的显卡及可以安装的驱动版本,显示如下:
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001B06sv00001043sd000085F1bc03sc00i00
vendor   : NVIDIA Corporation
model    : GP102 [GeForce GTX 1080 Ti]
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-418 - third-party free
driver   : nvidia-driver-410 - third-party free
driver   : nvidia-driver-415 - third-party free
driver   : nvidia-driver-430 - third-party free recommended
driver   : nvidia-driver-396 - third-party free
driver   : xserver-xorg-video-nouveau - distro free builtin
	
sudo apt install nvidia-driver-430

sudo proxychains4 apt install nvidia-driver-430

posted @ 2019-05-24 16:21  GMonster  阅读(393)  评论(0编辑  收藏  举报