Binder for hosting Jupyter notebooks.

February 10, 2019. Filed under systems-thinking 6 systems 4 binder 1

When I initially wrote my recent piece on modeling reliability, I included the code inline at the end. This is a bit silly, since I wrote the initial model in a Jupyter notebook, but it seemed short enough to just embed.

Eoin was kind enough to point be towards these instructions from Julia, which explain using Binder to host notebooks from your GitHub repository.

It took a try or two, but I put together the systems-explorations repository and did the moderate debugging necessary to get it working, which means you can now launch interactive notebooks of the system models I work on by following this link and waiting for a few minutes for it to bootstrap.

I was planning to put together a simple app to make it easier for folks to use the systems library without installing it locally, and Binder is a surprisingly replacement for putting that together.


The one tricky bit I ran into was getting Graphviz installed, but it turns out Binder uses repo2docker for configuration, so all that ended up requiring was adding an apt.txt to the root of my repository and adding:

graphviz

Then it worked! The only other configuration is in the requirements.txt, which did require a bit of tweaking to work. That came down to only pinning the core dependencies not their recursive dependencies, since there were version mismatches between my desktop where I pip freeze'd the requirements and the image where Docker was being installed, and some of those were not uninstallable in the container, which led some earlier builds to fail.