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.
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.
When I typed the above command, the terminal tells me that âFound a swap file by the name ~/.bash_profile.swpâ, and â(1) Another program may be editing the same fileâ or maybe â(2) An edit session for this file crashedâ. I tried restarting the computer but still gave me the same thing.
Thanks for this help. It works but sometimes when I come back to my computer the next day I get the same error. If I then run source ~/.bash_profile it works again, even though I havenât even opened bash_profile this time (see image). Any ideas how to fix this permanently?
thanks, I had the same question and this resolved it.
I have another question - this method shows how to access the notebook tutorials in my browser with instructions from my local terminal. Is there anyway I can access the notebooks in a browser simply by running commands inside the GCP Fastai VM? ie so I donât have to use my local terminal? Any help much appreciated, thanks
I just wenât through the login part of the setup in the Ubuntu terminal again. Pasting in.
# Create environment variable for correct distribution
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
# Add the Cloud SDK distribution URI as a package source
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
# Import the Google Cloud Platform public key
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
# Update the package list and install the Cloud SDK
sudo apt-get update && sudo apt-get install google-cloud-sdk
Hi, i followed your steps but when i enter this line : source ~/.bash_profile.
it says -bash: /home/vival/.bash_profile.: No such file or directory
can you help me
Edit: And one more question: my instance is on us-west1-b. Should i change it from us-west2-b to us-west1-b? Thanks