mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-02-16 17:42:20 +00:00
Fix nvidia-ctk path for update ldcache hook
This change ensures that the update-ldcache hook is created in a manner consistent with other nvidia-ctk hooks ensuring that a full path is used. Without this change the update-ldcache hook on Tegra-based sytems had an invalid path. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
92dc0506fe
commit
0c8379f681
@ -21,7 +21,6 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/NVIDIA/nvidia-container-toolkit/internal/lookup"
|
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -29,9 +28,8 @@ import (
|
|||||||
func NewLDCacheUpdateHook(logger *logrus.Logger, mounts Discover, cfg *Config) (Discover, error) {
|
func NewLDCacheUpdateHook(logger *logrus.Logger, mounts Discover, cfg *Config) (Discover, error) {
|
||||||
d := ldconfig{
|
d := ldconfig{
|
||||||
logger: logger,
|
logger: logger,
|
||||||
|
nvidiaCTKPath: FindNvidiaCTK(logger, cfg.NvidiaCTKPath),
|
||||||
mountsFrom: mounts,
|
mountsFrom: mounts,
|
||||||
lookup: lookup.NewExecutableLocator(logger, cfg.Root),
|
|
||||||
nvidiaCTKPath: cfg.NvidiaCTKPath,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return &d, nil
|
return &d, nil
|
||||||
@ -40,9 +38,8 @@ func NewLDCacheUpdateHook(logger *logrus.Logger, mounts Discover, cfg *Config) (
|
|||||||
type ldconfig struct {
|
type ldconfig struct {
|
||||||
None
|
None
|
||||||
logger *logrus.Logger
|
logger *logrus.Logger
|
||||||
mountsFrom Discover
|
|
||||||
lookup lookup.Locator
|
|
||||||
nvidiaCTKPath string
|
nvidiaCTKPath string
|
||||||
|
mountsFrom Discover
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hooks checks the required mounts for libraries and returns a hook to update the LDcache for the discovered paths.
|
// Hooks checks the required mounts for libraries and returns a hook to update the LDcache for the discovered paths.
|
||||||
|
Loading…
Reference in New Issue
Block a user