確認方法のコマンド
①NVRNバージョン確認
$ cat /proc/driver/nvidia/version
②nvcc: NVIDIA (R) Cuda compiler driverリリース番号確認
$ nvcc -V
③使用状況と全部確認
$ nvidia-smi -l
インストール(deb(network))
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
sudo apt update
sudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
sudo apt update
sudo apt install cuda cuda-drivers
sudo reboot
sudo reboot
rm cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
~/.bashrc の末尾に追加
export PATH="/usr/local/cuda/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"
export PATH="/usr/local/cuda/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"
ログオフして再度ログイン
結果
①
NVRM version: NVIDIA UNIX x86_64 Kernel Module 384.98 Thu Oct 26 15:16:01 PDT 2017
GCC version: gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2)
GCC version: gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2)
②
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17
③
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17
③
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.98 Driver Version: 384.98 |
|-------------------------------+----------------------+----------------------+
| 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 108... Off | 00000000:01:00.0 On | N/A |
| 23% 40C P5 21W / 250W | 428MiB / 11171MiB | 26% Default |
+-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1006 G /usr/lib/xorg/Xorg 180MiB |
| 0 1700 G compiz 150MiB |
| 0 3033 G /usr/lib/xxxx 2MiB |
| 0 7696 G /opt/xxxx 24MiB |
| 0 11236 G unity-control-center 2MiB |
| 0 11414 G ...-token=xxxx 64MiB |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.98 Driver Version: 384.98 |
|-------------------------------+----------------------+----------------------+
| 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 108... Off | 00000000:01:00.0 On | N/A |
| 23% 40C P5 21W / 250W | 428MiB / 11171MiB | 25% Default |
+-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1006 G /usr/lib/xorg/Xorg 180MiB |
| 0 1700 G compiz 150MiB |
| 0 3033 G /usr/lib/xxxx 2MiB |
| 0 7696 G /opt/xxxx 24MiB |
| 0 11236 G unity-control-center 2MiB |
| 0 11414 G ...-token=xxxx 64MiB |
+-----------------------------------------------------------------------------+
Mon Dec 11 12:05:37 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.98 Driver Version: 384.98 |
|-------------------------------+----------------------+----------------------+
| 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 108... Off | 00000000:01:00.0 On | N/A |
| 23% 40C P5 21W / 250W | 428MiB / 11171MiB | 26% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1006 G /usr/lib/xorg/Xorg 180MiB |
| 0 1700 G compiz 150MiB |
| 0 3033 G /usr/lib/xxxx 2MiB |
| 0 7696 G /opt/xxxx 24MiB |
| 0 11236 G unity-control-center 2MiB |
| 0 11414 G ...-token=xxxx 64MiB |
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.98 Driver Version: 384.98 |
|-------------------------------+----------------------+----------------------+
| 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 108... Off | 00000000:01:00.0 On | N/A |
| 23% 40C P5 21W / 250W | 428MiB / 11171MiB | 26% Default |
+-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1006 G /usr/lib/xorg/Xorg 180MiB |
| 0 1700 G compiz 150MiB |
| 0 3033 G /usr/lib/xxxx 2MiB |
| 0 7696 G /opt/xxxx 24MiB |
| 0 11236 G unity-control-center 2MiB |
| 0 11414 G ...-token=xxxx 64MiB |
+-----------------------------------------------------------------------------+
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.98 Driver Version: 384.98 |
|-------------------------------+----------------------+----------------------+
| 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 108... Off | 00000000:01:00.0 On | N/A |
| 23% 40C P5 21W / 250W | 428MiB / 11171MiB | 25% Default |
+-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1006 G /usr/lib/xorg/Xorg 180MiB |
| 0 1700 G compiz 150MiB |
| 0 3033 G /usr/lib/xxxx 2MiB |
| 0 7696 G /opt/xxxx 24MiB |
| 0 11236 G unity-control-center 2MiB |
| 0 11414 G ...-token=xxxx 64MiB |
+-----------------------------------------------------------------------------+
Mon Dec 11 12:05:37 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.98 Driver Version: 384.98 |
|-------------------------------+----------------------+----------------------+
| 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 108... Off | 00000000:01:00.0 On | N/A |
| 23% 40C P5 21W / 250W | 428MiB / 11171MiB | 26% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1006 G /usr/lib/xorg/Xorg 180MiB |
| 0 1700 G compiz 150MiB |
| 0 3033 G /usr/lib/xxxx 2MiB |
| 0 7696 G /opt/xxxx 24MiB |
| 0 11236 G unity-control-center 2MiB |
| 0 11414 G ...-token=xxxx 64MiB |
+-----------------------------------------------------------------------------+
参照:
Ubuntu 16.04へのCUDAインストール方法
UbuntuにNvidia GPUのDriver + CUDAをInstallする(GTX1080対応版)
https://qiita.com/conta_/items/d639ef0068c9b7a0cd12
ありがとうございました。