mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Support vulkan ICD files in a driver root
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -65,9 +65,6 @@ func NewGraphicsMountsDiscoverer(logger logger.Interface, driver *root.Driver, n
|
||||
driver.Root,
|
||||
[]string{
|
||||
"glvnd/egl_vendor.d/10_nvidia.json",
|
||||
"vulkan/icd.d/nvidia_icd.json",
|
||||
"vulkan/icd.d/nvidia_layers.json",
|
||||
"vulkan/implicit_layer.d/nvidia_layers.json",
|
||||
"egl/egl_external_platform.d/15_nvidia_gbm.json",
|
||||
"egl/egl_external_platform.d/10_nvidia_wayland.json",
|
||||
"nvidia/nvoptix.bin",
|
||||
@@ -79,12 +76,31 @@ func NewGraphicsMountsDiscoverer(logger logger.Interface, driver *root.Driver, n
|
||||
discover := Merge(
|
||||
libraries,
|
||||
jsonMounts,
|
||||
newVulkanMountsDiscoverer(logger, driver),
|
||||
xorg,
|
||||
)
|
||||
|
||||
return discover, nil
|
||||
}
|
||||
|
||||
// newVulkanMountsDiscoverer creates a discoverer for vulkan ICD files.
|
||||
// For these files we search the standard driver config paths as well as the
|
||||
// driver root itself. This allows us to support GKE installations where the
|
||||
// vulkan ICD files are at {{ .driverRoot }}/vulkan instead of in /etc/vulkan.
|
||||
func newVulkanMountsDiscoverer(logger logger.Interface, driver *root.Driver) Discover {
|
||||
locator := lookup.First(driver.Configs(), driver.Files())
|
||||
return &mountsToContainerPath{
|
||||
logger: logger,
|
||||
locator: locator,
|
||||
required: []string{
|
||||
"vulkan/icd.d/nvidia_icd.json",
|
||||
"vulkan/icd.d/nvidia_layers.json",
|
||||
"vulkan/implicit_layer.d/nvidia_layers.json",
|
||||
},
|
||||
containerRoot: "/etc",
|
||||
}
|
||||
}
|
||||
|
||||
type drmDevicesByPath struct {
|
||||
None
|
||||
logger logger.Interface
|
||||
|
||||
Reference in New Issue
Block a user