|
| 1 | +# TritonBench Infra Configuration on Google Cloud Platform |
| 2 | + |
| 3 | +It defines the specification of infrastruture used by TorchBench CI. |
| 4 | +The Infra is a Kubernetes cluster built on top of Google Cloud Platform. |
| 5 | + |
| 6 | +## Step 1: Create the cluster and install the ARC Controller |
| 7 | + |
| 8 | +``` |
| 9 | +# Get credentials for the cluster so that kubectl could use it |
| 10 | +gcloud container clusters get-credentials --location us-central1 tritonbench-h100-cluster |
| 11 | +
|
| 12 | +# Install the ARC controller |
| 13 | +INSTALLATION_NAME="gcp-h100-runner" |
| 14 | +NAMESPACE="arc-systems" |
| 15 | +helm install "${INSTALLATION_NAME}" \ |
| 16 | + --namespace "${NAMESPACE}" \ |
| 17 | + --create-namespace \ |
| 18 | + oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controller |
| 19 | +``` |
| 20 | + |
| 21 | +### Maintainence |
| 22 | + |
| 23 | +To uninstall the ARC controller: |
| 24 | + |
| 25 | +``` |
| 26 | +INSTALLATION_NAME="gcp-h100-runner" |
| 27 | +NAMESPACE="arc-systems" |
| 28 | +helm uninstall -n "${NAMESPACE}" "${INSTALLATION_NAME}" |
| 29 | +``` |
| 30 | + |
| 31 | +To inspect the controller installation logs: |
| 32 | + |
| 33 | +``` |
| 34 | +NAMESPACE="arc-systems" |
| 35 | +kubectl get pods -n "${NAMESPACE}" |
| 36 | +# get the pod name like gcp-h100-runner-gha-rs-controller-... |
| 37 | +kubectl logs -n ${NAMESPACE} gcp-h100-runner-gha-rs-controller-... |
| 38 | +``` |
| 39 | + |
| 40 | +## Step 2: Create secrets and assign it to the namespace |
| 41 | + |
| 42 | +The secrets need to be added to both `arc-systems` and `arc-runners` namespaces. |
| 43 | + |
| 44 | +``` |
| 45 | +# Set GitHub App secret |
| 46 | +kubectl create secret generic arc-secret \ |
| 47 | + --namespace=arc-runners \ |
| 48 | + --from-literal=github_app_id=${GITHUB_APP_ID} \ |
| 49 | + --from-literal=github_app_installation_id=${GITHUB_APP_INSTALL_ID} \ |
| 50 | + --from-file=github_app_private_key=${GITHUB_APP_PRIVKEY_FILE} |
| 51 | +
|
| 52 | +# Alternatively, set classic PAT |
| 53 | +kubectl create secret generic arc-secret \ |
| 54 | + --namespace=arc-runners \ |
| 55 | + --from-literal=github_token="<GITHUB_PAT>" |
| 56 | +``` |
| 57 | + |
| 58 | +To get, delete, or update the secrets: |
| 59 | + |
| 60 | +``` |
| 61 | +# Get |
| 62 | +kubectl get -A secrets |
| 63 | +# Delete |
| 64 | +kubectl delete secrets -n arc-runners arc-secret |
| 65 | +# Update |
| 66 | +kubectl edit secrets -n arc-runners arc-secret |
| 67 | +``` |
| 68 | + |
| 69 | +## Step 3: Install runner scale set |
| 70 | + |
| 71 | +``` |
| 72 | +INSTALLATION_NAME="gcp-h100-runner" |
| 73 | +NAMESPACE="arc-runners" |
| 74 | +GITHUB_SECRET_NAME="arc-secret" |
| 75 | +helm install "${INSTALLATION_NAME}" \ |
| 76 | + --namespace "${NAMESPACE}" \ |
| 77 | + --create-namespace \ |
| 78 | + -f values.yaml \ |
| 79 | + oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set |
| 80 | +``` |
| 81 | + |
| 82 | +To upgrade or uninstall the runner scale set: |
| 83 | + |
| 84 | +``` |
| 85 | +# command to upgrade |
| 86 | +helm upgrade --install gcp-h100-runner -n arc-runners -f ./values.yaml oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set |
| 87 | +
|
| 88 | +# command to uninstall |
| 89 | +helm uninstall -n arc-runners gcp-h100-runner |
| 90 | +``` |
| 91 | + |
| 92 | +To inspect runner sacle set logs: |
| 93 | + |
| 94 | +``` |
| 95 | +kubectl get pods -n arc-runners |
| 96 | +# get arc runner name like gcp-h100-runner-... |
| 97 | +# inspect the logs |
| 98 | +kubectl logs -n arc-runners gcp-h100-runner-... |
| 99 | +``` |
| 100 | + |
| 101 | +## Step 4: Install NVIDIA driver on the K8s host machine |
| 102 | + |
| 103 | +``` |
| 104 | +kubectl apply -f daemonset.yaml |
| 105 | +``` |
| 106 | + |
| 107 | +When the host machine runs Ubuntu, use the following command to find all available driver versions: |
| 108 | + |
| 109 | +``` |
| 110 | +gsutil ls gs://ubuntu_nvidia_packages/ |
| 111 | +
|
| 112 | +# For example: |
| 113 | +# gsutil ls gs://ubuntu_nvidia_packages/nvidia-driver-gke_jammy-5.15.0-1048-gke-535.104.05_amd64.deb |
| 114 | +``` |
| 115 | + |
| 116 | + |
| 117 | +## Troubleshooting |
| 118 | + |
| 119 | +If all the Pods are created but in `Pending` state, it could be the NVIDIA driver version updates and |
| 120 | +the old version is deleted. |
| 121 | + |
| 122 | +To check if the NVIDIA driver is installed correctly: |
| 123 | + |
| 124 | +``` |
| 125 | +kubectl -n kube-system logs -f daemonset.apps/nvidia-driver-installer -c nvidia-driver-installer |
| 126 | +``` |
| 127 | + |
| 128 | +If the NVIDIA driver file is not found, find the available versions using |
| 129 | + |
| 130 | +``` |
| 131 | +gsutil ls gs://ubuntu_nvidia_packages/ |
| 132 | +``` |
| 133 | + |
| 134 | +and update the version in `daemonset.yaml`. |
0 commit comments