NVIDIA / k8s-dra-driver

Dynamic Resource Allocation (DRA) for NVIDIA GPUs in Kubernetes
Apache License 2.0
195 stars 36 forks source link

Update logic to set environment for calls out to nvidia-smi #110

Closed klueska closed 2 months ago

klueska commented 2 months ago

Previously, we were setting the envvars needed for nvidia-smi in the plugin's environment itself. This caused errors, however, when shelling out to other binaries that didn't need these envvars set.

This change pushes the setting of the envvars into the actual exec call for nvidia-smi instead of setting them in the plugin's environment itself.

Closes #106

klueska commented 2 months ago

Just tested this before merging and it doesn't seem to work:

error starting MPS control daemon: error setting compute mode: error running nvidia-smi: exec: "nvidia-smi": executable file not found in $PATH
klueska commented 2 months ago

I think wrapping the call in a "bash -c" would likely work.