Binderhub Support for Nix -- Data Science


By including a default.nix in your project you can now reproducibily and freely share a repository requiring only a web browser.

Most importantly try it out.

Binder note takes about 2-3 minutes to start

Demo Repository: GitHub - costrouc/nix-binder-example: BinderHub example using Nix

Binderhub is a service that creates Docker images from repositories (jupyter/repo2docker) and launches a jupyter notebook in the cloud requiring only a web browser to explore the repository. I have added nix support meaning that as long as a default.nix file exists in your repository with python3Packages.jupyterlab as a buildInput you can reproducibly share nix based repositories.

This is just a minimal working version that I contributed to repo2docker. I would love feedback and for you to try it out. Ideas that I think would be great.

  • default.nix may not be the best filename. Possibly use binder.nix instead
  • possibility to pin packages outside of nix expression
  • a base image is used of ubuntu + python dependencies (for compatibility reasons). For us the base image really does not matter and contributes to the large image size. alpine linux would be a better base.

While I have your attention if you are interested in developing the data science ecosystem in nix please get in contact with me! I am working on kernel and extension integration with jupyter lab and I am wanting to work on a nix-kernel a jupyter meta kernel that will allow you to specify your environment within the notebook itself (in a cell). Allowing for much better reproducibility.