Skip to content

Instantly share code, notes, and snippets.

@b0noI
Last active June 13, 2019 02:10
Show Gist options
  • Save b0noI/6912f0385fcac699d0d7762d143423c1 to your computer and use it in GitHub Desktop.
Save b0noI/6912f0385fcac699d0d7762d143423c1 to your computer and use it in GitHub Desktop.
export INSTANCE_TEMPLATE_NAME="tf-latest-gpu-template"
export IMAGE_FAMILY="tf-latest-gpu"
export TRAINING_SCRIPT="wget https://raw.githubusercontent.com/horovod/horovod/v0.16.4/examples/tensorflow_mnist.py"
gcloud compute instance-templates create "${INSTANCE_TEMPLATE_NAME}" \
--machine-type=n1-standard-64 \
--maintenance-policy=TERMINATE \
--accelerator=type=nvidia-tesla-v100,count=8 \
--min-cpu-platform=Intel\ Skylake \
--image-family="${IMAGE_FAMILY}" \
--image-project=deeplearning-platform-release \
--boot-disk-size=100GB \
--boot-disk-type=pd-ssd \
--boot-disk-device-name="${INSTANCE_TEMPLATE_NAME}" \
--preemptible \
--metadata='install-nvidia-driver=True' \
--metadata startup-script="${TRAINING_SCRIPT}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment