Platform: GCP ✅


#294

I cannot get the nbextensions tab to show up in the jupyter notebook. I tried

/opt/anaconda3/bin/conda install -c conda-forge jupyter_contrib_nbextensions  
jupyter contrib nbextension install --user  
jupyter nbextension enable --py widgetsnbextension --sys-prefix

following this link and a setup script from the previous version of the course but with no luck.


(Sahil KARKHANIS) #295

@Gaurav85 @adpostma i had also faced a similar issue while creating the instance for GCP. i followed certain steps and got it created. ( I am using a google cloud sdk shell ).

For creating the instance I used this as my command: gcloud compute instances create fast-ai-sahil-try --image-family=pytorch-1-0-cu92-experimental --image-project=deeplearning-platform-release --maintenance-policy=TERMINATE --accelerator=type=nvidia-tesla-k80,count=1 --machine-type=n1-highmem-8 --boot-disk-size=200GB --metadata=install-nvidia-driver=True --preemptible

Please check if this works for you and if not please mention the error you are getting so that I can have a look and see if I faced it before. Lets solve this :slight_smile: (As I know getting these things running on Win 7 can be a bit painful)


#296

Gaurav85:

I had the same issue when I followed the setup procedure. Arunoda’s right about it being a quota issue. IIRC, you’ll need to click through the GCP web interface on to the IAM & admin section to request access to a GPU. This guide, which is linked to under the fastai_v3 topic `Unofficial Setup thread (Local, AWS) has an image of what you need to find under ‘Step 5’.

It tells you to wait for an approval email, but the approval happened instantly when I tried it.

You can find the GPUs by filtering on Service: Compute Engine API and then the NVIDIA ... options under Metrics. Do not filter on GPUs, because nothing seems to show up.

Also, I have not installed any software on my computer. Everything works using the Cloud Shell and web GUI.


(Sahil KARKHANIS) #297

The trick here is Gaurav you need to try the command 3-4 times. I also had this issue that it says there are no GPU instances available but try it 3 -4 times and you will be successful. Hope this helps.


(SJH) #298

I’m able to access my instance via my Ubuntu shell (Windows) which is where I did the initial set up. I’m trying to ssh into the same instance via my macbook but I’m running into issues.

gcloud compute ssh --zone=$ZONE jupyter@$INSTANCE_NAME – -L 8080:localhost:8080
ssh: connect to host 35.236.121.17 port 22: Operation timed out

ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].

Anyone run into this / know how to solve this?


(Gabriel) #299

Have you started your instance?


(SJH) #300

Yeah my instance is on. I also tried: gcloud compute config-ssh

The verbose output when I try to ssh is:

OpenSSH_7.7p1, LibreSSL 2.7.3

debug1: Reading configuration data /Users/sarah/.ssh/config

debug1: /Users/sarah/.ssh/config line 46: Applying options for my-fastai-instance.us-west2-b.modeltraining-120938

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: /etc/ssh/ssh_config line 48: Applying options for *

debug2: resolve_canonicalize: hostname 35.236.121.17 is address

debug2: ssh_connect_direct: needpriv 0

debug1: Connecting to 35.236.121.17 [35.236.121.17] port 22.

ssh: connect to host 35.236.41.144 port 22: Operation timed out

ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].

(Gabriel) #301

The next step would probably be to go to the cloud console and manually remove any ssh keys and try to run the ssh bind command again.


#302

My credits came through. Thanks for the generosity.


(Bilal) #303

Getting the same issue. Weird I did not have this before? :confused:

I tried -vvv and get the following breakdown:

Enter passphrase for key ‘/Users/user1/.ssh/google_compute_engine’:

debug2: no passphrase given, try next key

debug2: we did not send a packet, disable method

debug1: No more authentication methods to try.

jupyter@ip-address*: Permission denied (publickey).

ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].

UPDATE

I managed to fix this by going into ~ .ssh directory. I then removed both the google_compute_engine and google_compute_engine.pub files and was able to ssh into my instance (new files were created for the ones removed).


(Ad Postma) #304

I had the same problem for a full day, Could not connect to my instance anymore (even after trying 10s of times with no luck).
In the documentation it says that free accounts do not have standard GPU quota.

https://cloud.google.com/compute/quotas#cpus
(thanks Arunoda!)

After upgrading my account I could connect to my instance again.


(Greg van de Krol) #305

I ran into the same issue just now, though I had no issue when I originally setup my account and instance. I also simply hit the button to “Upgrade” my account and then everything worked as before.


#306

i am not able to access folders that are not in the path: /home/jupyter/tutorials/fastai/course-v3/nbs/dl1

i tried !cd and using Path, but both didn’t work. not sure what i am doing wrong here…


(Victoria Suarez) #307

Hi, is anyone familiar with transferring files from my local computer to my instance? I tried
gcloud compute scp [LOCAL_FILE_PATH] [INSTANCE_NAME]:~/ which I found here:
https://cloud.google.com/compute/docs/instances/transfer-files#transfergcloud
but still no luck. I get this error:


Any help would be appreciated.


#308

you could try using Jupyter notebook ‘upload’ button.


(Victoria Suarez) #309

Wow, that was so simple! Thank you!:sweat_smile:


(Gabriel) #310

You can use cd and pwd without the ! in the notebook. You can also reference any path using the full path from root.

That Path is undefined points to that you have not imported the library.


(Han Qi) #311

By “create a new conda environment” do you mean create a new instance?
Any guides on how i would do that? (there were many setup parameters for fastai instance, do i copy them?)
If you mean stay within fastai instance, I don’t think i should be using this export IMAGE_FAMILY="pytorch-1-0-cu92-experimental" because it has CUDA 9.2 compiler which does not fit with tensorflow-gpu. https://stackoverflow.com/questions/50605684/support-for-nvidia-cuda-toolkit-9-2


(Vijay Narayanan Parakimeethal) #312

I am trying to create an conda environment in my GCP instance wherein I can run the previous fastai 0.7 version as well. I created the environment using conda env create -f environment.yml. The ‘environment.yml’ file is the one used for creation of the fastai 0.7 GPU environment. But once created I am not able to see it as a kernel in my Jupyter notebook. I tried installing nb_conda in both the ‘base’ as well as ‘fastai0.7’ environment. But it still does not work. Can anyone help on this?


#313

I needed to use os.chdir('/foo/bar/baz') to change directories in Jupyter notebooks. If you use it, you will need to import os.

For ls, try %ls path or !ls path. And if you want the list of files from ls in columns, try %ls --width 125 - it spreads the file names horizontally, so it doesn’t take up as much vertical space.