gcloud notebooks environments create Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud notebooks environments create - request for creating environments
- SYNOPSIS
gcloud notebooks environments create(ENVIRONMENT:--location=LOCATION)([--container-repository=CONTAINER_REPOSITORY:--container-tag=CONTAINER_TAG] | [(--vm-image-family=VM_IMAGE_FAMILY; default="common-cpu" |--vm-image-name=VM_IMAGE_NAME) :--vm-image-project=VM_IMAGE_PROJECT; default="deeplearning-platform-release"])[--async][--description=DESCRIPTION][--display-name=DISPLAY_NAME][--post-startup-script=POST_STARTUP_SCRIPT][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
- Request for creating environments.
- EXAMPLES
- To create an environment with id 'example-environment' in location'us-central1-a' using a container repository, run:
gcloudnotebooksenvironmentscreateexample-environment--location=us-central1-a--container-repository=gcr.io/deeplearning-platform-release/base-cpu--container-tag=test-tag--description=test-description--post-startup-script=gs://path-to-file/file-name--display-name=test-display-name--asyncTo create an environment with id 'example-environment' in location'us-central1-a' using a VM Image Family, run:
gcloudnotebooksenvironmentscreateexample-environment--vm-image-project=deeplearning-platform-release--vm-image-family=caffe1-latest-cpu-experimentalTo create an environment with id 'example-environment' in location'us-central1-a' using a VM Image, run:
gcloudnotebooksenvironmentscreateexample-environment--location=us-central1-a--vm-image-project=deeplearning-platform-release--vm-image-name=tf2-2-1-cu101-notebooks-20200110 - POSITIONAL ARGUMENTS
- Environment resource - User-defined unique name of this environment. Theenvironment name must be 1 to 63 characters long and contain only lowercaseletters, numeric characters, and dashes. The first character must be alowercaseletter and the last character cannot be a dash. The arguments in thisgroup can be used to specify the attributes of this resource. (NOTE) Someattributes are not given arguments in this group but can be set in other ways.
To set the
projectattribute:- provide the argument
environmenton the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
ENVIRONMENT- ID of the environment or fully qualified identifier for the environment.
To set the
environmentattribute:- provide the argument
environmenton the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--location=LOCATION- Google Cloud location of this environmenthttps://cloud.google.com/compute/docs/regions-zones/#locations.
To set the
locationattribute:- provide the argument
environmenton the command line with a fullyspecified name; - provide the argument
--locationon the command line; - set the property
notebooks/location.
- provide the argument
- provide the argument
- Environment resource - User-defined unique name of this environment. Theenvironment name must be 1 to 63 characters long and contain only lowercaseletters, numeric characters, and dashes. The first character must be alowercaseletter and the last character cannot be a dash. The arguments in thisgroup can be used to specify the attributes of this resource. (NOTE) Someattributes are not given arguments in this group but can be set in other ways.
- REQUIRED FLAGS
- Exactly one of these must be specified:
--container-repository=CONTAINER_REPOSITORY- The path to the container image repository. For example:gcr.io/
{project_id}/{image_name}.This flag argument must be specified if any of the other arguments in this groupare specified.
--container-tag=CONTAINER_TAG- The tag of the container image. If not specified, this defaults to the latesttag.
--vm-image-project=VM_IMAGE_PROJECT; default="deeplearning-platform-release"- The ID of the Google Cloud project that this VM image belongs to.Format:projects/
{project_id}. - Exactly one of these must be specified:
--vm-image-family=VM_IMAGE_FAMILY; default="common-cpu"- Use this VM image family to find the image; the newest image in this family willbe used.
--vm-image-name=VM_IMAGE_NAME- Use this VM image name to find the image.
- Exactly one of these must be specified:
- OPTIONAL FLAGS
--async- Return immediately, without waiting for the operation in progress to complete.
--description=DESCRIPTION- A brief description of this environment.
--display-name=DISPLAY_NAME- Name to display on the UI.
--post-startup-script=POST_STARTUP_SCRIPT- Path to a Bash script that automatically runs after a notebook instance fullyboots up. The path must be a URL or Cloud Storagepath(gs://
path-to-file/file-name).
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - NOTES
- These variants are also available:
gcloudalphanotebooksenvironmentscreategcloudbetanotebooksenvironmentscreate
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.