diff --git a/ci/scripts/check_gpu.sh b/ci/scripts/check_gpu.sh new file mode 100755 index 00000000..072e29b9 --- /dev/null +++ b/ci/scripts/check_gpu.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +gpu_cards=$(/usr/sbin/lspci | grep -i NVIDIA | wc -l) +echo "$gpu_cards NVIDIA devices found" +if [ $gpu_cards -eq 0 ]; then + echo "ERROR : no NVIDIA devices found" + exit 1 +fi + +nvidia-smi || exit 1 diff --git a/scripts/check_gpu.sh b/scripts/check_gpu.sh new file mode 100755 index 00000000..072e29b9 --- /dev/null +++ b/scripts/check_gpu.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +gpu_cards=$(/usr/sbin/lspci | grep -i NVIDIA | wc -l) +echo "$gpu_cards NVIDIA devices found" +if [ $gpu_cards -eq 0 ]; then + echo "ERROR : no NVIDIA devices found" + exit 1 +fi + +nvidia-smi || exit 1