Getting Started With Google Colab: A Simple Tutorial for the Frustrated and Confused
This article first appeared in Towards Data Science
(Photo by FuYong Hua on Unsplash)
You know it’s out there. You know there’s free GPU somewhere, hanging like a fat, juicy, ripe blackberry on a branch just slightly out of reach.
Beautiful lightning-fast speed waiting just for you.
Wondering how on earth to get it to work? You’re in the right place!
For anyone who doesn’t already know, Google has done the coolest thing ever by providing a free cloud service based on Jupyter Notebooks that supports free GPU. Not only is this a great tool for improving your coding skills, but it also allows absolutely anyone to develop deep learning applications using popular libraries such as PyTorch, TensorFlow, Keras, and OpenCV.
Colab provides GPU and it’s totally free. Seriously!
There are, of course, limits. (Nitty gritty details are available on their faq page, of course.) It supports Python 2.7 and 3.6, but not R or Scala yet. There is a limit to your sessions and size, but you can definitely get around that if you’re creative and don’t mind occasionally re-uploading your files…
Colab is ideal for everything from improving your Python coding skills to working with deep learning libraries, like PyTorch, Keras, TensorFlow, andOpenCV. You can create notebooks in Colab, upload notebooks, store notebooks, share notebooks, mount your Google Drive and use whatever you’ve got stored in there, import most of your favorite directories, upload your personal Jupyter Notebooks, upload notebooks directly from GitHub, upload Kaggle files, download your notebooks, and do just about everything else that you might want to be able to do.
It’s awesome.
Working in Google Colab for the first time has been totally phenomenal and pretty shockingly easy, but it hasn’t been without a couple of small challenges! If you know Jupyter Notebooks at all, you’re pretty much good to go in Google Colab, but there are just a few little differences that can make the difference between flying off to freedom on the wings of free GPU and sitting at your computer, banging your head against the wall…
(Photo by Gabriel Matula on Unsplash)
This article is for anyone out there who is confused, frustrated, and just wants this thing to work!
Setting up your drive
Create a folder for your notebooks
(Technically speaking, this step isn’t totally necessary if you want to just start working in Colab. However, since Colab is working off of your drive, it’s not a bad idea to specify the folder where you want to work. You can do that by going to your Google Drive and clicking “New” and then creating a new folder. I only mention this because my Google Drive is embarrassingly littered with what looks like a million scattered Colab notebooks and now I’m going to have to deal with that.)
If you want, while you’re already in your Google Drive you can create a new Colab notebook. Just click “New” and drop the menu down to “More” and then select “Colaboratory.”
Otherwise, you can always go directly to Google Colab.
Game on!
You can rename your notebook by clicking on the name of the notebook and changing it or by dropping the “File” menu down to “Rename.”
Set up your free GPU
Want to use GPU?
Google Colab: uno dei tool piu potenti che Google abbia messo a disposizione. Purtroppo non ancora tanto conosciuto.