Container for launching custom docker inside google cloud vertex ai notebook. These are the steps for container registry:
-
- build docker and tag it: docker build . -t TAG_NAME
-
- Link it with GCP Project: docker tag TAG_NAME eu.gcr.io/GCP_PROJECT_ID/TAG_NAME
-
- Push it, upload docker into container registry: docker push eu.gcr.io/GCP_PROJECT_ID/TAG_NAME
-
- create a custom notebook instance in vertex ai specifying the custom docker image just uploaded.
The following are the steps for artifact registry, more secure solution:
-
- create repo in artifact with REPO_NAME
-
- authentication: gcloud auth configure-docker europe-west1-docker.pkg.dev
-
- build: docker build . -t LOCAL_NAME
-
- tag: docker tag LOCAL_NAME europe-west1-docker.pkg.dev/PROJECT_ID/REPO_NAME/LOCAL_NAME
-
- push: docker push europe-west1-docker.pkg.dev/PROJECT_ID/REPO_NAME/LOCAL_NAME
Before everything its' necessary to manually create (or from cloud shell) the repository.
Useful links: