|
| 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 | +- m.vpc |
| 18 | +- m.service-account |
| 19 | +- m.gke-cluster |
| 20 | +- m.gke-node-pool |
| 21 | +- m.kubectl-apply |
| 22 | +- gke |
| 23 | + |
| 24 | +timeout: 7200s |
| 25 | + |
| 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/gke-tpu-v6e.yaml" |
| 31 | + |
| 32 | +- id: gke-tpu-v6e |
| 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 | + args: |
| 39 | + - -c |
| 40 | + - | |
| 41 | + set -x -e |
| 42 | + cd /workspace && make |
| 43 | + BUILD_ID_FULL=$BUILD_ID |
| 44 | + BUILD_ID_SHORT=$${BUILD_ID_FULL:0:6} |
| 45 | + EXAMPLE_BP=examples/gke-tpu-v6/gke-tpu-v6.yaml |
| 46 | + # adding vm to act as remote node |
| 47 | + echo ' - id: remote-node' >> $${EXAMPLE_BP} |
| 48 | + echo ' source: modules/compute/vm-instance' >> $${EXAMPLE_BP} |
| 49 | + echo ' use: [gke-tpu-v6-net-0]' >> $${EXAMPLE_BP} |
| 50 | + echo ' settings:' >> $${EXAMPLE_BP} |
| 51 | + echo ' machine_type: n2-standard-2' >> $${EXAMPLE_BP} |
| 52 | + echo ' name_prefix: remote-node' >> $${EXAMPLE_BP} |
| 53 | + echo ' add_deployment_name_before_prefix: true' >> $${EXAMPLE_BP} |
| 54 | + echo '' |
| 55 | + echo ' - id: job_template_hostname' >> $${EXAMPLE_BP} |
| 56 | + echo ' source: modules/compute/gke-job-template' >> $${EXAMPLE_BP} |
| 57 | + echo ' use: [gke-tpu-v6-pool]' >> $${EXAMPLE_BP} |
| 58 | + echo ' settings:' >> $${EXAMPLE_BP} |
| 59 | + echo ' image: us-docker.pkg.dev/cloud-tpu-images/jax-ai-image/tpu:latest' >> $${EXAMPLE_BP} |
| 60 | + echo ' command:' >> $${EXAMPLE_BP} |
| 61 | + echo ' - /bin/bash' >> $${EXAMPLE_BP} |
| 62 | + echo ' - -c' >> $${EXAMPLE_BP} |
| 63 | + echo ' - python -c '\''import jax; print(jax.device_count(), "TPU cores")'\''' >> $${EXAMPLE_BP} |
| 64 | + echo ' node_count: 1' >> $${EXAMPLE_BP} |
| 65 | + echo ' outputs: [instructions]' >> $${EXAMPLE_BP} |
| 66 | +
|
| 67 | + ansible-playbook tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml \ |
| 68 | + --user=sa_106486320838376751393 --extra-vars="project=${PROJECT_ID} build=$${BUILD_ID_SHORT}" \ |
| 69 | + --extra-vars="@tools/cloud-build/daily-tests/tests/gke-tpu-v6e.yml" |
0 commit comments