Closed yebai closed 6 months ago
There's two parts to this. The first is dyanmically making a notebook available on Github, which is really easy. You can just replace the tail end of the Colab URL with the notebook location in the repo:
https://colab.research.google.com/github/TuringLang/TuringTutorials/blob/master/0_Introduction.ipynb
The harder part is making the Julia runtime available easily, which would either
!curl -sSL "https://storage.googleapis.com/julia-tpu-binaries/julia.v1.1.0-kf.tpu3.x86_64-linux-gnu.tar.gz" -o julia.tar.gz
!tar -xzf julia.tar.gz -C /usr
!rm -rf julia.tar.gz*
!julia -e 'using Pkg; pkg"add IJulia;"'
# Download and install the XLA Compiler
!if [ ! -d XLA.jl ]; then git clone https://github.com/JuliaTPU/XLA.jl; fi
!cd XLA.jl && git pull
!cd XLA.jl && julia --project=. -e 'using Pkg; pkg"instantiate"'
It doesn't seem very easy right now -- if Google had native Julia support this would be trivial. We could maintain a separate folder of Colab-enabled notebooks, but they would probably be difficult to maintain when changes are made and the install period is probably not very quick.
All notebooks are now in Quarto, which are easy to run anywhere.
Colab provides a cloud-based environment for running Jupyter notebooks. It also supports GPU and TPU for free. Maybe we can make Turing tutorials available on colab to encourage users to play with it. See e.g.
Swift example in colab
How to install Julia (and packages) on colab