Docker has an option to use nvidia GPUs (docker run --gpus). It's great if we can use it in nerdctl run as well.
I believe we can make it in the same way as ctr run --gpus option (containerd/containerd#2330), using github.com/containerd/containerd/contrib/nvidia:
https://github.com/crosbymichael/containerd/blob/834f58bd0cbeb1e3371f583b745ef0ad2fca238e/cmd/ctr/commands/run/run_unix.go#L189-L191
if context.IsSet("gpus") {
opts = append(opts, nvidia.WithGPUs(nvidia.WithDevices(context.Int("gpus")), nvidia.WithAllCapabilities))
}
Docker has an option to use nvidia GPUs (
docker run --gpus). It's great if we can use it innerdctl runas well.I believe we can make it in the same way as
ctr run --gpusoption (containerd/containerd#2330), usinggithub.com/containerd/containerd/contrib/nvidia:https://github.com/crosbymichael/containerd/blob/834f58bd0cbeb1e3371f583b745ef0ad2fca238e/cmd/ctr/commands/run/run_unix.go#L189-L191