Skip to content

Instantly share code, notes, and snippets.

@b0noI
Last active March 6, 2020 02:32
Show Gist options
  • Save b0noI/ded90908d4f69c2c021b589c310add34 to your computer and use it in GitHub Desktop.
Save b0noI/ded90908d4f69c2c021b589c310add34 to your computer and use it in GitHub Desktop.
export CONTAINER_URI=...#"gcr.io/deeplearning-platform-release/tf2-cpu.2-1"
export IMAGE_NAME=...#"notebook-with-container-v1"
export ZONE=...#"us-west1-b"
export INSTANCE_NAME=...#"container-instance"
export INSTANCE_TYPE=...#"n1-standard-8"
export ACCESS_MAIL=...#"[email protected]"
export IMAGE_PROJECT=...#"deeplearning-platform"
gcloud compute instances create "${INSTANCE_NAME}" \
--zone="${ZONE}" \
--image="${IMAGE_NAME}" \
--image-project="${IMAGE_PROJECT}" \
--machine-type="${INSTANCE_TYPE}" \
--boot-disk-size=100GB \
--tags="deeplearning-vm" \
--scopes=https://www.googleapis.com/auth/cloud-platform \
--metadata="proxy-mode=mail,proxy-user-mail=${ACCESS_MAIL},container=${CONTAINER_URI}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment