- NAME
-
- gcloud alpha compute tpus create - create a new Cloud TPU
- SYNOPSIS
-
-
gcloud alpha compute tpus create
(TPU
:--zone
=ZONE
)--version
=VERSION
[--accelerator-type
=ACCELERATOR_TYPE
; default="v2-8"] [--async
] [--description
=DESCRIPTION
] [--network
=NETWORK
; default="default"] [--preemptible
] [--range
=RANGE
] [--reserved
] [--use-service-networking
] [--model-base-path
=MODEL_BASE_PATH
--model-name
=MODEL_NAME
|--model-config-file
=MODEL_CONFIG_FILE
--platform-config-file
=PLATFORM_CONFIG_FILE
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
(ALPHA)
Create a new Cloud TPU. - EXAMPLES
-
The following command creates a TPU with ID
my-tpu
in the default user project, network and compute/region (with other defaults supplied by API): The following command creates a TPU with IDgcloud alpha compute tpus create my-tpu
my-tpu
with explicit values for all required and optional parameters:gcloud alpha compute tpus create my-tpu --zone=us-central1-a --range='10.240.0.0/29' --accelerator-type='v2-8' --network=my-tf-network --description='My TF Node' --version='1.1'
- POSITIONAL ARGUMENTS
-
-
Tpu resource - The Cloud TPU you want to create. The arguments in this group can
be used to specify the attributes of this resource. (NOTE) Some attributes are
not given arguments in this group but can be set in other ways.
To set the
project
attribute:-
provide the argument
tpu
on the command line with a fully specified name; -
provide the argument
--project
on the command line; -
set the property
core/project
.
This must be specified.
TPU
-
ID of the tpu or fully qualified identifier for the tpu.
To set the
tpu
attribute:-
provide the argument
tpu
on the command line.
This positional argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--zone
=ZONE
-
The compute/zone of the Cloud TPU.
If not specified, will use
default
compute/zone. To set thezone
attribute:-
provide the argument
tpu
on the command line with a fully specified name; -
provide the argument
--zone
on the command line; -
set the property
compute/zone
.
-
provide the argument
-
provide the argument
-
Tpu resource - The Cloud TPU you want to create. The arguments in this group can
be used to specify the attributes of this resource. (NOTE) Some attributes are
not given arguments in this group but can be set in other ways.
- REQUIRED FLAGS
-
--version
=VERSION
-
TensorFlow version for the TPU, such as
1.14
. For a list of available TensorFlow versions please see https://www.tensorflow.org/versions/.
- OPTIONAL FLAGS
-
--accelerator-type
=ACCELERATOR_TYPE
; default="v2-8"-
TPU accelerator type for the TPU. If not specified, this defaults to
v2-8
.For a list of available accelerator types run:
--async
- Return immediately, without waiting for the operation in progress to complete.
--description
=DESCRIPTION
- Specifies a text description of the TPU.
--network
=NETWORK
; default="default"- Specifies the network that this TPU will be a part of.
--preemptible
-
If provided, the TPU will be preemptible and time-limited. It may be preempted
to free up resources for standard TPUs, and will only be able to run for a
limited amount of time.
Preemptible TPUs cannot be restarted.
--range
=RANGE
-
CIDR Range for the TPU.
The IP range that the TPU will select an IP address from. Must be in CIDR notation and a
/29
range, for example192.168.0.0/29
. Errors will occur if the CIDR range has already been used for a currently existing TPU, the CIDR range conflicts with any networks in the user's provided network, or the provided network is peered with another network that is using that CIDR range. --reserved
- When specified, will attempt to create the TPU node under reservations made in the current project. The reservations can be made separately but used in aggregated form. i.e., the user can make a reservation of 128 V2 TPUs and later on make another reservation of 128 V2 TPUs then creates a v2-256 TPU instance. If there exists no reservation or not sufficient amount of reserved cores under the project, the request will fail due to lack of capacity.
--use-service-networking
-
If provided, the TPU will be configured via the Service Networking (SN) API
instead of using a CIDR range. The Service Networking API should be enabled on
the project before creating the TPU.
For more information on Service Networking see https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started.
-
At most one of these can be specified:
--model-base-path
=MODEL_BASE_PATH
- Base path to exported saved model. This flag can be used instead of '--model-config-file' directly to specify the exported saved model's base path (excluding timestamp), whereas '--model-config-file' points to a Google Cloud Storage path to a ModelServerConfig proto.
--model-name
=MODEL_NAME
- Model name for tensorflow serving to serve to incoming requests. If not provided, 'serving_default' will be used.
--model-config-file
=MODEL_CONFIG_FILE
-
Google Cloud Storage URI of the configuration file for models to serve. For
example: 'gs://my_bucket/path/to/config.pbtxt'.
The contents of the model configuration file should look something like the following:
model_config_list: { config: { name: "Model1", base_path: "gs://my_bucket/path/to/model1", model_platform: "tensorflow" }, config: { name: "Model2", base_path: "gs://my_other_bucket/path/to/model2", model_platform: "tensorflow" }, }
--platform-config-file
=PLATFORM_CONFIG_FILE
-
Google Cloud Storage URI of configuration file for platform requirements. For
example: 'gs://my_bucket/path/to/platform.pbtxt'.
The contents of the platform configuration file should look something like the following:
platform_configs { key: "tensorflow" value { source_adapter_config { [type.googleapis.com/tensorflow.serving.SavedModelBundleSourceAdapterConfig] { legacy_config { saved_model_tags: "tpu" saved_model_tags: "serve" batching_parameters { max_batch_size { value: 8 } batch_timeout_micros { value: 50000 } max_enqueued_batches { value: 10000 } num_batch_threads { value: 8 } } } } } } }
- 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. - API REFERENCE
-
This command uses the
tpu/v1alpha1
API. The full documentation for this API can be found at: https://cloud.google.com/tpu/ - NOTES
-
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation-only early access
allowlist. These variants are also available:
gcloud compute tpus create
gcloud beta compute tpus create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-02-06 UTC.