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:
@@ -30,6 +30,15 @@ type filtered struct {
|
||||
filter Filter
|
||||
}
|
||||
|
||||
// newFilteredDisoverer creates a discoverer that applies the specified filter to the returned entities of the discoverer
|
||||
func newFilteredDisoverer(logger *logrus.Logger, applyTo Discover, filter Filter) Discover {
|
||||
return filtered{
|
||||
Discover: applyTo,
|
||||
logger: logger,
|
||||
filter: filter,
|
||||
}
|
||||
}
|
||||
|
||||
// Devices returns a filtered list of devices based on the specified filter.
|
||||
func (d filtered) Devices() ([]Device, error) {
|
||||
devices, err := d.Discover.Devices()
|
||||
|
||||
Reference in New Issue
Block a user