Skip to content

Commit

Permalink
feat: add orion gpu container-runtime pod running status check (#94)
Browse files Browse the repository at this point in the history
* feat: add orion gpu container-runtime pod running status check

* fix: typo

---------

Co-authored-by: liuyu <>
  • Loading branch information
eball authored May 31, 2024
1 parent 75323fc commit fc5e819
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions build/installer/install_cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ run_install() {
else
ensure_success $sh_c "${HELM} upgrade -i gpu ${BASE_DIR}/wizard/config/gpu -n gpu-system --force --set gpu.server=${GPU_DOMAIN} --set container.manager=containerd --create-namespace"
fi

check_orion_gpu
fi

GPU_TYPE="none"
Expand Down Expand Up @@ -1558,6 +1560,10 @@ get_gpu_status(){
$sh_c "${KUBECTL} get pod -n kube-system -l 'name=nvidia-device-plugin-ds' -o jsonpath='{.items[*].status.phase}'"
}

get_orion_gpu_status(){
$sh_c "${KUBECTL} get pod -n gpu-system -l 'app=orionx-container-runtime' -o jsonpath='{.items[*].status.phase}'"
}

get_userspace_dir(){
$sh_c "${KUBECTL} get pod -n user-space-${username} -l 'tier=bfl' -o \
jsonpath='{range .items[0].spec.volumes[*]}{.name}{\" \"}{.persistentVolumeClaim.claimName}{\"\\n\"}{end}}'" | \
Expand Down Expand Up @@ -1775,6 +1781,24 @@ check_gpu(){
echo
}

check_orion_gpu(){
status=$(get_orion_gpu_status)
n=0
while [ "x${status}" != "xRunning" ]; do
n=$(expr $n + 1)
dotn=$(($n % 10))
dot=$(repeat $dotn '>')

echo -ne "\rWaiting for orionx-container-runtime starting ${dot}"
sleep 0.5

status=$(get_orion_gpu_status)
echo -ne "\rWaiting for orionx-container-runtime starting "

done
echo
}

install_gpu(){
# only for leishen mix
# to be tested
Expand Down

0 comments on commit fc5e819

Please sign in to comment.