devices
devices copied to clipboard
feat: support --device-list-strategy=volume-mounts
Add support for pass devices via volume-mounts
.
https://github.com/NVIDIA/k8s-device-plugin#configuration-option-details
The DEVICE_LIST_STRATEGY flag allows one to choose which strategy the plugin will use to advertise the list of GPUs allocated to a container. This is traditionally done by setting the NVIDIA_VISIBLE_DEVICES environment variable as described here. This strategy can be selected via the (default) envvar option. Support has been added to the nvidia-container-toolkit to also allow passing the list of devices as a set of volume mounts instead of as an environment variable. This strategy can be selected via the volume-mounts option. Details for the rationale behind this strategy can be found here.
references:
- https://github.com/NVIDIA/k8s-device-plugin/blob/5c4e43d1b84afeb5a0f77492847e9ecbf35aba16/internal/plugin/server.go#L309C1-L312C3