Platform: GCP ✅

When I make my first ssh connection and try to specify the jupyter user account I get this warning:

gcloud compute ssh --zone=$ZONE jupyter@$INSTANCE_NAME -- -L 8080:localhost:8080
WARNING: Using OS Login user [my_custom_account] instead of default user [jupyter]

So, even if I try to provide jupyter on first login, gcloud ‘fixes’ the username and thus the jupyter account never works correctly.

I’ve tried adding the jupyter-user= to the gcloud create but then the jupyter service is never setup correctly.

Anyone have guidance on how to either get gcloud to authenticate with the jupyter user the first time?

Alternatively, how to get the gcloud create command to work when providing a username?

Sounds like you have enable-oslogin enabled in gcp somehow.

1 Like

Thanks man!

Turns out that’s correct - I had enabled it from some previous testing I was doing a month or two ago.

Didn’t realize that having that option enabled meant any user name I specify is ignored!

Only thing I found in googling your error was one page in Japanese! :open_mouth:

1 Like

This worked for me.

gcloud compute scp [path to the file on your computer] jupyter@my-fastai-instance:[Destination path on GCP machine] --project “fast-ai****” --zone “us-wes***”

4 Likes

Thank you!

Hi @noskill

If possible could you please state the steps you did?

Thanks.

There seems to be a garbage character in the code for Step 3 of the GCP server setup:

Here is what I get when I paste into my Ubuntu terminal running under Windows 10:

$ gcloud 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
ERROR: (gcloud.compute.instances.create) unrecognized arguments: .--accelerator=type=nvidia-tesla-p4,count=1

Notice the “.” before the “–accelerator”
I just cleaned it up before pasting and it reran fine

1 Like

Thanks - was a stray tab character. Fixed now.

I followed till step 3 and got my instance up but when I try step 4 to update the repository I get this error:

jupyter@damu-fastai-instance:~/tutorials/fastai$ git checkout .
fatal: Not a git repository (or any of the parent directories): .git

The material currently present look up to date so is the update and everything happening automatically?

use the following:

cd tutorials/fastai/course-v3

instead of:

cd tutorials/fastai

The directions need to be updated.

PS. the “cd” command under “Returning to work > Google Cloud > Update the course repo” also needs an update.

7 Likes

Ah thanks a lot that worked for me!

Another thing I noticed was that as I couldn’t use the Ubuntu terminal for windows due to restrictions so I was using CMD itself and --accelerator=‘type=nvidia-tesla-p4,count=1’ errored out for me but --accelerator=“type=nvidia-tesla-p4,count=1” works just fine. It was rather confusing, is this expected?

Yeah sure! Since jeremy just change the original image with the new one, the steps are same.

export IMAGE_FAMILY="pytorch-1-0-cu92-experimental" # or "pytorch-1-0-cpu-experimental" for non-GPU instances
export ZONE="us-west2-b"
export INSTANCE_NAME="my-fastai-instance"
export INSTANCE_TYPE="n1-highmem-8"
gcloud 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

In the tutorials folder, you will find the v3 course notebooks.

I’ve Jupyter running well on GCP using the Tutorial.

However, I’m having trouble getting the Gist-it extension to show in a notebook. With gcloud compute ssh running, I can see http://localhost:8080/nbextensions, but I need to enable the checkbox for “disable configuration for nbextensions without explicit compatibility” to see Gist-it config, which displays:

Listing extensions from the command line also tells me Gist-it is enabled but failing validation:

jupyter@my-fastai-instance:/opt/anaconda3$ jupyter nbextension list
Known nbextensions:
  config dir: /home/jupyter/.jupyter/nbconfig
    notebook section
      nbextensions_configurator/config_menu/main  enabled 
      - Validating: problems found:
        - require?  X nbextensions_configurator/config_menu/main
      contrib_nbextensions_help_item/main  enabled 
      - Validating: OK
      Gist-it  enabled 
      - Validating: problems found:
        - require?  X Gist-it
    tree section
      nbextensions_configurator/tree_tab/main  enabled 
      - Validating: problems found:
        - require?  X nbextensions_configurator/tree_tab/main
  config dir: /opt/anaconda3/etc/jupyter/nbconfig
    notebook section
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
      nbpresent/js/nbpresent.min  enabled 
      - Validating: OK
      nb_conda/main  enabled 
      - Validating: OK
      nbextensions_configurator/config_menu/main  enabled 
      - Validating: problems found:
        - require?  X nbextensions_configurator/config_menu/main
      contrib_nbextensions_help_item/main  enabled 
      - Validating: OK
    tree section
      nb_conda/tree  enabled 
      - Validating: OK
      nbextensions_configurator/tree_tab/main  enabled 
      - Validating: problems found:
        - require?  X nbextensions_configurator/tree_tab/main
  config dir: /usr/local/etc/jupyter/nbconfig
    notebook section
      jupyter-js-widgets/extension  enabled 
      - Validating: OK

`
I’ll admit to being a bit of a noob with Jupyter let alone extensions. Any tips on where to debug further from here would be appreciated!

So I’m doing the Ubuntu method in Windows 10. I’m not sure if the tutorial needs to be updated, but here’s what I had to do to get copy paste working.

  1. right click on the title bar
  2. click “Properties”
  3. check “Use ctrl+shift+c/v as Copy/Paste”

In the tutorial it says to just shift and right click, but that wasn’t working for me until I found this menu and used control + shift + v.

Thanks @noskill

1 Like

Thanks for the reminder - added that to our guide:

http://course-v3.fast.ai/terminal_tutorial.html#windows-10

What is the error on mac? I too ran into this on mac and changing my default python to 2.7 fixed it

you need to do git pull here /tutorials/fastai/course-v3

Is it OK to use n1-highmem-4 instance type with nvidia-tesla-k80? I was able to run the lesson 1 workbook but not sure if it will work fine with future lessons?