Inspired by this post from Manikanta Yadunanda, our team at Clouderizer successfully ported our fast.ai project template to work seamlessly on Google Colab as well. Below are the steps to setup fast.ai course notebooks on Google Colab.
Following pre-requisite, one time, steps are needed.
- Sign up and request access to Google Colab.
- Sign up for Clouderizer. By default you will be on free plan for individual users.
- Login to console and go to Community Projects. Search for fast.ai template and clone it.
- On project wizard, 2nd tab (machine setup), AWS GPU spot instance is selected as machine type by default. Select Local Machine instead. On all remaining screens, select the default options and save.
Now every time you need to start fast.ai notebooks on google colab GPU, follow below 3 steps
- Create a new empty Python 3 notebook in google colab. Go to Edit -> Notebook Setting, and select Hardware Accelerator as GPU.
- From Clouderizer console, press Start on fast.ai project created earlier. This will show a script snippet for starting the project on any terminal. Copy the snippet for Linux.
- Come back to colab notebook, add a new code block, paste the snippet there (prepending with an !), and run the block.
Thats it! This will trigger an automated fast.ai course environment setup, latest code download and dogscats dataset download. You can go back to Clouderizer console and track the progress of this setup. Once setup is complete, project status becomes Running and Jupyter Notebook becomes available to work with.
Source: Deep Learning on Medium