Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Getting Started

Omar Jarjur edited this page Jul 9, 2018 · 21 revisions

Getting Started

The easiest way to get started with Cloud Datalab is to visit the docs here.

In particular, the quickstart will guide you through launching an instance of Google CLoud Datalab on the Google Cloud Platform.

Using DataLab locally

DataLab is built and packaged as a docker container.

If you want to help develop Datalab, you can use docker build and run locally.

Clone the Datalab repo, build it and run it:

git clone https://github.com/GoogleCloudPlatform/datalab.git
cd datalab/containers/datalab
# Replace the MyProjectID value in the next line with your project ID
PROJECT_ID=MyProjectID
./build.sh && ./run.sh

If you want to customize the container the place to start is in containers/datalab/Dockerfile.in.

Using your modified Datalab image on GCE

Once you have built your modified image and tested it locally, you can also test it in a Google Container Engine VM using the datalab command line tool.

First, tag your modified image and push it to the Google Container Registry:

docker tag datalab gcr.io/${PROJECT_ID}/datalab
docker push gcr.io/${PROJECT_ID}/datalab

Then, use the --image-name flag to use that image when launching your VM:

datalab create --image-name=gcr.io/${PROJECT_ID}/datalab ${INSTANCE_NAME}

When you no longer need the GCE instance, you can delete it:

datalab delete ${INSTANCE_NAME}

The persistent disk will still have your notebooks and you can create a new compute instance later and reuse the disk. If you want to delete the disk, including your notebooks, use:

datalab delete --delete-disk ${INSTANCE_NAME}