Platform: GCP ✅

@aloy Thanks! So “/home/jupyter” is my home directory? Does this mean that “jupyter” is basically my username? I think that’s what was confusing me.

1 Like

Yes, connecting via ssh, the part before the @ is your username. So you connected (in a roundabout way) over ssh with the username jupyter. The image was preconfigured with that username, and but that’s the name the instance knows to identify the user.

2 Likes

I’m suddenly facing this issue where my browser is unable to load “http://localhost:8080/tree” – the wheel keeps spinning and the browser status bar says “waiting for localhost.” Everything was working fine for a few days, but I just started facing this issue today. I tried stopping and starting the instance a few times, but it doesn’t help. Any idea what may be going on? Thanks in advance! :slight_smile:

Also, can anyone help me understand what this line of code is doing, and how it’s launching a Jupyter notebook?

gcloud compute ssh --zone=$ZONE jupyter@$INSTANCE_NAME – -L 8080:localhost:8080

Specifically, what do the ports 8080 and 8080 refer to? Thanks! :slight_smile:

It means “let me interact with the remote computer’s port 8080 on the local port 8080”

The standard (insecure) web port (sometimes called a “socket”) is 80, so you’ll often find things that run locally though a web interface using port 8080 or 8888 just because it’s easy to remember and type. Really, though, it could be just about any number, and port numbers are just conventions rather than firm rules.

Hope that helps.

1 Like
1 Like

Hi,when I run jupyter notebook list command in my server ,there is no running server .why?

Can anybody explain what Google Cloud ML Notebooks is? It sounds like something half-way between Colab and GCP VM, but I’m not able to figure it out. What would be the advantages and disadvantages of me switching from GCP VM to this? Thanks! :slight_smile:

As far as I can see, it’s just a GCP VM with an image that contains Debian, DL framework(s) and a JupyterLab instance.

Hi, I am planning to take a gcp instance with gpu from IT team. If they give us a single instance, can that instance be accessed by everyone in the same gcp project? Or do we need to take instance for each individual?
If that can be accessed by all individuals in project then can we use it simultaneously? Can 2 users work on same instance simultaneously?

Hi everyone,

I hope all is well.

I am trying to use an image dataset updated to Google Cloud via terminal, but things are not working out so far. I have updated my dataset - which is a folder containing other folders (format fastai/data/data1 ; fastai/data/data2…etc) to Jupyter but for some reason when I try to load some images on the notebook I can’t retrieve the path. I got the error: Errno 2] No such file or directory. I am sure that the path is correct.

