MCPcopy Create free account
hub / github.com/NVIDIA/gpu-operator / getNvidiaSMIPath

Method getNvidiaSMIPath

cmd/nvidia-validator/find.go:48–62  ·  view source on GitHub ↗

getNvidiaSMIPath returns path to the `nvidia-smi` executable in the driver root.

()

Source from the content-addressed store, hash-verified

46
47// getNvidiaSMIPath returns path to the `nvidia-smi` executable in the driver root.
48func (r root) getNvidiaSMIPath() (string, error) {
49 binarySearchPaths := []string{
50 "/usr/bin",
51 "/usr/sbin",
52 "/bin",
53 "/sbin",
54 }
55
56 binaryPath, err := r.findFile("nvidia-smi", binarySearchPaths...)
57 if err != nil {
58 return "", err
59 }
60
61 return binaryPath, nil
62}
63
64// isDevRoot checks whether the specified root is a dev root.
65// A dev root is defined as a root containing a /dev folder.

Callers 1

validateDriverContainerFunction · 0.80

Calls 1

findFileMethod · 0.95

Tested by

no test coverage detected