While testing #2330 with a custom rootfs, I got the following:
$ ctr run --rm --gpus 0 --rootfs ~/runc/ubuntu test /bin/bash
ctr: OCI runtime create failed: container_linux.go:336: starting container process caused "process_linux.go:402: container init caused \"process_linux.go:385: running prestart hook 0 caused \\\"error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: mount error: mount operation failed: /run/containerd/io.containerd.runtime.v1.linux/default/test/rootfs/proc/driver/nvidia: no such file or directory\\\\n\\\"\"": unknown
This is not the right rootfs, I believe this path will only work with the containerd snapshotter:
|
func (t *templateContext) rootfs() string { |
|
return filepath.Join(t.state.Bundle, "rootfs") |
|
} |
Instead, the OCI runtime spec needs to be read to retrieve
root.path. Unless we turn this
rootfs into a symlink to the spec's rootfs, that would also work I guess and would prevent the spec parsing in this command.
While testing #2330 with a custom rootfs, I got the following:
This is not the right rootfs, I believe this path will only work with the containerd snapshotter:
containerd/cmd/containerd/command/oci-hook.go
Lines 91 to 93 in c1e1f3d
Instead, the OCI runtime spec needs to be read to retrieve
root.path. Unless we turn thisrootfsinto a symlink to the spec's rootfs, that would also work I guess and would prevent the spec parsing in this command.