Skip to content

Commit

Permalink
Update pve-lxc-cuda-pytorch.md
Browse files Browse the repository at this point in the history
  • Loading branch information
myml authored Nov 5, 2023
1 parent a455d7e commit 7cb5bef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/posts/pve-lxc-cuda-pytorch.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ cr--r--r-- 1 root root 235, 2 Mar 19 21:09 nvidia-cap2
其中 195、506、235 就是设备号,需要把设备号追加到 lxc 容器的配置文件 `/etc/pve/lxc/103.conf` (103 是容器 id,要改成你自己的容器 id) 并添加设备挂载配置项,如:

```txt
lxc.cgroup.devices.allow: c 195:* rwm
lxc.cgroup.devices.allow: c 506:* rwm
lxc.cgroup.devices.allow: c 235:* rwm
lxc.cgroup2.devices.allow: c 195:* rwm
lxc.cgroup2.devices.allow: c 506:* rwm
lxc.cgroup2.devices.allow: c 235:* rwm
lxc.mount.entry: /dev/nvidia0 dev/nvidia0 none bind,optional,create=file
lxc.mount.entry: /dev/nvidiactl dev/nvidiactl none bind,optional,create=file
lxc.mount.entry: /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file
Expand Down

0 comments on commit 7cb5bef

Please sign in to comment.