This example shows how to build a python 3.9 image from scratch, and derived from an existing container.
-
Follow instructions in CreateCustomWorkbenchContainers.ipynb to create a custom container image and save it in
Artifact Registry
-
Once the image is built, navigate to
Vertex Workbench
, selectNew Notebook
, and thenCustomize...
- Specify a
Notebook name
andRegion
. ForEnvironment
, selectCustom container
- When asked to specify the Docker container image, hit the
SELECT
button
- A window will open leading to
Container Registry
andArtifact Registry
. Find and select your image
-
Specify desired
Machine Configuration
-
The
Networking
andPermission
fields will likely depend on your org policies. Should be able to use the same values used for non-custom-image Notebook Instances -
Under
Security
, checkEnable terminal
. Values for the other options may depend on your org policies
- Select
Create
and wait for your intance to be provisioned
- This should only take a few minutes.
- Note: if your instance continues to spin without reaching a
READY
state, this could be for several reasons (e.g., your org policies could require additional steps than those outlined above)
- When the instance is ready, select
Open JupyterLab
, and open a Python 3 notebook
- In the notebook cell, run the code snippet below to confirm the python version
import sys
print("Python version")
print (sys.version)
print("Version info.")
print (sys.version_info)