mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Add discovery of DRM devices
This change adds the discovery of DRM devices associated with requested devices. This means that the /dev/dri/card* and /dev/dri/renderD* devices associated with each requested NVIDIA GPU are injected into the container and that the /dev/dri/by-path symlinks associated with these devices are created in the container. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -44,7 +44,15 @@ func NewGraphicsModifier(logger *logrus.Logger, cfg *config.Config, ociSpec oci.
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
d, err := discover.NewGraphicsDiscoverer(logger, cfg.NVIDIAContainerCLIConfig.Root)
|
||||
config := &discover.Config{
|
||||
Root: cfg.NVIDIAContainerCLIConfig.Root,
|
||||
NVIDIAContainerToolkitCLIExecutablePath: cfg.NVIDIACTKConfig.Path,
|
||||
}
|
||||
d, err := discover.NewGraphicsDiscoverer(
|
||||
logger,
|
||||
image.DevicesFromEnvvars(visibleDevicesEnvvar),
|
||||
config,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to construct discoverer: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user