Lesson 1 using Google Cloud VM( step by step installation with shell script)

@mmr thanks a lot for creating this - I’ve turned it into a wiki now so that others can edit it to help keep it up to date. I hope that’s OK - let me know if you’d like me to revert that change.

@cedric those are great suggestions for changes. Adding cudnn is particularly important. Do you want to edit the original post directly to make those fixes?

No problem.

OK, I will edit the original post directly to include those suggestions and fixes soon. Thanks.

FWIW, I had to use a n1-standard-4 (4 vCPUs, 15 GB memory) instance to make it through lesson 1 training. n1-standard-2 still crashed.

@mmr may I know how to calculate these estimates/ how you calculated them? right now I am using google calculator and the estimate is coming out to be scarily humungous!

If somebody has already finished the free trial and is interested to invest more.

(2 CPU with 100 GB storage) $563.54 /month estimated Hourly rate $0.772 (730 hours/ month)*
(2 CPU with 300 GB storage) $571.54 /month estimated Hourly rate $0.783 (730 hours/month)*

(4 CPU with 100 GB storage) $612.09 /month estimated Hourly rate $0.838 (730 hours / month)*
(4 CPU with 300 GB storage) $620.09 /month estimated Hourly rate $0.849 (730 hours/ month)*

It’s seems like that using GPU with the free 300 usd is not possible anymore, I have just tried and it’s specified in https://cloud.google.com/free/docs/frequently-asked-questions

You cannot add GPUs to your Compute Engine instances.

Thanks @steffenix for putting the link here. I just started the course. I followed several Posts that share the steps to setup GCP for this course without going through the Free Tier documentation updates. Each time i raise a Quota request, i got back a mail with upfront payment steps. Guess we cant use GCP Free Tier for this course anymore.:expressionless:

Seems like you have to upgrade the account to paid account (but you can keep on using the free 300usd) . Then you will have to ask for a quota change https://console.cloud.google.com/iam-admin/quotas

After I’ve got an automated email asking me to make a payment of $35 US to help us ensure that this is a legitimate request.

I have spent 35 usd and I have made the request to increase the quota, I have now access to GPUs.

GCP is indeed a great option. But I am currently working out all notebooks through PaperSpace, their response was pretty quick.

Hi all, I have tried the update script and at the end I am told to:

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=a06bfxcf2j4ndknjfnkf&token=dfggdgfdgrdhjsnsjskns

I copied and pasted the link to a browser, however, I could not connect to the VM . In the last iterations I was asked to connect to a real ip with 8888 port. Does anybody know how to revert back to that option.
Thanks

Problem is solved .

Hi all,

I have a question regarding running Jupyter notebook on Google Cloud. Are we able to run Jupyter without running a GPU instance, hence saving GPU hours. I believe that’s how Crestle works? Thanks.

Well you can use CPU to run Pytorch , however it will be really slow.

I see. In that case, how do you run it? On the gpu instance even when you’re editing and writing code?

Everything goes fine until I try to connect to jupyter notebook.
Both methods don’t work. I have checked firewall rules and those are as specified.
When running through second method i get following error when opening a new terminal and trying to run following command:

gcloud compute ssh fastai-vm --ssh-flag=“-L” --ssh-flag=“8888:localhost:8888”

ssh: Could not resolve hostname \342\200\234-l\342\200\235: Name or service not known
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].

Any help is appreciated

For those interested, found a working solution by following these instructions:

1 Like

While setting up instance on google cloud platform with free credits(mentioned this because could not upgrade quota for using gpu) my region(mumbai) does not support gpu. Should I use different region, but this would add to the latency. I have never used any cloud computing platform before.

Clouderizer Fast.ai community template can be used on GCP VMs as well. Here are the instructions

https://help.clouderizer.com/running-on-cloud/running-on-google-cloud-platform

This should take care of dependency driver/package setup, datasets and remote Jupyter notebook access.

1 Like

Jupyter Notebooks are pretty good at hiding latency from remote systems, since you do the editing locally. I’ve found the Google credit program to work really well and would encourage you to carefully follow the Medium post linked earlier in the thread.