Trying to set Nvidia container runtime in Jetson does not make it default

Hello,

I followed this (Installing the NVIDIA Container Toolkit — NVIDIA Container Toolkit 1.14.5 documentation ) to use nvidia-container-runtime toolkit for containerd .

I ended up with this config.toml file:

[plugins]

  [plugins."io.containerd.grpc.v1.cri"]
    max_container_log_line_size = -1
    sandbox_image = "k8s.gcr.io/pause:3.3"

    [plugins."io.containerd.grpc.v1.cri".containerd]
      default_runtime_name = "runc"
      disable_snapshot_annotations = true
      discard_unpacked_layers = false
      ignore_blockio_not_enabled_errors = false
      ignore_rdt_not_enabled_errors = false
      no_pivot = false
      snapshotter = "native"

      [plugins."io.containerd.grpc.v1.cri".containerd.runtimes]

        [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia]
          runtime_engine = ""
          runtime_root = ""
          runtime_type = "io.containerd.runc.v2"

          [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia.options]
            BinaryName = "/usr/bin/nvidia-container-runtime"
            systemdCgroup = true

        [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
          runtime_engine = ""
          runtime_root = ""
          runtime_type = "io.containerd.runc.v2"

          [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
            systemdCgroup = true

    [plugins."io.containerd.grpc.v1.cri".registry]

      [plugins."io.containerd.grpc.v1.cri".registry.mirrors]

        [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
          endpoint = ["https://registry-1.docker.io"]

As you can see, eventhough it added the nvidia-container-runtime as a plugin, it did not set it as default which stood as runc.

Should I understand that I have to change it manually ?

Thanks

Hi,

Do you set the below setting to /etc/docker/daemon.json?

{
    "runtimes": {
        "nvidia": {
            "path": "/usr/bin/nvidia-container-runtime",
            "runtimeArgs": []
         } 
    },
    "default-runtime": "nvidia" 
}

Thanks.