|
| 1 | +# A4X High Blueprints |
| 2 | + |
| 3 | +This document outlines the deployment steps for provisioning A4X High |
| 4 | +`a4x-highgpu-4g` VMs using Slurm as an orchestrator. |
| 5 | + |
| 6 | +## A4X-High Slurm Cluster Deployment |
| 7 | + |
| 8 | +### Build the Cluster Toolkit gcluster binary |
| 9 | + |
| 10 | +Follow instructions |
| 11 | +[here](https://cloud.google.com/cluster-toolkit/docs/setup/configure-environment), |
| 12 | +on how to set up your cluster toolkit environment, including enabling necessary |
| 13 | +APIs and IAM permissions. |
| 14 | + |
| 15 | +### (Optional, but recommended) Create a GCS Bucket for storing terraform state |
| 16 | + |
| 17 | + ```bash |
| 18 | + #!/bin/bash |
| 19 | + TF_STATE_BUCKET_NAME=<your-bucket> |
| 20 | + PROJECT_ID=<your-gcp-project> |
| 21 | + REGION=<your-preferred-region> |
| 22 | + gcloud storage buckets create gs://${TF_STATE_BUCKET_NAME} \ |
| 23 | + --project=${PROJECT_ID} \ |
| 24 | + --default-storage-class=STANDARD --location=${REGION} \ |
| 25 | + --uniform-bucket-level-access |
| 26 | + gcloud storage buckets update gs://${TF_STATE_BUCKET_NAME} --versioning |
| 27 | + ``` |
| 28 | + |
| 29 | +### Obtain Filestore Zonal Capacity |
| 30 | +We suggest using a filestore zonal instance for the best NFS performance, which |
| 31 | +may require a quota increase request. See |
| 32 | +[here](https://cloud.google.com/filestore/docs/requesting-quota-increases) for |
| 33 | +more information. The Slurm and VM blueprints below default to 10TiB (10240 GiB) |
| 34 | +instances. |
| 35 | + |
| 36 | +## A4X-High Slurm Cluster Deployment |
| 37 | + |
| 38 | +### Create/modify the deployment file with your preferred configuration |
| 39 | + |
| 40 | +For example, set the such as size, reservation to be used, etc, as well as the |
| 41 | +name of the bucket that you just created. Below are example contents for `a4xhigh-slurm-deployment.yaml`. |
| 42 | + |
| 43 | +```yaml |
| 44 | +--- |
| 45 | +terraform_backend_defaults: |
| 46 | + type: gcs |
| 47 | + configuration: |
| 48 | + bucket: TF_STATE_BUCKET_NAME |
| 49 | + |
| 50 | +vars: |
| 51 | + deployment_name: a4x-slurm |
| 52 | + project_id: <PROJECT_ID> |
| 53 | + region: <REGION> |
| 54 | + zone: <ZONE> |
| 55 | + a4x_reservation_name: <RESERVATION_NAME> |
| 56 | + a4x_cluster_size: <RESERVATION_SIZE> |
| 57 | +``` |
| 58 | +
|
| 59 | +### Deploy the cluster |
| 60 | +
|
| 61 | +``` bash |
| 62 | +#!/bin/bash |
| 63 | +gcluster deploy -d a4xhigh-slurm-deployment.yaml a4xhigh-slurm-blueprint.yaml |
| 64 | +``` |
| 65 | + |
| 66 | +### Re-deploy the cluster |
| 67 | + |
| 68 | +```bash |
| 69 | +#!/bin/bash |
| 70 | +gcluster deploy -d a4xhigh-slurm-deployment.yaml examples/machine-learning/a4x-highgpu-4g/a4xhigh-slurm-blueprint.yaml --only cluster-env,cluster --auto-approve -w |
| 71 | +``` |
| 72 | + |
| 73 | +### Destroy the cluster |
| 74 | + |
| 75 | +```bash |
| 76 | +#!/bin/bash |
| 77 | +./gcluster destroy <DEPLOYMENT_FOLDER> --auto-approve |
| 78 | +``` |
| 79 | + |
| 80 | +### Cloud Storage FUSE |
| 81 | + |
| 82 | +This blueprint includes four Cloud Storage FUSE mounts to provide a simple and scalable way |
| 83 | +to manage data. |
| 84 | + |
| 85 | +1. `/gcs` is a general purpose mount that can be used for shared tools and data. |
| 86 | +1. `/gcs-checkpoints` is an optimized mount for writing and reading checkpoints. It |
| 87 | + uses the local SSD for caching and enables parallel downloads to improve |
| 88 | + performance. |
| 89 | +1. `/gcs-training-data` is an optimized mount for reading training data. It can |
| 90 | + be further tuned if the training data fits fully within the local ssd |
| 91 | + storage. |
| 92 | +1. `/gcs-model-serving` is an optimized mount for serving models, which |
| 93 | + downloads model weights in parallel to local ssd. |
0 commit comments