https://github.com/h2oai/deepwater#pre-release-docker-image
GPU-Enabled Docker Image (Recommended)http://blog.idcf.jp/entry/nvidia-docker
To use the GPU-enabled Docker image you need a Linux machine with at least one GPU, a GPU driver, and with docker and nvidia-docker installed.
nvidia-dockerはNVIDIAのハードウェアを活用できるGPUコンテナを自動で認識し、セットアップできるようなToolkitを搭載した、DockerをラッピングしたCLI(プラグイン)です。
nvidia-dockerを動作させるには、次の3つのコンポーネントをインストールする必要があります。
・GPUドライバ
・Docker
・nvidia-docker
では、入れましょう。
https://github.com/NVIDIA/nvidia-docker
$ curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
sudo apt-key add -
$ distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
$ curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
$ sudo apt-get update
$ sudo apt-get install -y nvidia-docker2
$ sudo pkill -SIGHUP dockerd
$ sudo docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi
Unable to find image 'nvidia/cuda:latest' locally
latest: Pulling from nvidia/cuda
22dc81ace0ea: Pull complete
1a8b3c87dba3: Pull complete
91390a1c435a: Pull complete
07844b14977e: Pull complete
b78396653dae: Pull complete
59876c12b10f: Pull complete
92ea808ac02a: Pull complete
569bd533d309: Pull complete
2db1f6a96615: Pull complete
2b9d78c87b7c: Pull complete
Digest: sha256:74570aef804e30486eb74b284fd3091d14ca7144736c44fb48c13e5e6afb963f
Status: Downloaded newer image for nvidia/cuda:latest
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.48 Driver Version: 390.48 |
|-------------------------------+----------------------+----------------------+
| 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 480 Off | 00000000:03:00.0 N/A | N/A |
| 57% 81C P12 N/A / N/A | 181MiB / 1469MiB | N/A Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GTX 106... Off | 00000000:04:00.0 Off | N/A |
| 27% 32C P8 7W / 120W | 2MiB / 3019MiB | 1% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 Not Supported |
+-----------------------------------------------------------------------------+
入りました。
一般ユーザーではダメですと。
$ docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.37/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
続く。
0 件のコメント:
コメントを投稿