IHaskell on mybinder.org
mybinder.org is a website that will freely host a GitHub repository as a collection of interactive Jupyter notebooks. It has excellent built-in support for some of the more popular Jupyter kernels such as Python and Julia, but it also has support for building a
Dockerfile of your choosing.
This means that getting an IHaskell installation up and running can be as simple as clicking a link, and I’m happy to report that I’ve gotten this working! You can try it here.
I started with the simplest thing I could think of, which was to install system dependencies and Jupyter to an Ubuntu container and then run
stack install ihaskell. You can see the Dockerfile for that here.
Once I had that working, my next step was to roll these changes into IHaskell’s
Dockerfile and now everyone can use IHaskell on mybinder.org!
I’ve also pushed an image to Docker Hub that you can use as a base for your own repositories. A minimal example of a valid
Dockerfile looks something like this:
Ideally I would also like to get this running with Nix, because that approach results in a much smaller image and is easily extensible just by editing
default.nix. I have a small repo that builds but doesn’t run on mybinder.org, and I’ve opened an issue.
I’m pretty excited about what this means for the Jupyter ecosystem and IHaskell in particular, and I’m looking forward to seeing what other people do with this!