That’s url to the dataset: http://localhost:8080/tree/tutorials/fastai/course-v3/data/GTSRB/Final_Training/Images
That’s the url given to Path: (’’~/tutorials/fastai/course-v3/data/GTSRB/Final_Training/Images/")

Am I doing something wrong?

Thanks for your help!

Has anyone manage to install S4TF on VM.
When I try to install S4TF using Jeremy's Harebrained install guide I got error “The driver requires root permissions to install

its resolved by using command “sudo su”

hi there,

after you log on onto your GCP account by running:

gcloud compute ssh --zone=$ZONE jupyter@$INSTANCE_NAME – -L 8080:localhost:8080

Do not type in jupyter notebook on the command line because the notebook is already open. Go to your browser and type in http://localhost:8080/tree

Hope this helps.

1 Like

Hello

I am stuck in trying to connect to my instance (my-fastai-instance). I followed the instructions in the guide but am stuck. Once I start my instance from VM instances and then enter the below in Cloud Shell,
gcloud compute ssh --zone=$ZONE jupyter@$INSTANCE_NAME – -L 8080:localhost:8080

I get an error saying
ERROR: (gcloud.compute.ssh) could not parse resource []

Can anyone please guide me on how to access the localhost:8080/tree.

Im using Windows 10 Enterprise operating system.

1 Like

seems like i was able to connect

image

But when i go to http://localhost:8080/tree, i get site cant be reached…

when i SSH i get the below message:

Cannot access localhost:8080/tree after this…

any clues what i may be doing wrong?

Hi, I have been trying to get access to GCP instance and jupyter notebook but its frustrating for me. Hope to seek help from the forum.

  1. When running gcloud on Ubuntu WSL on window 10 after installing gcloud SDK, i get Gcloud ERROR: Reachability Check failed.

         gcloud init
     Welcome! This command will take you through the configuration of gcloud.
    
     Settings from your current configuration [default] are:
     auth:
       disable_ssl_validation: 'True'
     core:
       disable_usage_reporting: 'True'
    
     Pick configuration to use:
      [1] Re-initialize this configuration [default] with new settings
      [2] Create a new configuration
     Please enter your numeric choice:  1
    
     Your current configuration has been set to: [default]
    
     You can skip diagnostics next time by using the following flag:
       gcloud init --skip-diagnostics
    
     Network diagnostic detects and fixes local network connection issues.
     Checking network connection...done.
     ERROR: Reachability Check failed.
         Cannot reach https://www.google.com (error)
         Cannot reach https://cloudresourcemanager.googleapis.com/v1beta1/projects (error)
         Cannot reach https://www.googleapis.com/auth/cloud-platform (error)
         Cannot reach https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json (error)
     Network connection problems may be due to proxy or firewall settings.
    
    
     Do you have a network proxy you would like to set in gcloud (Y/n)?  n
    

I looked up the issue on google and tried

    gcloud config set auth/disable_ssl_validation  True
    Updated property [auth/disable_ssl_validation].

but still cannot login gcloud, i guess it would be an proxy or firewall setting issue but i dont know what to do

  1. i tried another way to request the instance according to
    https://arunoda.me/blog/ideal-way-to-creare-a-fastai-node
    I successfully requested the instance and finished the installation. But I cannot open jupyter notebook in the end with the http://external-ip:8888 . It is the same as another reply previously.

  2. I tried to install google cloud SDK on window and request the instance. But the command on GCP setup guide on fastai website seems to be running on Linux.

I just joined the Google Landmark Recognition on Kaggle. There are 5 million pictures so I hope to give it a try with GCP. Will be very appreciated for any advice

UPDATE: I solved the problem by using method 3 - running google cloud SDK. Followed the instruction on the GCP setup page. Added ‘beta’, Removed ‘’ and ‘export …’ lines to request the instance and it worked.

gcloud beta compute instances create $INSTANCE_NAME   --zone=$ZONE  --image-family=$IMAGE_FAMILY  --image-project=deeplearning-platform-release         --maintenance-policy=TERMINATE  --accelerator="type=nvidia-tesla-p4,count=1"         --machine-type=$INSTANCE_TYPE  --boot-disk-size=200GB  --metadata="install-nvidia-driver=True"  --preemptible`

I wasted so much time on this just because of one simple trick and my lack of basic programming skills on Linux and cloud SDK. If anyone can tell me the reasons and where can I look for related tutorials, it will be very appreciated!

Secondly, my ubuntu WSl is still having trouble connecting to gcloud, seek for solution as well!

1 Like

Hey @mansari and @garyLeung, and perhaps others,

I also was having trouble connecting to jupyter notebooks on GCP.

Once you’ve gcloud sshed into the VM, try running jupyter notebook at the GCP remote terminal command line. See if you get something similar to the following error:

[C 19:40:20.975 NotebookApp] Bad config encountered during initialization:
[C 19:40:20.975 NotebookApp] The 'kernel_spec_manager_class' trait of <notebook.notebookapp.NotebookApp object at 0x7f7f21ef1668> instance must be a type, but 'nb_conda_kernels.CondaKernelSpecManager' could not be imported

If you got this error or similar, then you’ll be able to fix the configuration and access your notebooks by following the steps here.

I found the offending lines in
/opt/anaconda3/etc/jupyter/jupyter_notebook_config.json.

You’ll want to change this:

    },
    "kernel_spec_manager_class": "nb_conda_kernels.CondaKernelSpecManager"
  }

to

    }
  }

Be sure to remove the trailing comma after the bracket.

Then, restart jupyter notebook from the command line with:

jupyter notebook

There are warnings and many server extension loading errors, but so far all seems to be functioning. Hope this works for you.

1 Like

Hi @nswitanek I didnt encounter such error but thanks so much for advice! I could access jupyter notebook now. Many thanks