A set of scripts developed while working with google cloud instances, probably useful for any other cloud computing engine.
setup.sh
: Installs various basic packages, generate a ssh key and copies it to the server.install_nvidia_docker.sh
: Installs the necessary components to run nvidia-docker wrapper.shutdown_hook.sh
: A hook script in charge of shutting down your machine after computing is finished. Just provide a PID and it will poweroff when the process is done. Obviously it has to run inside the cloud instance.gcloud_poll.sh
: Sometimes machines just hang. This script runs in a another machine monitoring the cloud instance. When it stops responding ssh (i.e.: it has hanged), it send a power-off signal through gcloud command-line. it requires gcloud command-line and gcloud.env filegcloud.env
: Settings for thegcloud_poll
script.