diff --git a/assets/gpu-feature-discovery/0500_daemonset.yaml b/assets/gpu-feature-discovery/0500_daemonset.yaml index 40df1c193..7efc1b342 100644 --- a/assets/gpu-feature-discovery/0500_daemonset.yaml +++ b/assets/gpu-feature-discovery/0500_daemonset.yaml @@ -127,8 +127,8 @@ spec: volumeMounts: - name: output-dir mountPath: "/etc/kubernetes/node-feature-discovery/features.d" - - name: dmi-info-dir - mountPath: "/sys/class/dmi/id" + - name: host-sys + mountPath: /sys readOnly: true - name: config mountPath: /config @@ -169,9 +169,9 @@ spec: - name: output-dir hostPath: path: "/etc/kubernetes/node-feature-discovery/features.d" - - name: dmi-info-dir + - name: host-sys hostPath: - path: "/sys/class/dmi/id" + path: /sys - name: run-nvidia-validations hostPath: path: "/run/nvidia/validations" diff --git a/validator/main.go b/validator/main.go index df92cd4d4..0e7a58a45 100644 --- a/validator/main.go +++ b/validator/main.go @@ -693,6 +693,11 @@ func isDriverManagedByOperator(ctx context.Context) (bool, error) { func validateHostDriver(silent bool) error { log.Info("Attempting to validate a pre-installed driver on the host") + if fileInfo, err := os.Lstat("/host/usr/lib/wsl/lib/nvidia-smi"); err == nil && fileInfo.Size() != 0 { + log.Infof("WSL2 system detected, assuming driver is pre-installed") + disableDevCharSymlinkCreation = true + return nil + } fileInfo, err := os.Lstat("/host/usr/bin/nvidia-smi") if err != nil { return fmt.Errorf("no 'nvidia-smi' file present on the host: %w", err)