-
Notifications
You must be signed in to change notification settings - Fork 293
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
Properly pass configSearchPaths to a Driver constructor #847
Open
mihalicyn
wants to merge
1
commit into
NVIDIA:main
Choose a base branch
from
mihalicyn:fix_custom_config_path_handling
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Signed-off-by: Alexander Mikhalitsyn <[email protected]>
mihalicyn
added a commit
to mihalicyn/lxd-pkg-snap
that referenced
this pull request
Jan 7, 2025
…variable We have to adjust XDG_DATA_DIRS variable to make nvidia-container-toolkit happy and find necessary configuration files. Actually, XDG_DATA_DIRS environment variable value we provided with is already correct (it's getting prepared for us in https://github.com/canonical/mesa-2404/blob/main/scripts/bin/gpu-2404-provider-wrapper.in and https://git.launchpad.net/~canonical-kernel-snaps/canonical-kernel-snaps/+git/kernel-snaps-u24.04/tree/hooks/kernel-gpu-2404-provider-mangler?h=pc-components) but for some reason nvidia-container-toolkit library expects these path to be relative to driver root, which leads to a situation when driver root is getting appended twice to a path and files can not be found. One possible (and clean) solution would be to explicitly specify config files seach path with nvcdi.WithConfigSearchPaths() but it doesn't work because of a bug NVIDIA/nvidia-container-toolkit#847. So the easiest way I found is to adjust XDG_DATA_DIRS variable in that weird way so when nvidia-container-toolkit prepend driverRoot to it a final path became valid and everything works. Signed-off-by: Alexander Mikhalitsyn <[email protected]>
mihalicyn
added a commit
to mihalicyn/lxd-pkg-snap
that referenced
this pull request
Jan 8, 2025
…variable We have to adjust XDG_DATA_DIRS variable to make nvidia-container-toolkit happy and find necessary configuration files. Actually, XDG_DATA_DIRS environment variable value we provided with is already correct (it's getting prepared for us in https://github.com/canonical/mesa-2404/blob/main/scripts/bin/gpu-2404-provider-wrapper.in and https://git.launchpad.net/~canonical-kernel-snaps/canonical-kernel-snaps/+git/kernel-snaps-u24.04/tree/hooks/kernel-gpu-2404-provider-mangler?h=pc-components) but for some reason nvidia-container-toolkit library expects these path to be relative to driver root, which leads to a situation when driver root is getting appended twice to a path and files can not be found. One possible (and clean) solution would be to explicitly specify config files seach path with nvcdi.WithConfigSearchPaths() but it doesn't work because of a bug NVIDIA/nvidia-container-toolkit#847. So the easiest way I found is to adjust XDG_DATA_DIRS variable in that weird way so when nvidia-container-toolkit prepend driverRoot to it a final path became valid and everything works. Signed-off-by: Alexander Mikhalitsyn <[email protected]>
tomponline
added a commit
to canonical/lxd-pkg-snap
that referenced
this pull request
Jan 8, 2025
…variable (#679) We have to adjust XDG_DATA_DIRS variable to make nvidia-container-toolkit happy and find necessary configuration files. Actually, XDG_DATA_DIRS environment variable value we provided with is already correct (it's getting prepared for us in https://github.com/canonical/mesa-2404/blob/main/scripts/bin/gpu-2404-provider-wrapper.in and https://git.launchpad.net/~canonical-kernel-snaps/canonical-kernel-snaps/+git/kernel-snaps-u24.04/tree/hooks/kernel-gpu-2404-provider-mangler?h=pc-components) but for some reason nvidia-container-toolkit library expects these path to be relative to driver root, which leads to a situation when driver root is getting appended twice to a path and files can not be found. One possible (and clean) solution would be to explicitly specify config files search path with nvcdi.WithConfigSearchPaths() but it doesn't work because of a bug NVIDIA/nvidia-container-toolkit#847. So the easiest way I found is to adjust XDG_DATA_DIRS variable in that weird way so when nvidia-container-toolkit prepend driverRoot to it a final path became valid and everything works. This is to fix an issue with delivering some of the nvidia files that CDI does by default, which are the config files for things like Vulkan and EGL The files are included in the kernels user components, so it just seems like LXD is excluding passing them through via CDI. Please don't consider this an exhaustive list of files, necessarily, but examples are: ``` /usr/share/glvnd/egl_vendor.d/10_nvidia.json /usr/share/glvnd/egl_vendor.d/50_mesa.json /usr/share/vulkan/icd.d/nvidia_icd.json /usr/share/vulkan/implicit_layer.d/nvidia_layers.json /usr/share/egl/egl_external_platform.d/15_nvidia_gbm.json /usr/share/egl/egl_external_platform.d/10_nvidia_wayland.json ```
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.
Without this fix it's not possible to use a custom config search path option with nvcdi interface.