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.
()
| 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. |
| 29 | func (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. |
| 48 | func (r root) getNvidiaSMIPath() (string, error) { |
no test coverage detected