-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Maggie Ma
committed
Sep 20, 2023
1 parent
b2c1bfb
commit 8034c5b
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,20 @@ | ||
az ml compute update --name mycluster --identity-type system_assigned | ||
export COMPUTE_NAME=mycluster-sa | ||
|
||
does_compute_exist() | ||
{ | ||
if [ -z $(az ml compute show -n $COMPUTE_NAME --query name) ]; then | ||
echo false | ||
else | ||
echo true | ||
fi | ||
} | ||
|
||
echo "Checking if compute $COMPUTE_NAME already exists" | ||
if [ "$(does_compute_exist)" == "true" ]; then | ||
echo "Skipping, compute: $COMPUTE_NAME exists" | ||
else | ||
echo "Provisioning compute: $COMPUTE_NAME" | ||
az ml compute create --name "$COMPUTE_NAME" --type amlcompute | ||
fi | ||
|
||
az ml compute update --name "$COMPUTE_NAME" --identity-type system_assigned |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters