Writing

A Gentle Introduction to Google Cloud Platform for Machine Learning Practice

21 July 2017Updated 14 October 20265 min read

An introduction to the Google Cloud Platform services for storage, processing and notebooks that support machine learning work. It ends with a walkthrough that uploads data to a storage bucket and opens a JupyterLab notebook on a cloud machine.

In a previous post, Machine Learning on the Cloud, we explained in plain language what machine learning is, what the cloud is and why cloud resources help machine learning practice.

In this post, we introduce Google Cloud Platform (GCP) as an option for doing machine learning in the cloud. We then walk through setting up an environment for building machine learning models on GCP.

Why GCP?

Google Cloud Platform, or GCP for short, is Google's set of public cloud services. Google is one of the major cloud providers, alongside Amazon Web Services and Microsoft Azure.

Google also runs products such as Search, Gmail, YouTube and Maps. These products generate, store and process very large amounts of data from users around the world every day. To handle this data, Google has invested for many years in research and infrastructure for storage, processing and networking.

GCP makes this kind of infrastructure available to the public. It offers fast computation and storage over a global network. Two terms describe its performance. Low latency means short delays when data moves. High throughput means a large amount of data processed in a given time.

As we see later in this post, it takes only a few steps to start doing machine learning on GCP.

Storage and Processing: The Core of Intelligence

One goal of artificial intelligence, of which machine learning is a subset, is to build machines that think and act intelligently. To do this, a machine must store the information it receives from its environment. It must also process that information to learn from it. Storage and processing are the two pillars of artificial intelligence, and networking moves data between them.

An Inspiration from Natural Intelligence

The same holds for natural intelligence. Human intelligence depends on our ability to store memories and to process information quickly. Networks of neurons carry signals between the parts of the brain that do this work.

Let's now look briefly at the main GCP services for storage and processing in machine learning practice.

Storage: Cloud Storage

Cloud Storage holds almost any kind of data, from tables in flat files to images, audio and video. Data lives in containers called buckets, and storage grows as your needs grow. A single object can be up to 5 TiB in size.

You can reach data in Cloud Storage from any location, and your project's permissions control who can read it. You pay for the data you store and for the operations and network transfers you use.

Processing: Compute Engine

Compute Engine gives you virtual machines that run in Google's data centers around the world. You choose the number of processors, the amount of memory and, if you need them, GPUs. With managed instance groups, autoscaling adds machines when the load rises and removes them when it falls.

As we saw in Machine Learning on the Cloud, the real gain from cloud computing comes from using as much computing power as a task needs and releasing it afterwards.

Playground: Managed Notebooks

Much of the work of building a model happens in notebooks. A notebook is an interactive document where we write code to clean, explore and prepare data, and see the results right away. We repeat this cycle many times as we develop a model.

Google's machine learning platform on GCP is Gemini Enterprise Agent Platform. Google introduced it in April 2026 as the evolution of Vertex AI, and it now delivers all Vertex AI services. It offers two notebook environments:

  • Agent Platform Workbench runs JupyterLab on a virtual machine that you configure, with the machine type, GPUs and disks you choose.
  • Colab Enterprise gives you shared, managed notebooks with no infrastructure to manage. It also works with BigQuery.

In the walkthrough below, we use a Workbench instance and read data from Cloud Storage.

Setting Up a Notebook for Machine Learning: A step-by-step walkthrough

Step 1: Create a Google Cloud account

Go to the Google Cloud free program page and sign up. New customers get a free trial with a $300 credit to spend over 90 days. You need a credit card or another payment method to sign up. Google does not charge you after the trial unless you upgrade to a paid billing account.

Step 2: Create a project

A project on GCP is a container for all the resources you use, such as buckets and virtual machines. Billing and permissions are set for each project. Create a project from the project selector at the top of the Google Cloud console. The guide Creating and managing projects explains the options.

Step 3: Upload data to Cloud Storage

Click the Cloud Shell icon in the console toolbar to open Cloud Shell. Cloud Shell is a terminal in your browser with the gcloud command-line tool already installed. Set your project, replacing PROJECT_ID with your project's ID:

bash
gcloud config set project PROJECT_ID

Create a bucket. Bucket names must be globally unique, so replace BUCKET_NAME with a name of your own. Choose a location close to you.

bash
gcloud storage buckets create gs://BUCKET_NAME --location=us-east1

Upload a data file to the bucket. To upload a folder, add the --recursive flag.

bash
gcloud storage cp my-data.csv gs://BUCKET_NAME/ gcloud storage cp --recursive my-data-folder gs://BUCKET_NAME/

You can also create the bucket and upload files from the Cloud Storage page in the console.

Step 4: Create a Workbench instance

Enable the Notebooks API for your project:

bash
gcloud services enable notebooks.googleapis.com

Then create an instance. Set --location to a zone close to you.

bash
gcloud workbench instances create my-first-instance \ --vm-image-project=cloud-notebooks-managed \ --vm-image-family=workbench-instances \ --machine-type=n1-standard-4 \ --location=us-central1-b

You can also create the instance in the console. Open the Workbench Instances page and click Create new.

Step 5: Open JupyterLab

When the instance is ready, go to the Instances page and click Open JupyterLab next to your instance. JupyterLab opens in a new tab. From the launcher, start a new Python notebook.

We are now ready for machine learning practice on Google Cloud Platform. The notebook can read the data we uploaded to the bucket.

Step 6: Stop the instance when you finish

A running instance keeps adding to your bill. Stop it when you are not using it:

bash
gcloud workbench instances stop my-first-instance --location=us-central1-b

Ekaba Bisong is a Ph.D. researcher at the University of Victoria and the founder of SiliconBlast. More about me