Before you begin

  1. Sign in to your Google account.

    If you don't already have one, sign up for a new account.

  2. Select or create a Cloud Platform project.

    Go to the Manage resources page

  3. Enable billing for your project.

    Enable billing

  4. Enable the Google Compute Engine and Cloud Source Repositories APIs.

    Enable the APIs

  5. Install and initialize the Cloud SDK.

Steps to set up and open Cloud Datalab

From a terminal window on your local machine:

  1. Get the latest gcloud command.
    gcloud components update
  2. Install the gcloud datalab component.
    gcloud components install datalab
  3. Create a Cloud Datalab instance. The name of the instance must start with a lowercase letter, followed by up to 63 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
    datalab create datalab-instance-name
    If the command returns an error, re-run the command with the following debug flag to help diagnose the problem: datalab create --verbosity=debug datalab-instance-name.
  4. Open the Cloud Datalab home page in your browser.

Clean up

To avoid incurring charges to your Google Cloud Platform account for the resources used in this quickstart:

  1. You incur charges from the time of creation to the time of deletion of the Cloud Datalab VM instance (see Cloud Datalab Pricing). You are also charged for the Persistent Disk where notebooks are stored. The Persistent Disk remains after the deletion of the VM until you delete it. The following command deletes both the VM instance and its Persistent Disk.
    datalab delete --delete-disk instance-name
  2. Other cleanup tasks. Additional resources are created by the datalab create command, and will be reused by other Cloud Datalab instances that you create. You can run the following commands to delete the additional resources listed below if you do not expect to create additional Cloud Datalab instances.

    • Delete the datalab-network-allow-ssh firewall rule, which allows SSH connections to your Cloud Datalab instances:
      gcloud compute firewall-rules delete datalab-network-allow-ssh
    • Delete the datalab-network Virtual Private Cloud (VPC) network, to which Datalab instances are connected by default.
      gcloud compute networks delete datalab-network
    • Delete the datalab-notebooks Cloud Source Repository, which is set up for you to store your notebooks (see Working with notebooks if you wish to backup notebooks before deleting the repo).
      gcloud source repos delete datalab-notebooks

What's next

  1. Browse the /datalab/docs/intro Cloud Datalab notebook folder to become familiar with the capabilities of Cloud Datalab. You will find tutorials and samples for using Google Cloud Platform services and for performing common data analysis tasks.
  2. You can view the datalab server VM logs with the Cloud Platform Console logs viewer.
  3. Read Cloud Datalab How-to Guides.
  4. Learn more about the options available in the datalab command line tool by running datalab --help.
  5. Learn about Using Datalab in a team environment.

Send feedback about...

Google Cloud Datalab Documentation