Platform: GCP ✅

Hello, I have created another instance in gcp.Everything was working fine (including ssh, running Jupyter etc.), except from last 24 hours, connection to instance get closed withing a couple of minutes showing:
Connection to XXX.XXX.XXX.XXX closed. ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].
I have tried re-configuring the ssh-keys (adding ssh-keys to metadata, instance), but in vain.
Any workaround here?

Hey Jeremy,
Thanks for making this content. but I am finding using GCP remote instances incredibly frustrating- almost at the verge of giving up.
image

finding it impossible to go on forward when i can not even load your library :frowning: my GCP connection was successful, i have my GPU quota increased by google, but the library wont even load :expressionless:

Shubhajit,
I have had a problem occasionally that I think is the same: I’m working along happily with everything functioning properly, then suddenly my Jupyter notebook is unresponsive, the kernel is disconnected, and I get the connection closed error similar to what you see.
In my cases, it appears that GCP has stopped the instance - I assume because it’s interruptible. I have usually been able to restart the instance right away, then reconnect the kernel. It’s annoying, but usually works.
Could that be the problem? If so, a workaround (which will cost extra money) would be to make the machine uninterruptible as described in the instructions. I have not tried that yet, since the issue has not bothered me that much.
Hope that helps.

Thanks for the reply Mark.
In my case, only the connection closes leaving the instance running. It may be some networking issues (error code 255 indicates there is some problem in my ssh). Anyway, I am not able to resolve it, since then :neutral_face:

Hmm - yes, sounds like a different problem than mine. Sorry I couldn’t be of more help, but I hope you find a solution.

I am having the same issue.
I’ve tried deleting the ssh config and running
gcloud compute config-ssh
it creates the file again but does not solve the error.
I tried adding ssh public keys to google cloud (but like you since i can ssh that isn’t the problem.)
I ended up sshing, running the jupyter server locally and connecting to the external address.

I was getting the same error code when I was trying to ssh into my instance.

I tried recreating the ssh key ; however that did not help.

What worked for me is:

  • Start your VM instance from within Google cloud console in your browser

Once the instance has successfully started, you can ssh into the instance from your terminal.

I have verified this by trying the same approach two times; i.e. ssh into your instance only after starting the instance through the console.

Hi
I’m stocked with my old windows environment and security policy at work. Basically I both can’t use sdk command line and can’t display jupyter web page.
So I give it a try directly using the SSH web page of google patform following recommandations to launch jupyter notebook on a fixed external IP. It worked well but I wasn’t in the fastai tutorials directory.
Then I just did a cd to locate in the fast ai tutorials directory and eventually get jupyter web page with all the courses materials.
BUT I got a “permission denied” when I want to create a notebook there although it works fine when I’m not in that directory.
Is anyboady able to help me figure out what is the issue and solution ?
Cheers

Hello all!
I am using Google Datalab’s Jupyter Notebook and Google Cloud Storage. I cannot seem to get Imagelist to work in this environment.
I ran the exact same code using google colab and google drive and it worked perfectly but it won’t work using datalab and storage.

Code in Colab:
path = Path(’/gdrive/My Drive/ISIC_2019_data/’)
tfms = get_transforms(flip_vert=True, max_lighting=0.1, max_zoom=1.05, max_warp=0.2)
np.random.seed(42)
src = (ImageList.from_csv(path, ‘/gdrive/My Drive/ISIC_2019_data/truelabels.csv’, folder=‘ISIC_2019_Training_Input’, suffix=’.jpg’)
.split_by_rand_pct(0.2)
.label_from_df())

