Skip to content

Commit db6957e

Browse files
authored
Adding test for A3 UltraGPU JBVMs with Spot VMs (GoogleCloudPlatform#4968)
2 parents 7ccb148 + 5eabed4 commit db6957e

2 files changed

Lines changed: 104 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
---
16+
tags:
17+
- vm
18+
- m.filestore
19+
- m.gpu-rdma-vpc
20+
- m.startup-script
21+
- m.vpc
22+
- m.vm-instance
23+
- m.wait-for-startup
24+
25+
timeout: 14400s # 4hr
26+
steps:
27+
# While using static network names we are guarding against more than 1 instance running at a time (for multi-group tests)
28+
- id: check_for_running_build
29+
name: gcr.io/cloud-builders/gcloud
30+
script: "tools/cloud-build/check_running_build.sh tools/cloud-build/daily-tests/builds/ml-a3-ultragpu-onspot-jbvms.yaml"
31+
32+
- id: ml-a3-ultragpu-onspot-jbvms
33+
name: us-central1-docker.pkg.dev/$PROJECT_ID/hpc-toolkit-repo/test-runner
34+
entrypoint: /bin/bash
35+
env:
36+
- "ANSIBLE_HOST_KEY_CHECKING=false"
37+
- "ANSIBLE_CONFIG=/workspace/tools/cloud-build/ansible.cfg"
38+
- "PROJECT_ID=$PROJECT_ID"
39+
- "NUM_NODES=4"
40+
- "MACHINE_TYPE=a3-ultragpu-8g"
41+
- "INSTANCE_PREFIX=a3usp-jbvms"
42+
- "BUILD_ID=$BUILD_ID"
43+
- "OPTIONS_GCS_PATH=gs://hpc-ctk1357/a3uoptions.txt"
44+
args:
45+
- -c
46+
- |
47+
set -e -u -o pipefail
48+
echo "Sourcing find_available_zone.sh to determine zone."
49+
source /workspace/tools/cloud-build/find_available_zone.sh
50+
if [ -z "$${ZONE:-}" ]; then
51+
echo "ERROR: ZONE not found" >&2
52+
exit 1
53+
fi
54+
set -x
55+
cd /workspace && make
56+
REGION="$${ZONE%-*}"
57+
BUILD_ID_SHORT="$${BUILD_ID:0:6}"
58+
BLUEPRINT="/workspace/examples/machine-learning/a3-ultragpu-8g/a3ultra-vm.yaml"
59+
# Removing reservation and automatic restart from blueprint for spot VMs to work.
60+
sed -i -e '/reservation/d' -e '/automatic_restart/d' $${BLUEPRINT}
61+
ansible-playbook tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml \
62+
--user=sa_106486320838376751393 \
63+
--extra-vars="project=${PROJECT_ID} build=$${BUILD_ID_SHORT}" \
64+
--extra-vars="region=$${REGION} zone=$${ZONE}" \
65+
--extra-vars="@tools/cloud-build/daily-tests/tests/ml-a3-ultragpu-onspot-jbvms.yml"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
---
16+
17+
# region, zone must be defined in build file with --extra-vars flag!
18+
test_name: a3u-spot-jbvms
19+
deployment_name: a3u-spot-jbvms-{{ build }}
20+
hostname_prefix: "{{ deployment_name }}-beowulf"
21+
workspace: /workspace
22+
blueprint_yaml: "{{ workspace }}/examples/machine-learning/a3-ultragpu-8g/a3ultra-vm.yaml"
23+
network: "{{ test_name }}-net-0"
24+
remote_node: "{{ hostname_prefix }}-0"
25+
post_deploy_tests:
26+
- test-validation/test-mounts.yml
27+
- test-validation/test-nvidia-smi.yml
28+
custom_vars:
29+
mounts:
30+
- /home
31+
instance_labels:
32+
a3ultra_onspot: true
33+
enable_spot: true
34+
cli_deployment_vars:
35+
region: "{{ region }}"
36+
zone: "{{ zone }}"
37+
disk_size_gb: 200
38+
a3u_provisioning_model: SPOT
39+
base_network_name: "{{ test_name }}"

0 commit comments

Comments
 (0)