mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Allow for customizing the path to ldconfig
Since the `createContainer` `runc` hook runs with the environment that the container's config.json specifies, the path to `ldconfig` may not be easily resolvable if the host environment differs enough from the container (e.g. on a NixOS host where all binaries are under hashed paths in /nix/store with an Ubuntu container whose PATH contains FHS-style paths such as /bin and /usr/bin). This change allows for specifying exactly where ldconfig comes from. Signed-off-by: Jared Baur <jaredbaur@fastmail.com>
This commit is contained in:
@@ -54,7 +54,7 @@ func (l *wsllib) GetAllDeviceSpecs() ([]specs.Device, error) {
|
||||
|
||||
// GetCommonEdits generates a CDI specification that can be used for ANY devices
|
||||
func (l *wsllib) GetCommonEdits() (*cdi.ContainerEdits, error) {
|
||||
driver, err := newWSLDriverDiscoverer(l.logger, l.driverRoot, l.nvidiaCTKPath)
|
||||
driver, err := newWSLDriverDiscoverer(l.logger, l.driverRoot, l.nvidiaCTKPath, l.ldconfigPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create discoverer for WSL driver: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user