Skip to content

Commit 35728b6

Browse files
committed
Check for nvidia-smi after the environment variables in the MIG hook
1 parent 718fa02 commit 35728b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

conf/hooks/extra/50-mig-config.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ shopt -s lastpipe
1919

2020
source "${ENROOT_LIBRARY_PATH}/common.sh"
2121

22-
common::checkcmd grep nvidia-smi
22+
common::checkcmd grep
2323

2424
tac "${ENROOT_ENVIRON}" | grep "^NVIDIA_" | while IFS='=' read -r key value; do
2525
[ -v "${key}" ] || export "${key}=${value}"
@@ -32,6 +32,8 @@ if [[ "${NVIDIA_VISIBLE_DEVICES}" =~ "MIG-" ]] || [[ "${NVIDIA_VISIBLE_DEVICES}"
3232
exit 0
3333
fi
3434

35+
common::checkcmd nvidia-smi
36+
3537
nvsmi_args=("--query-gpu=mig.mode.current" "--format=csv,noheader")
3638

3739
if [ "${NVIDIA_VISIBLE_DEVICES}" != "all" ]; then

0 commit comments

Comments
 (0)