az batchai cluster
This command group is implicitly deprecated because command group 'batchai' is deprecated and will be removed in a future release.
Commands to manage clusters.
Commands
Name | Description | Type | Status |
---|---|---|---|
az batchai cluster auto-scale |
Set auto-scale parameters for a cluster. |
Core | Deprecated |
az batchai cluster create |
Create a cluster. |
Core | Deprecated |
az batchai cluster delete |
Delete a cluster. |
Core | Deprecated |
az batchai cluster file |
Commands to work with files generated by node setup task. |
Core | Deprecated |
az batchai cluster file list |
List files generated by the cluster's node setup task. |
Core | Deprecated |
az batchai cluster list |
List clusters. |
Core | Deprecated |
az batchai cluster node |
Commands to work with cluster nodes. |
Core | Deprecated |
az batchai cluster node exec |
Executes a command line on a cluster's node with optional ports forwarding. |
Core | Deprecated |
az batchai cluster node list |
List remote login information for cluster's nodes. |
Core | Deprecated |
az batchai cluster resize |
Resize a cluster. |
Core | Deprecated |
az batchai cluster show |
Show information about a cluster. |
Core | Deprecated |
az batchai cluster auto-scale
This command is implicitly deprecated because command group 'batchai' is deprecated and will be removed in a future release.
Set auto-scale parameters for a cluster.
az batchai cluster auto-scale --max
--min
[--ids]
[--name]
[--resource-group]
[--subscription]
[--workspace]
Examples
Make a cluster to auto scale between 0 and 10 nodes depending on number of queued and running jobs.
az batchai cluster auto-scale -g MyResourceGroup -w MyWorkspace -n MyCluster --min 0 --max 10
Required Parameters
Maximum number of nodes.
Minimum number of nodes.
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Name of workspace.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az batchai cluster create
This command is implicitly deprecated because command group 'batchai' is deprecated and will be removed in a future release.
Create a cluster.
az batchai cluster create --name
--resource-group
--workspace
[--afs-mount-path]
[--afs-name]
[--bfs-mount-path]
[--bfs-name]
[--config-file]
[--custom-image]
[--generate-ssh-keys]
[--image]
[--max]
[--min]
[--nfs]
[--nfs-mount-path]
[--password]
[--setup-task]
[--setup-task-output]
[--ssh-key]
[--storage-account-key]
[--storage-account-name]
[--subnet]
[--target]
[--use-auto-storage]
[--user-name]
[--vm-priority {dedicated, lowpriority}]
[--vm-size]
Examples
Create a single node GPU cluster with default image and auto-storage account.
az batchai cluster create -g MyResourceGroup -w MyWorkspace -n MyCluster \
-s Standard_NC6 -t 1 --use-auto-storage --generate-ssh-keys
Create a cluster with a setup command which installs unzip on every node, the command output will be stored on auto storage account Azure File Share.
az batchai cluster create -g MyResourceGroup -w MyWorkspace -n MyCluster \
--use-auto-storage \
-s Standard_NC6 -t 1 -k id_rsa.pub \
--setup-task 'apt update; apt install unzip -y' \
--setup-task-output '$AZ_BATCHAI_MOUNT_ROOT/autoafs'
Create a cluster providing all parameters manually.
az batchai cluster create -g MyResourceGroup -w MyWorkspace -n MyCluster \
-i UbuntuLTS -s Standard_NC6 --vm-priority lowpriority \
--min 0 --target 1 --max 10 \
--storage-account-name MyStorageAccount \
--nfs MyNfsToMount --afs-name MyAzureFileShareToMount \
--bfs-name MyBlobContainerNameToMount \
-u AdminUserName -k id_rsa.pub -p ImpossibleToGuessPassword
Create a cluster using a configuration file.
az batchai cluster create -g MyResourceGroup -w MyWorkspace -n MyCluster -f cluster.json
Required Parameters
Name of cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of workspace.
Optional Parameters
Relative mount path for Azure File share. The file share will be available at $AZ_BATCHAI_MOUNT_ROOT/<relative_mount_path> folder.
Name of Azure File Share to be mounted on each cluster node. Must be used in conjunction with --storage-account-name. Multiple shares can be mounted using configuration file (see --config-file option).
Relative mount path for Azure Storage container. The container will be available at $AZ_BATCHAI_MOUNT_ROOT/<relative_mount_path> folder.
Name of Azure Storage container to be mounted on each cluster node. Must be used in conjunction with --storage-account-name. Multiple containers can be mounted using configuration file (see --config-file option).
A path to a json file containing cluster create parameters (json representation of azure.mgmt.batchai.models.ClusterCreateParameters).
ARM ID of a virtual machine image to be used for nodes creation. Note, you need to provide --image containing information about the base image used for this image creation.
Generate SSH public and private key files in ~/.ssh directory (if missing).
Operation system image for cluster nodes. The value may contain an alias (UbuntuLTS, UbuntuDSVM) or specify image details in the form "publisher:offer:sku:version". If image configuration is not provided via command line or configuration file, Batch AI will choose default OS image.
Max nodes count for the auto-scale cluster.
Min nodes count for the auto-scale cluster.
Name or ARM ID of a file server to be mounted on each cluster node. You need to provide full ARM ID if the file server belongs to a different workspace. Multiple NFS can be mounted using configuration file (see --config-file option).
Relative mount path for NFS. The NFS will be available at $AZ_BATCHAI_MOUNT_ROOT/<relative_mount_path> folder.
Optional password for the admin user account to be created on each compute node.
A command line which should be executed on each compute node when it's got allocated or rebooted. The task is executed in a bash subshell under root account.
Directory path to store where setup-task's logs. Note, Batch AI will create several helper directories under this path. The created directories are reported as stdOutErrPathSuffix by 'az cluster show' command.
Optional SSH public key value or path. If ommited and no password specified, default SSH key (~/.ssh/id_rsa.pub) will be used.
Storage account key. Required if the storage account belongs to a different subscription. Can be specified using AZURE_BATCHAI_STORAGE_KEY environment variable.
Storage account name for Azure File Shares and/or Azure Storage Containers to be mounted on each cluster node. Can be specified using AZURE_BATCHAI_STORAGE_ACCOUNT environment variable.
ARM ID of a virtual network subnet to put the cluster in.
Number of nodes which should be allocated immediately after cluster creation. If the cluster is in auto-scale mode, BatchAI can change the number of nodes later based on number of running and queued jobs.
If provided, the command will create a storage account in a new or existing resource group named "batchaiautostorage". It will also create Azure File Share with name "batchaishare", Azure Blob Container with name "batchaicontainer". The File Share and Blob Container will be mounted on each cluster node at $AZ_BATCHAI_MOUNT_ROOT/autoafs and $AZ_BATCHAI_MOUNT_ROOT/autobfs. If the resource group already exists and contains an approapriate storage account belonging to the same region as cluster, this command will reuse existing storage account.
Name of admin user account to be created on each compute node. If the value is not provided and no user configuration is provided in the config file, current user's name will be used.
VM priority.
VM size for cluster nodes (e.g. Standard_NC6 for 1 GPU node).
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az batchai cluster delete
This command is implicitly deprecated because command group 'batchai' is deprecated and will be removed in a future release.
Delete a cluster.
az batchai cluster delete [--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
[--workspace]
[--yes]
Examples
Delete a cluster and wait for deletion to be completed.
az batchai cluster delete -g MyResourceGroup -w MyWorkspace -n MyCluster
Send a delete command for a cluster and do not wait for deletion to be completed.
az batchai cluster delete -g MyResourceGroup -w MyWorkspace -n MyCluster --no-wait
Delete cluster without asking for confirmation (for non-interactive scenarios).
az batchai cluster delete -g MyResourceGroup -w MyWorkspace -n MyCluster -y
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of cluster.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Name of workspace.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az batchai cluster list
This command is implicitly deprecated because command group 'batchai' is deprecated and will be removed in a future release.
List clusters.
az batchai cluster list --resource-group
--workspace
Examples
List all clusters in a workspace.
az batchai cluster list -g MyResourceGroup -w MyWorkspace -o table
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of workspace.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az batchai cluster resize
This command is implicitly deprecated because command group 'batchai' is deprecated and will be removed in a future release.
Resize a cluster.
az batchai cluster resize --target
[--ids]
[--name]
[--resource-group]
[--subscription]
[--workspace]
Examples
Resize a cluster to zero size to stop paying for it.
az batchai cluster resize -g MyResourceGroup -w MyWorkspace -n MyCluster -t 0
Resize a cluster to have 10 nodes.
az batchai cluster resize -g MyResourceGroup -w MyWorkspace -n MyCluster -t 10
Required Parameters
Target number of compute nodes.
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Name of workspace.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az batchai cluster show
This command is implicitly deprecated because command group 'batchai' is deprecated and will be removed in a future release.
Show information about a cluster.
az batchai cluster show [--ids]
[--name]
[--resource-group]
[--subscription]
[--workspace]
Examples
Show full information about a cluster.
az batchai cluster show -g MyResourceGroup -w MyWorkspace -n MyCluster
Show cluster's summary.
az batchai cluster show -g MyResourceGroup -w MyWorkspace -n MyCluster -o table
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of cluster.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Name of workspace.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.