nri icon indicating copy to clipboard operation
nri copied to clipboard

Modifying nvidia gpu device is not possible?

Open sehkmg opened this issue 4 months ago • 1 comments

Hello, I'd like to modify nvidia gpu device assignment with NRI.

I was able to modify or add environment variable with adjust.AddEnv and adjust.RemoveEnv function in func (p *plugin) CreateContainer().

However, modifying nvidia gpu device assignment is not possible with below reasons.

  1. I was not able to modify "NVIDIA_VISIBLE_DEVICES" environment variable.
  2. adjust.RemoveDevice function is not working for nvidia gpu devices.

I mean in above, adjust.AddDevice function is working to add nvidia gpu device additionally to container. However, removing is not possible with adjust.RemoveDevice function.

Do you have any idea on this kind of behavior? Any comments are welcome!

sehkmg avatar Aug 26 '25 13:08 sehkmg

@sehkmg Can you describe your environment in a bit more detail ? How do your containers get assigned to the GPU devices in the first place ? K8s Device plugin ? DRA driver ? Something else ?

Also, can you tell a bit more about what (logic) do you try to achieve with the NRI plugin ? And how do you plan to achieve that with the plugin ? And considering (how) the original GPU device assignment (works), should that plan work for the logic you try to implement ?

klihub avatar Sep 08 '25 15:09 klihub