Setup for running cells on startup

This is a revival of essentially the same question as in the post below :point_down:, but for jupyterlab.

For the purposes of setting up a user-friendly binder, I’d like to reduce the startup time, and ensure that all the cells are live right from the get-go. Executing all cells on startup would be :ok_hand:, however an even cooler option would be to use dill to preserve a complete session and load it on startup.

To achieve this goal I need to configure an environment where I control everything, and which would run some or all cells when a notebook is opened. Previously, as far as I understand, this was achieved by means of frontend javascript in the classic notebook, however this approach seems fragile, and also hard to reproduce in jupyterlab. Is there a way to achieve this result in a frontend-independent, or at least jupyterlab-compatible way?

1 Like