Skip to content

Commit 700a78a

Browse files
committed
Add hyperpod-patch.sh
1 parent da51da5 commit 700a78a

3 files changed

Lines changed: 42 additions & 1 deletion

File tree

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export MOD=""
5959
export MOD_TAG=$(if [ "$MOD" == "" ]; then echo ""; else echo "-${MOD}"; fi)
6060
## VERSION: [optional] - Version tag for this Docker image. Example: v20180302
6161
#export VERSION=v$(date +%Y%m%d)
62-
export VERSION=v20240912
62+
export VERSION=v20241025
6363
export TAG=$(if [ -z "${VERSION}" ]; then echo ":latest${MOD_TAG}"; else echo ":${VERSION}${MOD_TAG}"; fi)
6464
## BUILD_OPTS: [optional] - arguments for the docker image build command
6565
export BUILD_OPTS="--progress plain --build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} --build-arg no_proxy=${no_proxy} --build-arg MOD=${MOD}"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
source conf/env.conf
4+
source ${CONF}/env_input
5+
source ${CONF}/env_vars
6+
7+
if [ ! "$1" == "" ]; then export HYPERPOD_NAME=$1; fi
8+
9+
echo ""
10+
echo "Patching HyperPod $IMPL cluster ${HYPERPOD_NAME}: "
11+
12+
impl/${IMPL}/hyperpod-patch.sh ${HYPERPOD_NAME}
13+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
# Patch HyperPod Cluster
4+
if [ ! "$1" == "" ]; then HYPERPOD_NAME=$1; fi
5+
6+
echo ""
7+
echo "Patching HyperPod cluster: $HYPERPOD_NAME"
8+
echo ""
9+
read -r -p "Are you sure? [y/N] " response
10+
case "$response" in
11+
[yY][eE][sS]|[yY])
12+
./hyperpod-status.sh ${HYPERPOD_NAME}
13+
if [ "$?" == "0" ]; then
14+
CMD="aws sagemaker update-cluster-software --cluster-name ${HYPERPOD_NAME} ${ENDPOINT_ARG}"
15+
if [ ! "$VERBOSE" == "false" ]; then echo -e "\n${CMD}\n"; fi
16+
eval "$CMD"
17+
else
18+
echo "HyperPod cluster $HYPERPOD_NAME does not exist"
19+
fi
20+
;;
21+
*)
22+
echo ""
23+
echo "Cluster patching cancelled"
24+
echo ""
25+
;;
26+
esac
27+
28+

0 commit comments

Comments
 (0)