Skip to content

Commit 682f0c9

Browse files
committed
kubelet plugin: Improve nvidia-smi search.
Signed-off-by: Marco Ebert <[email protected]>
1 parent f4d11e3 commit 682f0c9

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

cmd/compute-domain-kubelet-plugin/root.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ func (r root) getDriverLibraryPath() (string, error) {
4747
// getNvidiaSMIPath returns path to the `nvidia-smi` executable in the driver root.
4848
func (r root) getNvidiaSMIPath() (string, error) {
4949
binarySearchPaths := []string{
50+
"/opt/bin",
5051
"/usr/bin",
5152
"/usr/sbin",
5253
"/bin",

cmd/gpu-kubelet-plugin/root.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ func (r root) getDriverLibraryPath() (string, error) {
4747
// getNvidiaSMIPath returns path to the `nvidia-smi` executable in the driver root.
4848
func (r root) getNvidiaSMIPath() (string, error) {
4949
binarySearchPaths := []string{
50+
"/opt/bin",
5051
"/usr/bin",
5152
"/usr/sbin",
5253
"/bin",

hack/kubelet-plugin-prestart.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ validate_and_exit_on_success () {
4343

4444
NV_PATH=$( \
4545
find \
46-
/driver-root/bin \
47-
/driver-root/sbin \
46+
/driver-root/opt/bin \
4847
/driver-root/usr/bin \
48+
/driver-root/usr/sbin \
49+
/driver-root/bin \
4950
/driver-root/sbin \
5051
-maxdepth 1 -type f -name "nvidia-smi" 2> /dev/null | head -n1
5152
)

0 commit comments

Comments
 (0)