nexdrew/rekcod

Support for other runtimes [e.g. nvidia, kata]

Closed this issue · 4 comments

jk commented

I'm using the nvidia runtime for getting direct access to GPUs from inside a container. It's readable via docker inspect in the Runtime field:

[
  {
      ...
      "UTSMode": "",
      "UsernsMode": "",
      "ShmSize": 67108864,
      "Runtime": "nvidia",   <--
      "ConsoleSize": [
        0,
        0
      ],
      ...
  }
]

and should be transformed to docker run --runtime=nvidia ….

The same applies to kata container runtime.

@jk Great feature request, thanks for reporting!

It's been a while since rekcod was originally written, I imagine there could be several other container properties that are currently missing/ignored, but this is a good start. Do you know if there are any other properties related to HostConfig.Runtime that might be useful/needed with it?

@jk I added support for the --runtime flag in rekcod@2.2.0. Please give it a shot and let me know if that resolves your issue. Thanks!

$ npx rekcod <container>

or

$ docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock nexdrew/rekcod:2.2.0 <container>
jk commented

@jk I added support for the --runtime flag in rekcod@2.2.0. Please give it a shot and let me know if that resolves your issue. Thanks!

@nexdrew I use the docker container and it works, thanks for the quick turnaround.

From the changes in your PR it should be pretty easy for me to add some more.

Awesome, thanks for reporting.

And yes, feel free to add more - PRs are welcomed!