This issue was created as a followup to this discussion.
In some systems, there could be a symlink on the nvidia-smi path (for example: /usr/sbin/nvidia-smi) which could cause an error for our validation functions. Earlier we updated the validation to resolve host nvidia-smi for symlinks wrt /usr/bin/nvidia-smi using pathrs (see the function below):
func resolveHostNvidiaSMI(hostRootCtrPath string) (os.FileInfo, error) {
f, err := pathrs.OpenInRoot(hostRootCtrPath, "/usr/bin/nvidia-smi")
if err != nil {
return nil, fmt.Errorf("failed to open 'nvidia-smi' on the host: %w", err)
}
defer f.Close()
fileInfo, err := f.Stat()
if err != nil {
return nil, fmt.Errorf("failed to stat 'nvidia-smi' on the host: %w", err)
}
return fileInfo, nil
}
...However, ideally we would like a more general solution for symlinks in other paths like /usr/sbin/nvidia-smi and /usr/lib/wsl/lib/nvidia-smi.
This issue was created as a followup to this discussion.
In some systems, there could be a symlink on the nvidia-smi path (for example: /usr/sbin/nvidia-smi) which could cause an error for our validation functions. Earlier we updated the validation to resolve host nvidia-smi for symlinks wrt /usr/bin/nvidia-smi using pathrs (see the function below):
...However, ideally we would like a more general solution for symlinks in other paths like /usr/sbin/nvidia-smi and /usr/lib/wsl/lib/nvidia-smi.