mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 21:39:10 +00:00
Merge branch 'CNT-3963/deduplicate-wsl-driverstore-paths' into 'main'
Deduplicate WSL driverstore paths See merge request nvidia/container-toolkit/container-toolkit!304
This commit is contained in:
commit
7986ff9cee
@ -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