Add option for execution at build time with binderbot
See original GitHub issueDescription / Summary
As we have discussed several times, it would be very cool to be able to execute the notebooks of your jupyterbook inside a specified binder environment. This would be done at build time, so a “jupyter-book build” process would trigger this execution, and the results of running the computation remotely would then be .
I could imagine an option in _config.yml like
execute:
use_binderbot: true
which would turn on this feature.
Value / benefit
This would be useful for CI pipelines and for general consistency between build environment and binder environment. Some notebooks may require access to cloud resources (data, Dask Gateway, etc.) that are only available via binder in the cloud.
This would be very helpful for our Earth & Environmental Data Science book (https://github.com/earth-env-data-science/earth-env-data-science-book/issues/30#issuecomment-908393833).
Implementation details
Binderbot would be a good tool for the job.
I browsed the repository to try to find where the execution actually happens, but I couldn’t find it. Perhaps it is actually done by MyST-NB, in which case this issue perhaps needs to be transferred there?
Given that a binderbot could exist in multiple places, we may also want to define a specification for different execution engines.
In addition, there’s some ground work in Jupyter Cache that will make this more possible.
Tasks to complete
- Figure out the right implementation and the infrastructure to use to prototype this
- …implement and add tasks as needed
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)

Top Related StackOverflow Question
~I’ll move this over to Jupyter Cache 👍~
Actually on second thought, we can just keep this one unless somebody really wants it in Jupyter Cache - I think that from a user’s perspective this would be a change in Jupyter Book so I’m happy to leave here. @chrisjsewell if you wish otherwise I’m happy to move it
I’ll also update the top comment with a few clarifications
Thanks @chrisjsewell - that definitely looks like the right place to discuss this! Feel free to close here if you wish.