update
This commit is contained in:
21
README.md
21
README.md
@@ -77,6 +77,7 @@ curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-contai
|
||||
| sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y nvidia-container-toolkit
|
||||
sudo apt-get install nvidia-container-runtime -y
|
||||
```
|
||||
|
||||
Configure Docker to use Nvidia driver
|
||||
@@ -86,6 +87,26 @@ sudo nvidia-ctk runtime configure --runtime=docker
|
||||
sudo systemctl restart docker
|
||||
```
|
||||
|
||||
实际上这个操作修改了/etc/docker/daemon.json文件:
|
||||
|
||||
```shell
|
||||
{
|
||||
"registry-mirrors": [
|
||||
"https://0b27f0a81a00f3560fbdc00ddd2f99e0.mirror.swr.myhuaweicloud.com",
|
||||
"https://ypzju6vq.mirror.aliyuncs.com",
|
||||
"https://registry.docker-cn.com",
|
||||
"http://hub-mirror.c.163.com",
|
||||
"https://docker.mirrors.ustc.edu.cn"
|
||||
],
|
||||
"runtimes": {
|
||||
"nvidia": {
|
||||
"args": [],
|
||||
"path": "nvidia-container-runtime"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
配置完成之后:
|
||||
|
||||
```shell
|
||||
|
||||
@@ -74,7 +74,6 @@ c.DockerSpawner.extra_create_kwargs.update({
|
||||
# 'JUPYTERHUB_CORS': '{"allow_origin_pat": "https?://.*\\.example\\.com"}'
|
||||
# }
|
||||
|
||||
|
||||
# GPU 和网络配置
|
||||
c.DockerSpawner.extra_host_config = {
|
||||
'runtime': 'nvidia'
|
||||
|
||||
Reference in New Issue
Block a user