Guide to setup fastai on Azure

(Manikanta Yadunanda Sangu) #1


I have just created a post on setting up fastai on Azure. I hope this will be helpful for people facing issues with Azure and people who already have visual studio subscription. The process is relatively simple now with recent Azure Deep Learning Virtual Machine offering.

Feedback is appreciated.

How to setup virtual machine on Azure for running course lessons?

Hi, I set it up but I can’t seem to make a Jupyter server work.

  1. I copied the private IP of the machine from Properties and replaced localhost with it.

  2. I copied the public IP address from the Overview.

  3. I kept the localhost.

None is working. Do you have any suggestions?

(Susant Bisoi) #3

are u able to connect to the cloud machine through ur shell terminal?


Yes. Azure has a browser CLI and I also tried to connect using my computer shell. Both connect without problems.

(Susant Bisoi) #5

Just keep the ip address and then :8888/


then enter and it will ask the password


I’ve already done this. See my original comment point 1. Just tried it again, still no luck. In the case of your screenshot it’d be 52.234.128:8888 into the address bar of Chrome.

(Susant Bisoi) #7

I got the same issue but just i did not do any extra stuff and i think after restarting VM it got worked i believe.I don’t how i made to work it.:slight_smile:

( #8

If you haven’t done it already, you have to open inbound port 8888 to the VM. Only 22 is opened by default.

You can also try a pre-configured data science VM’s. It costs the same but has everything installed for you, including cuda


I will try the inbound port thingie.

And my VM is the data science VM. I used student account so so far it’s cost me nothing.

(Chris Palmer) #10

Hi Manikanta

I wonder if you can help with any of these issues?

I have followed your medium post through to the place where you test Jupyter Notebooks (i.e. to “Copy the URL+Token from the command line and enter in your local browser to view the jupyter notebooks”).

But when I do this I end up viewing the currently running notebooks on my own PC, not those on the server. Do you know a solution for that?

Also, I thought I should test that torch was working so I ssh onto the server and after source activating fastai I started ipython and typed import torch. It crashed with an error:

ImportError: /opt/intel/mkl/lib/intel64/ undefined symbol: mkl_lapack_ao_ssyrdb

I have written in detail about these problems here: How to setup virtual machine on Azure for running course lessons?

(Manikanta Yadunanda Sangu) #11

I replied to the linked thread.

(Brian Smith) #12

Thanks Manikanta - great article. I found that the root drive filled when creating the fastai environment in the Deep Learning image - as Anaconda was there and 45 out of 50GB used. The fix was to shut the image down (via Azure Portal so it was deallocated) then increase the OS drive (I chose 128GB) then on restart the Ubuntu used the 128GB and I could create the environment. Also used x2go client and that worked well - made running the notebooks easy as I was already remoted to the VM.

(Lukas Amrein) #13

If I try this step:

python -m ipykernel install — user — name fastai — display-name “Python (fastai)”

My shell gets stuck and I have to close it.

Thank you for your help

(Laurence) #14

Hi Manikanta, I read your article on Medium. Very informative. Thanks. However I was looking for a free tier on Azure and I did not find it. It is right?
I got some free credits but could not find the equivalent of amazon AWS AMIs where you have a free tier, not just free credits for a month and being billed after that as in the case of azure… anybody got a tip? Otherwise AWS for testing and playing around for beginners might be a better option…