ubuntu安装nvidia-docker
nvidia-docker官方安装教程点这里一、安装dockercurl https://get.docker.com | sh \&& sudo systemctl --now enable docker二、设置源distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \&& curl -s -L https:/
·
nvidia-docker官方安装教程点这里
一、安装docker
curl https://get.docker.com | sh \
&& sudo systemctl --now enable docker
二、设置源
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
&& curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
&& 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
四、重启docker
sudo systemctl restart docker
五、验证
sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
执行以上命令出现以下控制台输出则安装成功
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.51.06 Driver Version: 450.51.06 CUDA Version: 11.0 |
|-------------------------------+----------------------+----------------------+
| 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 Tesla T4 On | 00000000:00:1E.0 Off | 0 |
| N/A 34C P8 9W / 70W | 0MiB / 15109MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
更多推荐
所有评论(0)