Google Cloud Datalab
- Prabhu D M
- Aug 20, 2018
- 2 min read

Google Cloud Datalab is an easy to use interactive tool for data exploration, analysis, visualization and machine learning. It is available on Google Cloud Compute and is free of cost.


Google Cloud Datalab is basically a Docker container that gets deployed on an Google Compute Engine Instance. The Docker image has all the necessary tools and API's that we would require do to Data Analysis and Machine Learning. However we are not limited there and we can install any API that we require.
Let me tell you how to create a Google Cloud Datalab on Google Cloud.
If you already have a Google Account login to Google Cloud or if you don't have one, create a Google account and login into Google Cloud.
If it is a new account, create a Project.
Make sure that billing is enabled and all the necessary API's are enabled.
Activate Google Cloud Shell.
In the cloud shell, type the below command to get the available zones.
Get the zone where you want to create the datalab instance in and execute the below command
Look back at Cloud Shell, and follow any prompts. If asked for a ssh passphrase, just hit return (for no passphrase).
Wait for the datalab to create. You should see a shell window similar to the below one.

As instructed in the google shell, select "Web preview" and change the port to 8081.
Now, a new window should have opened with your Cloud Datalab instance where a Python Notebook is running.
This Notebook is pre installed with a wide variety of DS and ML python API's such as pandas, numpy, sklearn, tensorflow etc., Please look at the Cloud Datalab documentation to get a full list of documentation that is available.
The instance stays active only until the Google Cloud Shell is open and also shuts down if it has been idle for more than 60 mins.
If your instance has been shut down follow the below steps to reconnect to your instance.
After this step, wait for the Datalab instance to start and you can follow the same procedure of changing the port to 8081 and start working on your Jupyter Notebook.

Comments