Skip to content

Commit 14bfb44

Browse files
Update cloud init
1 parent 7cf95da commit 14bfb44

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

files/oke-ubuntu-cloud-init.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ fi
1212
SHAPE=$(curl -H "Authorization: Bearer Oracle" -L http://169.254.169.254/opc/v2/instance/shape)
1313
if [[ "$SHAPE" == BM.GPU.GB200* ]] || [[ "$SHAPE" == BM.GPU.GB300* ]]; then
1414
echo "Disabling nvidia-imex.service for shape: $SHAPE"
15-
systemctl disable --now nvidia-imex.service && systemctl mask nvidia-imex.service
15+
if systemctl list-unit-files | grep -q nvidia-imex.service; then
16+
systemctl disable --now nvidia-imex.service && systemctl mask nvidia-imex.service
17+
else
18+
echo "nvidia-imex.service not found, skipping"
19+
fi
1620
fi
1721

1822
case "$ID" in

0 commit comments

Comments
 (0)