Julia on Google Colab: Free GPU-Accelerated Shareable Notebooks

Based on conversations in #gpu, it seems that the original hack broke last month due to changes in how Colaboratory handles associating “runtimes” (VMs) and notebooks. The best solution I managed to come up with was to craft a notebook that claims to be a Julia notebook, just like @jekbradbury’s original hack, and then have a cell at the top of each notebook that installs Julia and IJulia. One you run that cell, you can simply reload the page and things mostly work as expected as Colaboratory picks up on your IJulia installation. Here is a link to the notebook I am currently providing to my students for a class. While it may sound awful to have to install Julia and IJulia each time the runtime disconnects, it happens only after an hour or so in practice and it also seems that a complete CUDA stack is installed by default, so there is no need to install CUDA anymore which cuts down the installation time to just over a minute.

Known issues are code completion and syntax highlighting, I lack to expertise/time to look into this so any and all help is more than helpful.

4 Likes