You can create a Notebooks instance based on a custom container. Using a custom container lets you customize a Notebooks environment for your specific needs. The container must be accessible to your Google Cloud service account and expose a service on port 8080. We recommend creating a container derived from an Deep Learning Containers image, because those images are already configured to be compatible with Notebooks.
Before you begin
Follow the steps in Before you begin to create a Google Cloud (Google Cloud) project and enable the Compute Engine API.
Make sure you have a custom container that is accessible to your Google Cloud service account. Complete Creating a derivative container to learn how to create a custom container from a Deep Learning Containers image.
Create a Notebooks instance using a custom container
To create a Notebooks instance using a custom container, follow these steps:
Go to the Notebooks page in the Google Cloud Console.
SelectNew Instance, and then select Customize instance.
On the New notebook instance page, provide the following information for your new instance:
- Instance name - provide a name for your new instance.
- Region - select a region for the new instance. Select the region that is geographically closest to you for best network performance.
- Zone - select a zone within the region that you selected.
In the Environment section, on the Environment drop-down menu, select Custom container.
In the Docker container image field, enter the image you want to use in the format
gcr.io/PROJECT_NAME/ IMAGE_NAME. Remember that your custom container must be accessible to your Google Cloud service account. If you don't yet have a custom container of your own, you can use one of the available deep learning container images.
Make the rest of your selections, or leave them on their default setting. For more information on these settings, see Create a new notebook and specify your instance options.
Notebooks creates a new instance for you based on your custom container.
- Read about how to push container images to Container Registry. If the container images you push to Container Registry are derived from a Deep Learning Containers image, you can use these container images in creating Notebooks instances.
- Read Best practices for writing Dockerfiles to learn more about modifying your custom containers.