Options for the create command

This page describes the datalab create command.

Usage

datalab create [-h] [--image-name IMAGE_NAME] [--disk-name DISK_NAME]
               [--disk-size-gb DISK_SIZE_GB]  [--network-name NETWORK_NAME]
               [--idle-timeout IDLE_TIMEOUT] [--machine-type MACHINE_TYPE]
               [--no-connect] [--no-backups] [--no-create-repository]
               [--log-level {trace,debug,info,warn,error,fatal}]
               [--for-user FOR_USER] [--service-account SERVICE_ACCOUNT]
               [--port PORT] [--max-reconnects MAX_RECONNECTS]
               [--ssh-log-level {quiet,fatal,error,info,verbose,debug,debug1,debug2,debug3}]
               [--no-launch-browser] [--project PROJECT] [--quiet]
               [--verbosity {debug,info,warning,error,critical,none}]
               [--zone ZONE]
               NAME

datalab create creates a new Datalab instance running in a Google Compute Engine VM.

This command also creates the datalab-network network if necessary.

By default, the command creates a persistent connection to the newly created instance. You can disable that behavior by passing in the --no-connect flag.

Options

-h/--help

Show a help message and exit

--image-name IMAGE_NAME

Name of the Datalab image to run.

If not specified, this defaults to the most recently published image.

--disk-name DISK_NAME

Name of the persistent disk used to store notebooks.

If not specified, this defaults to having a name based on the instance name.

--disk-size-gb DISK_SIZE_GB

Size of the persistent disk in GB.

--network-name NETWORK_NAME

Name of the network to which the instance will be attached.

--idle-timeout IDLE_TIMEOUT

Interval after which an idle Datalab instance will shut down.

You can specify a mix of days, hours, minutes and seconds using those names or d, h, m and s, for example "1h 30m". Specify 0s to disable.

--machine-type MACHINE_TYPE

The machine type of the instance.

To get a list of available machine types, run gcloud compute machine-types list or see Machine Types.

If not specified, the default type is n1-standard-1.

--no-connect

Do not connect to the newly created instance

--no-backups

Do not automatically backup the disk contents to GCS

--no-create-repository

Do not create the datalab-notebooks repository if it is missing

--log-level {trace,debug,info,warn,error,fatal}

The log level for Datalab instance.

This is the threshold under which log entries from the Datalab instance will not be written to StackDriver logging.

The default log level is "warn".

--for-user FOR_USER

Create the datalab instance on behalf of the specified user

--service-account SERVICE_ACCOUNT

A service account is an identity attached to the instance. Its access tokens can be accessed through the instance metadata server and are used to authenticate API calls made from Datalab. The account can be either an email address or an alias corresponding to a service account. You can explicitly specify the Compute Engine default service account using the 'default' alias.

If not provided, the instance will get project's default service account.

--port PORT

Local port on which Datalab is accessible

--max-reconnects MAX_RECONNECTS

Maximum number of times to reconnect.

A negative value means no limit.

--ssh-log-level {quiet,fatal,error,info,verbose,debug,debug1,debug2,debug3}

The log level for the SSH command.

This may be useful for debugging issues with an SSH connection.

The default log level is "error".

--no-launch-browser

Do not open a browser connected to Datalab

--project PROJECT

The Google Cloud Platform project name to use for this invocation.

If omitted then the current project is assumed.

--quiet

Do not issue any interactive prompts

--verbosity {debug,info,warning,error,critical,none}

Override the default output verbosity for this command.

--zone ZONE

The zone containing the instance. If not specified, you may be prompted to select a zone.

To avoid prompting when this flag is omitted, you can set the compute/zone property:

$ gcloud config set compute/zone ZONE

A list of zones can be fetched by running:

$ gcloud compute zones list

To unset the property, run:

$ gcloud config unset compute/zone

Alternatively, the zone can be stored in the environment variable CLOUDSDK_COMPUTE_ZONE.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Google Cloud Datalab Documentation