Tip: speed up Binder launches by pulling github content in a Binder link with nbgitpuller

Riffing on this thread alongside Binderhub button - 'pull from referrer' - #9 by manics (and maybe Binder template repositories) I wonder (feature creep ;-)…

Docs around @manics recent Launch from HTTP referrer, autodetect launch URL by manics · Pull Request #891 · jupyterhub/binderhub · GitHub PR suggests:

In a GitHub repo create a readme with a link to https://binder.example.org/autodetect, if it works the referrer will be parsed and converted into a link to launch the repo you came from.

So what if there was also a redirect saying: “(and) by default/convention look for a “binder-base” branch in the same same directory; if it exists, build / pull that, and then top up with content from an nbgitpulled content repo”.

For example, running:

https://binder.example.org/autodetectwithbase

from https://github.com/user/example would:

  • autodetect https://github.com/user/example as referrer;
  • build/pull https://github.com/user/example/tree/binder-base
  • nbgitpull https://github.com/user/example into the binder image

Complicating further, there may also be a need to allow users to over-ride the gitpulled branch name with an arbitrary one, as well as allowing Binder to autodetect a referral from a branch specifying content from that branch is the content to be pulled in?

1 Like