NAME

gcloud compute tpus execution-groups create - create Google Compute TPUs along with VMs

SYNOPSIS

gcloud compute tpus execution-groups create [--accelerator-type=ACCELERATOR_TYPE; default="v2-8"] [--disk-size=DISK_SIZE; default="250GB"] [--dry-run] [--forward-ports] [--gce-image=GCE_IMAGE] [--machine-type=MACHINE_TYPE; default="n1-standard-1"] [--name=NAME] [--network=NETWORK; default="default"] [--preemptible] [--preemptible-vm] [--tf-version=TF_VERSION] [--tpu-only] [--use-dl-images] [--use-with-notebook] [--vm-only] [--zone=ZONE] [GCLOUD_WIDE_FLAG ...]

EXAMPLES

To create both TPU and VM, run:

$ gcloud compute tpus execution-groups create \ --name=test-execution-group --zone=test-zone \ --project=test-project --accelerator-type=v2-8 \ --tf-version=2.4.1

To create both TPU and VM with additional flags, run:

$ gcloud compute tpus execution-groups create \ --name=test-execution-group --zone=test-zone \ --project=test-project --accelerator-type=v2-8 \ --tf-version=2.4.1 --network=default --preemptible-vm \ --disk-size=100 --machine-type=n1-standard-2 --use-dl-images

To create a VM only before creating the TPU, run:

$ gcloud compute tpus execution-groups create \ --name=test-execution-group-tpu-only --zone=test-zone \ --project=test-project --accelerator-type=v2-8 \ --tf-version=2.4.1 --tpu-only

To create the TPU only after the VM has been created, run:

$ gcloud compute tpus execution-groups create \ --name=test-execution-group-tpu-only --zone=test-zone \ --project=test-project --accelerator-type=v2-8 \ --tf-version=2.4.1 --vm-only

FLAGS

--accelerator-type=ACCELERATOR_TYPE; default="v2-8"

TPU accelerator type for the TPU. If not specified, this defaults to v2-8.

--disk-size=DISK_SIZE; default="250GB"

Configures the root volume size of your Compute Engine VM (in GB). The minimum size is 20GB and the maximum is 2000GB. Specified value must be an integer multiple of Gigabytes.

--dry-run

Do not make changes; print only what would have happened.

--forward-ports

Automatically forward useful ports from the Compute Engine VM to your local machine. The ports forwarded are: 6006 (tensorboard), 8888 (jupyter notebooks), 8470 (TPU port), 8466 (TPU profiler port).

Enabled by default, use --no-forward-ports to disable.

--gce-image=GCE_IMAGE

Override the automatically chosen Compute Engine Image. Use this flag when you're using your own custom images instead of the provided ones with TensorFlow pre-installed.

--machine-type=MACHINE_TYPE; default="n1-standard-1"

Specifies the machine type used for the Compute Engine VM. To get a list of available machine types, run 'gcloud compute machine-types list'. If unspecified, the default type is n1-standard-1.

--name=NAME

Override the name to use for VMs and TPUs (defaults to your username).

--network=NETWORK; default="default"

Specifies the network the Cloud TPU and associated VM should be created in. If unspecified, the network "default" is picked.

--preemptible

Create a preemptible Cloud TPU, instead of a normal (non-preemptible) Cloud TPU. A preemptible Cloud TPU costs less per hour, but the Cloud TPU service can stop/terminate the node at any time.

--preemptible-vm

Create a preemptible Compute Engine VM, instead of a normal (non-preemptible) VM. A preemptible VM costs less per hour, but the Compute Engine service can terminate the instance at any time.

--tf-version=TF_VERSION

Set the version of TensorFlow to use when creating the Compute Engine VM and the Cloud TPU. (It defaults to auto-selecting the latest stable release.)

--tpu-only

Do not allocate a VM, only allocate a TPU. To be used after the command has been run with a --vm-only flag and the user is ready to run on a TPU. Ensure that the name matches the name passed in when creating with the --vm-only flag.

--use-dl-images

Use Deep Learning VM Images (see docs - https://cloud.google.com/deep-learning-vm/) instead of TPU-specific machine images. Defaults to TPU-specific images. This value is set to true automatically if the --use-with-notebook flag is set to true.

--use-with-notebook

Allow Compute Engine VM to be recognized by Cloud AI Notebooks. This automatically sets the content of the flag --use-dl-images flag to be true.

--vm-only

Do not allocate a TPU, only allocate a VM (useful if you're not ready to run on a TPU yet).

--zone=ZONE

Zone of the tpu to create. If not specified and the compute/zone property isn't set, you might be prompted to select a zone (interactive mode only).

To avoid prompting when this flag is omitted, you can set the compute/zone property:

$ gcloud config set compute/zone ZONE

A list of zones can be fetched by running:

$ gcloud compute zones list

To unset the property, run:

$ gcloud config unset compute/zone

Alternatively, the zone can be stored in the environment variable CLOUDSDK_COMPUTE_ZONE.

GCLOUD WIDE FLAGS

These flags are available to all commands: --access-token-file, --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.

Run $ gcloud help for details.

NOTES

These variants are also available:

$ gcloud alpha compute tpus execution-groups create

$ gcloud beta compute tpus execution-groups create