mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 13:35:00 +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
|
// GetDriverStorePaths returns the list of driver store paths
|
||||||
func GetDriverStorePaths() []string {
|
func GetDriverStorePaths() []string {
|
||||||
var paths []string
|
var paths []string
|
||||||
|
selected := make(map[string]bool)
|
||||||
|
|
||||||
for i := 0; i < dxcore.getAdapterCount(); i++ {
|
for i := 0; i < dxcore.getAdapterCount(); i++ {
|
||||||
adapter := dxcore.getAdapter(i)
|
path := dxcore.getAdapter(i).getDriverStorePath()
|
||||||
paths = append(paths, adapter.getDriverStorePath())
|
if selected[path] {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
selected[path] = true
|
||||||
|
paths = append(paths, path)
|
||||||
}
|
}
|
||||||
|
|
||||||
return paths
|
return paths
|
||||||
|
Loading…
Reference in New Issue
Block a user