Before you can use Cloud TPU resources to train models you must have a Cloud Billing account and have a project set up for that purpose.
- Set up a Google Cloud account.
- Set up a Cloud TPU project.
- Enable billing for your Cloud TPU project.
- Activate the Cloud TPU APIs.
- Set up a Service Account.
Create a Google Cloud account and a Cloud TPU project
You can set up a Google Cloud account by creating a Cloud TPU project:
Go to the Cloud Console and create a project.
While setting up your project, you will be asked to set up a billing account. You will only be charged after you start using Google Cloud resources. To learn more about billing, read the Cloud Billing documentation.
Once you've set up your project and billing account, you can set up a Cloud Storage bucket and the Compute Engine VM and TPU resources needed for Cloud TPU training.
Activate VM and TPU APIs
To train a model, you must activate the Compute Engine and Cloud TPU APIs. You can automatically activate an API by opening its page on the Cloud Console, as follows:
Click on each of the following links.
The APIs are now activated.
Close both console pages.
Set up a TPU Service Account
When training a model, you will generally use a Cloud Storage bucket to store training data and training output. You need a Cloud TPU Service Account in order to access a Cloud Storage bucket.
Create a Cloud TPU Service Account for your project.
gcloud beta services identity create --service tpu.googleapis.com --project $PROJECT_ID
Once the Service Account has been set up, the Cloud TPU Service Account is displayed in following format:
- Read Cloud TPU Beginner's Guide.
- Learn about using storage buckets.
- Learn about Service Accounts and granting storage buckets access to TPU service accounts.
- Learn how to create VM and TPU resources.