Skip to content

cdi generate cannot find config files in non-standard locations #475

@jocado

Description

@jocado

Hi,

When generating CDI config, if the json config files for glvnd, vulkanoregl` are not in a "standard" location, the are not found. It fails as below:

# nvidia-ctk cdi generate --nvidia-ctk-path ${SNAP}/usr/bin/nvidia-ctk --library-search-path ${SNAP}/graphics/lib/x86_64-linux-gnu 2>&1 |grep json
time="2024-04-24T18:46:35Z" level=warning msg="Could not locate glvnd/egl_vendor.d/10_nvidia.json: pattern glvnd/egl_vendor.d/10_nvidia.json not found"
time="2024-04-24T18:46:35Z" level=warning msg="Could not locate vulkan/icd.d/nvidia_icd.json: pattern vulkan/icd.d/nvidia_icd.json not found"
time="2024-04-24T18:46:35Z" level=warning msg="Could not locate vulkan/icd.d/nvidia_layers.json: pattern vulkan/icd.d/nvidia_layers.json not found"
time="2024-04-24T18:46:35Z" level=warning msg="Could not locate vulkan/implicit_layer.d/nvidia_layers.json: pattern vulkan/implicit_layer.d/nvidia_layers.json not found"
time="2024-04-24T18:46:35Z" level=warning msg="Could not locate egl/egl_external_platform.d/15_nvidia_gbm.json: pattern egl/egl_external_platform.d/15_nvidia_gbm.json not found"
time="2024-04-24T18:46:35Z" level=warning msg="Could not locate egl/egl_external_platform.d/10_nvidia_wayland.json: pattern egl/egl_external_platform.d/10_nvidia_wayland.json not found"

It's possible to specify alternate search paths for libraries via --library-search-path. It would be awesome to be able to do the same for config file paths. This was discussed a bit over in #82, specifically #82 (comment) , but it didn't make it into release as there were some issues testing it at the time and there was no pressing need for the config files then either. I have now found some use cases for adding the config files via CDI, and it would be great to be able to do that.

I'm testing this for use in the docker snap packaging, where the non-kernel driver artefacts are in non-standard locations on Ubuntu Core systems. This should further expand the uses that can leverage nvidia hardware via docker.

Currently running latest toolkit version, v1.15.0

If you need any further logs or info, please let me know.

FYI @elezar

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions