Sample Cloud Build pipelines for Vertex AI Workbench user-managed notebooks upgrades and dependency management.
0 - Prepare:
- Clone this repository.
- Choose a Deep Learning Container (DLCs) image and specifiy it in the Dockerfile
- Add notebook dependencies to the Dockerfile.
- Add notebooks for automated testing in folder test_notebooks
- Specify an
_IMAGE_NAME
in each of of the pipeline yaml files.
1 - Publish staging image:
- Create a trigger to run the staging pipeline
on each commit to branch called
staging
. - Commit into to the
staging
branch and push to your own remote repository. - Cloud Build automatically runs the test_notebooks and creates the staging image.
2 - Test staging image
- (Optional) Create notebook instances to manually test image
using the
staging
environment.
gcloud notebooks instances create <INSTANCE_NAME> \
--location=<NOTEBOOK_LOCATION> \
--environment=<IMAGE_NAME>.staging
- Access your instance from the Vertex AI Workbench console
3 - Publish production image:
- Create a trigger to run the production pipeline
on each commit to a branch called
production
. - Commit into the
production
branch and push to your own remote repository. - Cloud Build creates the production image.
4 - Create notebook instances using image from the production
environment
gcloud notebooks instances create <INSTANCE_NAME> \
--location=<NOTEBOOK_LOCATION> \
--environment=<IMAGE_NAME>.production
- Access your instance from the Vertex AI Workbench console
Both pipelines use the original commit SHA as the Docker tag, representing the image version ID in Container Registry.
Copyright 2021 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.