I am trying to setup Julia with Google Colab. Installation instructions as in https://discourse.julialang.org/t/julia-on-google-colab-free-gpu-accelerated-shareable-notebooks/15319 have been followed. Despite that, I am unable to launch Julia.
I am trying to use Julia with Google Colab. I followed the following steps:
!wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb
!dpkg -i cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb
!apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub
!apt update -q
!apt install cuda gcc-6 g++-6 -y -q
!ln -s /usr/bin/gcc-6 /usr/local/cuda/bin/gcc
!ln -s /usr/bin/g++-6 /usr/local/cuda/bin/g++
!curl -sSL "https://julialang-s3.julialang.org/bin/linux/x64/1.2/julia-1.2.0-linux-x86_64.tar.gz" -o julia.tar.gz
!tar -xzf julia.tar.gz -C /usr --strip-components 1
!rm -rf julia.tar.gz*
!julia -e 'using Pkg; pkg"add IJulia; add CuArrays; add Flux; precompile"'
The above two steps run perfectly fine. I am unable to initiate a Julia session. I tried:
!julia
With this, the Julia start-up screen keeps showing with no command-line.
Prerequisites Using the Notebook Note to the user Contributors License A notebook for running Julia 1.6.1 on Google Colab using the IJulia package. Why? When I started learning Julia few months back, I searched for an IDE or notebook to run Julia efficiently, but I struggled to get a GPU functioning on my own computer.
Google Colab is an entirely new IPython notebook with a virtual kernel as a frontend for computation on Google’s servers. Colab is also free, which puts it ahead of similar services.
The easiest option is to use this Colab notebook template. It supports any Julia version, and also has GPU support. Share Follow answered Jun 23 2020 at 22:34 MiniQuarkMiniQuark
J uliabox is similar to Colab, but rather than running Python, it runs Julia. Just like Colab, JuliaBox is free. Something that I think Google could do better on is scalability. It would be nice to purchase a higher-level version of Colab just for the convenience.
The easiest option is to use this Colab notebook template.
It supports any Julia version, and also has GPU support.
Turns out that it was just the sequence of steps that was wrong. Very helpful video posted https://www.youtube.com/watch?v=xpZo3L2dYTY. Just to reiterate:
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "Julia on Colab.ipynb",
"version": "0.3.2",
"provenance": []
},
"kernelspec": {
"name": "julia-1.2",
"display_name": "Julia 1.2"
},
"accelerator": "GPU"
},
"cells": [
{
"metadata": {
"id": "oMSuTc3pDlHv",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
""
],
"execution_count": 0,
"outputs": []
}
]
}
In addition to the answer by user3856486: you can now skip the CUDA installation step (mentioned here). That saves a lot of time, especially since you have to rerun these steps whenever you close the notebook/the runtime disconnects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With