Set up a project and enable the Cloud TPU API

Overview

Before you can use Cloud TPU resources to train models you must have a Cloud Billing account and a Google Cloud project. You must also activate the Cloud TPU API.

Prepare a Google Cloud project

In the Google Cloud console, sign in to your Google Account or sign up for a new account. Select or create a Cloud project from the project selector. 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.

In the Cloud Shell, set your project ID using gcloud. The project ID is the name of your project shown in the Google Cloud console.

$ gcloud config set project PROJECT-ID

Enable the Cloud TPU API

To train a model, you must activate the Cloud TPU API. You can activate the API from the Google Cloud console or using gcloud in the Cloud Shell:

gcloud

$ gcloud services enable tpu.googleapis.com

Console

  1. In the Google Cloud console, go to the Cloud TPU API page.

    Go to the Cloud TPU API page

  2. Click Enable.

What's next

  1. Run a Cloud TPU quickstart
  2. Learn how to create VM and TPU resources