タイトル : GPUマシンをUbuntuに CUDA環境
更新日 : 2024-05-04
カテゴリ : プログラミング
CUDA環境
プロプライエタリなNVIDIAを入れるようにインストールしたからかな、NVIDIAちゃんと入っているように見えますね。
$ lspci | grep -i nvidia
0000:01:00.0 VGA compatible controller: NVIDIA Corporation AD107 [GeForce RTX 4060] (rev a1)
0000:01:00.1 Audio device: NVIDIA Corporation Device 22be (rev a1)
$ lsmod | grep nouveau
$ lsmod | grep nvidia
nvidia_uvm 1806336 0
nvidia_drm 94208 7
nvidia_modeset 1314816 8 nvidia_drm
nvidia 56815616 286 nvidia_uvm,nvidia_modeset
video 73728 2 dell_wmi,nvidia_modeset
$
nvidia-smi もあるし。
$ nvidia-smi
Sat May 4 10:58:47 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.171.04 Driver Version: 535.171.04 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 4060 Off | 00000000:01:00.0 On | N/A |
| 31% 34C P8 N/A / 115W | 178MiB / 8188MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 3106 G /usr/lib/xorg/Xorg 67MiB |
| 0 N/A N/A 3427 G /usr/bin/gnome-shell 87MiB |
+---------------------------------------------------------------------------------------+
$
CUDA ToolkitもUbuntuさんにおまかせして、aptで入れてみます
sudo apt install nvidia-cuda-toolkit
とりあえず入ったのかな
$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Fri_Jan__6_16:45:21_PST_2023
Cuda compilation tools, release 12.0, V12.0.140
Build cuda_12.0.r12.0/compiler.32267302_0
$