Code in Datalab:
path = Path(‘gs://involuted-shine-246019/ISIC_2019_Data/’)
tfms = get_transforms(flip_vert=True, max_lighting=0.1, max_zoom=1.05, max_warp=0.2)
np.random.seed(42)
src = (ImageList.from_csv(path, ‘gs://involuted-shine-246019/ISIC_2019_Data/truelabels.csv’, folder=‘ISIC_2019_Training_Input’, suffix=’.jpg’)
.split_by_rand_pct(0.2)
.label_from_df())

Error Message:
ValueError: Bad Request: https://www.googleapis.com/storage/v1/b/gs:/o/involuted-shine-246019%2FISIC_2019_Data%2Fgs:%2Finvoluted-shine-246019%2FISIC_2019_Data%2Ftruelabels.csv
Invalid bucket name: ‘gs:’

But when I get rid of the gs, it says that no such file or directory exists.

Any suggestion is appreciated! Thanks!


Hi All,

I am a new learner and stuck in the error to run my jupyter notebook.
Can somebody kindly help.

Regards

1 Like

Please try the following changes to the code you provided:

from fastai import * #changed fastai.vision to the total fastai library
from fastai.vision import * #added fastai.vision and imported all its contents
from fastai.metrics import error_rate #alternatively you can delete this line as it is within the fastai library

When importing the wildcard icon * instructs the compiler to search through the entire fastai library and import all sub-libraries such as fastai.vision (but not the entirety of the sub-libraries’ contents). When importing a sub-library such as fastai.vision the wildcard icon * in this scenario also happens to import the ‘error_rate’ functionality.

Please see the following links for additional information:
https://docs.fast.ai/

Hi @jeremy
Is there any easy settings to use GCP straight from the browser without SDK install ?
I managed to update .jupyter/jupyter_notebook_config.py because when launching “jupyter notebook --ip=0.0.0.0 --port=5000 --no-browser” I got an error “set notebookapp.allow remote access to disable the check”. But still I can access to a tree with directory “tutorials” but then I got some Server Error
Cheers

1 Like

Hi All

I successfully got the fastai setup running on Google Cloud. The fastai notes on ‘Server Setup’ is really helpful in getting this up and running.
Now am able to run lesson-1 on GC instance :).

I am seeing below in my Google Cloud billing.

’Storage PD Capacity’ is continuously increasing day-by-day. Though the instance is stopped, the increase is noted. Accordingly the billing as well.

I just ran lesson-1 on the instance and stopped it. Over next 3-days, I see that PD storage is almost doubled, from 17 GB to 34 GB.

Can you pls help me to understand this better and to fix this. How can I stop PD storage to stop increasing.

Thanks
Gopi

I followed the instructions for google cloud setup and when I type exec -l $SHELL I got this error bash: /anaconda2/etc/profile.d/conda.sh: No such file or directory

Does anyone knows what was wrong?

FYI, I recently install a new version of anaconda and when I type gcloud init I am able to choose configurations:

Pick configuration to use:
 [1] Re-initialize this configuration [default] with new settings 
 [2] Create a new configuration
 [3] Switch to and re-initialize existing configuration: [my-project]
Please enter your numeric choice: 

Am I good to go or should I resolve that exec -l $SHELL before I move further?

Advanced thanks!

1 Like

I have set up on GCP using the instructions on https://course.fast.ai/start_gcp.html.

I am actually wanting to do the NLP course so also cloned the github repo for that without any problem.

My question might seem silly but how can I be sure I am using the GCP GPU rather than my local one ?

I am using the jupyter environment initiated at localhost:8080/tree and the data file paths used in the notebook are those on the GCP machine but training is slow and seems the same as I experience on my local GPU.

How would I check what GPU is being used ?

In case anyone else struggles with this, I was able to use the environment checker utils to check this out.

Does anybody know how to stop the machine from the jupyter notebook? e.g. when the training cell above stops running. See my full question here.

After several failures with Salamander, I am trying to set up GCP. I have followed the fastai instructions, and have successfullly increased my GPU quota (acknolwedged by Google).

I am getting the following error, and have no idea what to do. Can anyone help me out? I don’t really know much about BASH so I am just following the instructions blindly:

“Dark Caldron” is the name that was assinged by Google when I created my account. Should I try creating another?

Still working through setting up GCP

Ran
gcloud compute ssh --zone us-west1-b jupyter@my-fastai-instance --ssh-flag="-L 8080:
localhost:8080"

and got this error

ERROR: (gcloud.compute.ssh) Could not fetch resource:

  • Insufficient Permission: Request had insufficient authentication scopes.
1 Like

From the terminal, run nividia-smi

2 Likes