apt-get update
apt-get install -y curl openssh-server tmux git
systemctl start ssh
systemctl enable ssh
-
apt-get remove nvidia-* -y -
安装最新驱动,32bit兼容可以不要,其他一路yes https://www.nvidia.cn/Download/index.aspx?lang=cn
-
apt-get install -y nvidia-container-toolkit -
注册 runtime,重启docker
sudo tee /etc/docker/daemon.json <<EOF
{
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
}
}
EOF
sudo pkill -SIGHUP dockerd
- 运行 docker run --rm --gpus all nvidia/cuda:10.1-base nvidia-smi ,注意docker的cuda版本和nvidia-smi的cuda版本一致
podman up
podman generate systemd rmwl-ubuntu-rmw | tee /usr/lib/systemd/system/podman-rmw.service
systemctl daemon-reload
systemctl enable podman-rmw --now