How to specify preemptible GPU Deep Learning Virtual Machine on GCP

一曲冷凌霜 提交于 2020-01-23 12:04:49

问题


I can't figure out how to specify preemptible GPU Deep Learning VM on GCP

This what I used:

export IMAGE_FAMILY="tf-latest-gpu"
export ZONE="europe-west4-a "
export INSTANCE_NAME="deeplearning"

gcloud compute instances create $INSTANCE_NAME \
  --zone=$ZONE \
  --image-family=$IMAGE_FAMILY \
  --image-project=deeplearning-platform-release \
  --maintenance-policy=TERMINATE \
  --accelerator='type=nvidia-tesla-v100,count=2' \
  --metadata='install-nvidia-driver=True'

Thank you!


回答1:


You can create a preemptible Compute Engine instance with GPU by adding the --preemptible gcloud command option. As per your example, that would be:

export IMAGE_FAMILY="tf-latest-gpu"
export ZONE="europe-west4-a "
export INSTANCE_NAME="deeplearning"

gcloud compute instances create $INSTANCE_NAME \
  --zone=$ZONE \
  --image-family=$IMAGE_FAMILY \
  --image-project=deeplearning-platform-release \
  --maintenance-policy=TERMINATE \
  --accelerator type=nvidia-tesla-v100,count=2 \
  --metadata='install-nvidia-driver=True'
  --preemptible

See documentation here and here for more details on available options.



来源:https://stackoverflow.com/questions/52769663/how-to-specify-preemptible-gpu-deep-learning-virtual-machine-on-gcp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!