- new
gcloud deployment-manager deployments create gpu-instance --template ./deployment/vm.jinja --properties name:vm01,zone:us-central1-b,instanceType:custom-2-4096,diskSizeGb:50,gpuCount:1
gcloud deployment-manager deployments create firewall --template ./deployment/firewall.jinja --properties sourceIp:[アクセス元IPアドレス]
- update
gcloud deployment-manager deployments update gpu-instance --template ./deployment/vm.jinja --properties name:vm01,zone:us-central1-b,instanceType:custom-2-4096,diskSizeGb:50,gpuCount:1
gcloud deployment-manager deployments update firewall --template ./deployment/firewall.jinja --properties sourceIp:[アクセス元IPアドレス]
gcloud compute ssh vm01 --zone=us-central1-b --command="git clone https://github.com/bassbone/gce-gpu.git"
gcloud compute ssh vm01 --zone=us-central1-b --command="sh gce-gpu/setup/nvidia-install.sh"
gcloud compute instances reset vm01 --zone=us-central1-b
sleep 60 # for wait reboot.
gcloud compute ssh vm01 --zone=us-central1-b --command="sh gce-gpu/setup/docker-install.sh"
gcloud compute ssh vm01 --zone=us-central1-b --command="cd gce-gpu; make start"
gcloud compute ssh vm01 --zone=us-central1-b --command="cd gce-gpu; git pull origin master"