-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
8 changed files
with
298 additions
and
252 deletions.
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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: E2E setup | ||
description: Setup torchprime, docker, and gcloud for E2E tests | ||
inputs: | ||
gcp_project: | ||
required: true | ||
type: string | ||
gcp_zone: | ||
required: true | ||
type: string | ||
xpk_cluster_name: | ||
required: true | ||
type: string | ||
tpu_type: | ||
required: true | ||
type: string | ||
artifact_dir: | ||
required: true | ||
type: string | ||
gcp_sa_key: | ||
description: GCP service account key | ||
required: true | ||
type: string | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Use Docker in rootless mode | ||
uses: ScribeMD/[email protected] | ||
- name: Add user to docker group | ||
run: | | ||
sudo usermod -aG docker $USER | ||
newgrp docker | ||
shell: bash | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
- name: Install dev dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e '.[dev]' | ||
shell: bash | ||
# Googlers: if this fails, follow http://shortn/_61iSj31q1b to debug. | ||
- uses: google-github-actions/auth@v2 | ||
with: | ||
credentials_json: '${{ inputs.gcp_sa_key }}' | ||
- uses: google-github-actions/setup-gcloud@v2 | ||
with: | ||
version: '>= 363.0.0' | ||
install_components: 'beta,gke-gcloud-auth-plugin' | ||
- name: Verify GCP setup | ||
run: gcloud info | ||
shell: bash | ||
- name: Authenticate Docker | ||
run: gcloud auth configure-docker --quiet | ||
shell: bash | ||
- name: Activate SA credentials | ||
run: gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS | ||
shell: bash | ||
- name: tp doctor | ||
run: tp doctor | ||
shell: bash | ||
- name: tp use | ||
run: > | ||
tp use | ||
--project '${{ inputs.gcp_project }}' | ||
--zone '${{ inputs.gcp_zone }}' | ||
--cluster '${{ inputs.xpk_cluster_name }}' | ||
--num-slices 1 | ||
--artifact-dir '${{ inputs.artifact_dir }}' | ||
--tpu-type '${{ inputs.tpu_type }}' | ||
shell: bash |
Oops, something went wrong.