#配置如下
Ubuntu 18.04 LTS
python 3.6
nvidia driver 390
cuda 9.0
cudnn 7.1
tensorflow 1.5
安装显卡驱动
查看NVIDIA driver 推荐。
$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001C81sv00001028sd000011C0bc03sc00i00
vendor : NVIDIA Corporation
model : GP107 [GeForce GTX 1050]
driver : nvidia-driver-396 - third-party free recommended
driver : nvidia-driver-390 - third-party free
driver : xserver-xorg-video-nouveau - distro free builtin
安装:
$ sudo ubuntu-drivers autoinstall
按照推荐的驱动安装,如果失败,请添加NVIDIA driver源仓库然后在安装,安装命令如下:
$ sudo add-apt-repository ppa:graphics-drivers/ppa
测试安装是否成功(提示无法找到的时候,可以先试试重启机器再测试)
$ nvidia-smi
Tue May 22 12:14:56 2018
±----------------------------------------------------------------------------+
| NVIDIA-SMI 390.59 Driver Version: 390.59 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|=++==============|
| 0 GeForce GTX 1050 Off | 00000000:01:00.0 Off | N/A |
| 20% 39C P0 N/A / 75W | 444MiB / 200