-
-
Save mskf3000/4f23d90879754337b0fa2f55fe50cd26 to your computer and use it in GitHub Desktop.
Script to create a GPU-enabled COS instance on GCE and to install Nvidia GPU driver in a container.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -o nounset | |
| set -o errexit | |
| set -o pipefail | |
| set -x | |
| INSTANCE_NAME=$1 | |
| shift | |
| gcloud beta compute instances create ${INSTANCE_NAME} \ | |
| --machine-type n1-standard-2 \ | |
| --boot-disk-size 100GB \ | |
| --accelerator type=nvidia-tesla-k80,count=1 \ | |
| --maintenance-policy TERMINATE \ | |
| --metadata-from-file "unlock-loadpin=unlock-loadpin.sh,nvidia-installer=nvidia-installer.sh,user-data=nvidia.cfg" $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment