Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Externalize Nvidia device plugin #8330

Closed
notnoop opened this issue Jul 1, 2020 · 1 comment · Fixed by #10796
Closed

Externalize Nvidia device plugin #8330

notnoop opened this issue Jul 1, 2020 · 1 comment · Fixed by #10796

Comments

@notnoop
Copy link
Contributor

notnoop commented Jul 1, 2020

Consider externalizing the nvidia GPU device plugin, to ease targeting alpine and musl-based Linux distributions, and avoid incidental interactions in hosts with old nvidia drivers.

Background

The nvidia plugin depends on https://github.com/NVIDIA/gpu-monitoring-tools, a cgo wrapper library for invoking nvml C-based API for monitoring and managing the nvidia drivers. The nvml C-based library needs to be a shared dynamic library, it's not appropriate for static linking as it's dependent on installed drivers. To avoid requiring the library presence/installation, the library uses some dynamic linking flags to ignore unresolved symbols -ldl -Wl,--unresolved-symbols=ignore-in-object-files.

This presents few challenges:

First, CGO complicates the static compilation and cross compilation story. Though, when targeting linux, we already require CGO for libcontainer, so at least that's unavoidable.

Second, the dynamic linking technique doesn't work on alpine and musl-based Linux distributions. See #5535 and #5643 for more details.

Third it makes nomad binary fragile and susceptible to faults due to incompatible nvidia drivers being installed or to environment variables unexpectedly being set (e.g. LD_BIND_NOW).

Recommendation

Given that the nvidia driver is not a dominant use case, I'd recommend externalizing the nvidia plugin. This will ease managing our compilation flow, and make the binary robust. Though, operators needing the nvidia driver will need to download one more binary, which isn't so significant.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants