mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 00:08:11 +00:00
Deduplicate WSL driverstore paths
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
882fbb3209
commit
35fc57291f
@ -49,9 +49,15 @@ func Shutdown() error {
|
||||
// GetDriverStorePaths returns the list of driver store paths
|
||||
func GetDriverStorePaths() []string {
|
||||
var paths []string
|
||||
selected := make(map[string]bool)
|
||||
|
||||
for i := 0; i < dxcore.getAdapterCount(); i++ {
|
||||
adapter := dxcore.getAdapter(i)
|
||||
paths = append(paths, adapter.getDriverStorePath())
|
||||
path := dxcore.getAdapter(i).getDriverStorePath()
|
||||
if selected[path] {
|
||||
continue
|
||||
}
|
||||
selected[path] = true
|
||||
paths = append(paths, path)
|
||||
}
|
||||
|
||||
return paths
|
||||
|
Loading…
Reference in New Issue
Block a user