-
Notifications
You must be signed in to change notification settings - Fork 249
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.
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
.
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}