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

Method getDriverLibraryPath

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

getDriverLibraryPath returns path to `libnvidia-ml.so.1` in the driver root. The folder for this file is also expected to be the location of other driver files.

()

Source from the content-addressed store, hash-verified

27// getDriverLibraryPath returns path to `libnvidia-ml.so.1` in the driver root.
28// The folder for this file is also expected to be the location of other driver files.
29func (r root) getDriverLibraryPath() (string, error) {
30 librarySearchPaths := []string{
31 "/usr/lib64",
32 "/usr/lib/x86_64-linux-gnu",
33 "/usr/lib/aarch64-linux-gnu",
34 "/lib64",
35 "/lib/x86_64-linux-gnu",
36 "/lib/aarch64-linux-gnu",
37 }
38
39 libraryPath, err := r.findFile("libnvidia-ml.so.1", librarySearchPaths...)
40 if err != nil {
41 return "", err
42 }
43
44 return libraryPath, nil
45}
46
47// getNvidiaSMIPath returns path to the `nvidia-smi` executable in the driver root.
48func (r root) getNvidiaSMIPath() (string, error) {

Callers 1

validateDriverContainerFunction · 0.80

Calls 1

findFileMethod · 0.95

Tested by

no test coverage detected