Skip to content

Instantly share code, notes, and snippets.

@b0noI
Last active April 7, 2020 04:34
Show Gist options
  • Save b0noI/58c0b98ea43a8deefee95d14c300d1be to your computer and use it in GitHub Desktop.
Save b0noI/58c0b98ea43a8deefee95d14c300d1be to your computer and use it in GitHub Desktop.
INSTANCE_NAME=$1
gcloud compute ssh "jupyter@${INSTANCE_NAME}" -- "sudo rm -rf /home/jupyter/jupyterlab-gcloud-auth"
gcloud compute ssh "jupyter@${INSTANCE_NAME}" -- "mkdir -p /home/jupyter/jupyterlab-gcloud-auth"
gcloud compute scp --recurse ./* "jupyter@${INSTANCE_NAME}:/home/jupyter/jupyterlab-gcloud-auth"
gcloud compute ssh "jupyter@${INSTANCE_NAME}" -- "pip uninstall -y jupyterlab_gcloud_auth"
gcloud compute ssh "jupyter@${INSTANCE_NAME}" -- "pip install /home/jupyter/jupyterlab-gcloud-auth"
gcloud compute ssh "jupyter@${INSTANCE_NAME}" -- "sudo service jupyter restart"
gcloud compute ssh "jupyter@${INSTANCE_NAME}" -- "cd /home/jupyter/jupyterlab-gcloud-auth && jupyter labextension install"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment