mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-04-18 21:25:11 +00:00
Add driver.Config
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
bdfa525a75
commit
643b89e539
@ -61,11 +61,7 @@ func NewGraphicsMountsDiscoverer(logger logger.Interface, driver *root.Driver, n
|
|||||||
|
|
||||||
jsonMounts := NewMounts(
|
jsonMounts := NewMounts(
|
||||||
logger,
|
logger,
|
||||||
lookup.NewFileLocator(
|
driver.Configs(),
|
||||||
lookup.WithLogger(logger),
|
|
||||||
lookup.WithRoot(driver.Root),
|
|
||||||
lookup.WithSearchPaths("/etc", "/usr/share"),
|
|
||||||
),
|
|
||||||
driver.Root,
|
driver.Root,
|
||||||
[]string{
|
[]string{
|
||||||
"glvnd/egl_vendor.d/10_nvidia.json",
|
"glvnd/egl_vendor.d/10_nvidia.json",
|
||||||
@ -292,11 +288,7 @@ func newXorgDiscoverer(logger logger.Interface, driver *root.Driver, nvidiaCTKPa
|
|||||||
|
|
||||||
xorgConfig := NewMounts(
|
xorgConfig := NewMounts(
|
||||||
logger,
|
logger,
|
||||||
lookup.NewFileLocator(
|
driver.Configs(),
|
||||||
lookup.WithLogger(logger),
|
|
||||||
lookup.WithRoot(driver.Root),
|
|
||||||
lookup.WithSearchPaths("/usr/share"),
|
|
||||||
),
|
|
||||||
driver.Root,
|
driver.Root,
|
||||||
[]string{"X11/xorg.conf.d/10-nvidia.conf"},
|
[]string{"X11/xorg.conf.d/10-nvidia.conf"},
|
||||||
)
|
)
|
||||||
|
@ -53,6 +53,15 @@ func (r *Driver) Libraries() lookup.Locator {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Configs returns a locator for driver configs.
|
||||||
|
func (r *Driver) Configs() lookup.Locator {
|
||||||
|
return lookup.NewFileLocator(
|
||||||
|
lookup.WithLogger(r.logger),
|
||||||
|
lookup.WithRoot(r.Root),
|
||||||
|
lookup.WithSearchPaths("/etc", "/usr/share"),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// normalizeSearchPaths takes a list of paths and normalized these.
|
// normalizeSearchPaths takes a list of paths and normalized these.
|
||||||
// Each of the elements in the list is expanded if it is a path list and the
|
// Each of the elements in the list is expanded if it is a path list and the
|
||||||
// resultant list is returned.
|
// resultant list is returned.
|
||||||
|
Loading…
Reference in New Issue
Block a user