@@ -36,13 +36,26 @@ steps:
3636 env :
3737 - " ANSIBLE_HOST_KEY_CHECKING=false"
3838 - " ANSIBLE_CONFIG=/workspace/tools/cloud-build/ansible.cfg"
39+ - " MACHINE_TYPE=tpu7x-standard-4t"
40+ - " PROJECT_ID=$PROJECT_ID"
41+ - " NUM_NODES=2"
42+ - " INSTANCE_PREFIX=tpu7xsp"
43+ - " BUILD_ID=$BUILD_ID"
44+ - " OPTIONS_GCS_PATH=gs://hpc-ctk1357/tpu7xoptions.txt"
3945 args :
4046 - -c
4147 - |
42- set -x -e
48+ set -e -u -o pipefail
49+ echo "Sourcing find_available_zone.sh to determine zone."
50+ source /workspace/tools/cloud-build/find_available_zone.sh
51+ if [ -z "$${ZONE:-}" ]; then
52+ echo "ERROR: ZONE not found" >&2
53+ exit 1
54+ fi
55+ set -x
4356 cd /workspace && make
44- BUILD_ID_FULL=$BUILD_ID
45- BUILD_ID_SHORT=$${BUILD_ID_FULL :0:6}
57+ REGION="$${ZONE%-*}"
58+ BUILD_ID_SHORT=" $${BUILD_ID :0:6}"
4659 EXAMPLE_BP=examples/gke-tpu-7x/gke-tpu-7x.yaml
4760 # adding vm to act as remote node
4861 echo ' - id: remote-node' >> $${EXAMPLE_BP}
6477 echo ' - python -c '\''import jax; print(jax.device_count(), "TPU cores")'\''' >> $${EXAMPLE_BP}
6578 echo ' node_count: 1' >> $${EXAMPLE_BP}
6679 echo ' outputs: [instructions]' >> $${EXAMPLE_BP}
80+ sed -i -e '/reservation_affinity:/,+3c\ spot: true' $${EXAMPLE_BP}
81+ sed -i '/reservation/d' $${EXAMPLE_BP}
6782 ansible-playbook tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml \
6883 --user=sa_106486320838376751393 --extra-vars="project=${PROJECT_ID} build=$${BUILD_ID_SHORT}" \
84+ --extra-vars="region=$${REGION} zone=$${ZONE}" \
6985 --extra-vars="@tools/cloud-build/daily-tests/tests/gke-tpu-7x.yml"
0 commit comments