Hi Yifan,
I ran across the same issue. You may need to permanently store those environment variables in your ~/.bash_profile
or ~/.zshrc
for my case since I am using zshell.
So first copy these.
export ZONE="us-west2-b" # budget: "us-west1-b"
export INSTANCE_NAME="my-fastai-instance"
export INSTANCE_TYPE="n1-highmem-8" # budget: "n1-highmem-4"
Then inside of your terminal, doesn’t matter where run this command, which should open your editor.
vim ~/.bash_profile
Now paste the environment variables that you copied above at the end of this file and save it.
To make sure the changes take effect immediately run the command source ~/.bash_profile
.
Make sure your gcp instance is started by going to your gcp console.
Run your gcloud compute ssh --zone=$ZONE jupyter@$INSTANCE_NAME -- -L 8080:localhost:8080
and now you should be good to go.