Improve Nvidia compatibility with multilib based containers - #1831
Open
angiglesias wants to merge 6 commits into
Open
Improve Nvidia compatibility with multilib based containers#1831angiglesias wants to merge 6 commits into
angiglesias wants to merge 6 commits into
Conversation
NVIDIA Container Toolkit 1.19.1 requires Go >= 1.25 and introduces various
format changes in mount options[1].
The new mounts options now include rbind and rprivate options, provoking an
error when the mount command gets those options and a --rbind flag. A new
mountExt helper function is added and a minimal adapter mountBind is preserved
to avoid breaking compat with existing calls.
[1] NVIDIA Container Toolkit commit d0103aa
NVIDIA/nvidia-container-toolkit@d0103aa
Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com>
Adds the helper function GetMultilibDir to discover if a container is using a multilib linux distro Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com>
Adds a new config package that will manage persistent container config, such as custom environment variables and prepare way to introduce new tunables in the future. The configurations will be serialez to a JSON file stored in the toolbox config directory ($HOME/.config/toolbox/<container>-config.json) Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com>
Use new persistent config library to load container config and injects additional environment variables to the command to be run Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com>
Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com>
…stros Use container persistent config (pkg/config) to patch the environment var GBM_BACKENDS_PATH when a container using multilib is detected. The Nvidia CDI specs generated in fedora will point the nvidia libraries to /usr/lib64 while multilib systems will (usually) expect them in /usr/lib/x86_64-linux-gnu or /usr/lib/aarch64-linux-gnu. While the libraries are indexed using using ldconfig with the config fragment toolbx-nvidia.conf generated by toolbox, some apps and frameworks will still lookup for dynamic libraries under the multilib path. This happens with libglvnd looking up for GBM backends, but can be instructed custom lookup paths wiith the environment variable GBM_BACKENDS_PATH Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
angiglesias
marked this pull request as ready for review
August 2, 2026 12:59
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces a new container persistent configuration package with a helper library to manage persistent additional tunables and configuration for toolbx containers, such as environment variables.
This new mechanism is then used to patch in multilib based distros containers patching the GBM implementations dynamic loading done by libglvnd and egl-gbm by injecting the environment variable
GBM_BACKENDS_PATHpointing to mounted from fedora host Nvidia libraries locations (/usr/lib64/gbm) and container multilib search path (usually/usr/lib/x86_64-linux-gnu/gbmor/usr/lib/aarch64-linux-gnu/gbmdepending on host arch).Currently the system is only used by this workaround to improve nvidia compatibility with mutilib containers, but it can be easily extended for further tunables or specify additional environment variables when the container is created with
toolbox createIncludes #1810