Are there speed up tricks/hacks repo2docker can use for jupyter lab extension installs?

What is the fastest way to install one or two jupyter lab extensions?

In repo2docker we install https://github.com/manics/jupyter-offlinenotebook and nbresuse. For offline notebook we run jupyter labextension install jupyter-offlinenotebook to install the extension but for nbresuse I think we don’t. At least if we do I can’t quickly find it.

All this made me wonder: we can take a few shortcuts/optimisations/special case stuff because we control “everything” in repo2docker. What crazy (or not quite so crazy) things could we try to speed up the installing of lab extensions? What are the tricks and best practices?

2 Likes

That’s because core lab ships the memory usage item in the status bar, and retrieves the values from nbresuse if it is available:

For now what works best is to install all lab extensions in one go, with a single call to jupyter labextension install in the postBuild. However the recent work on the extension system refactor should make it easier and not require a build on the user side!

2 Likes

Thanks for those two pointers. I was hoping there was some clever trick that nbresuse uses that we could transplant to offlinenotebook.

Do you have a pointer for where to follow along or even better get notified when the new extension infrastructure is ready to use?

There is the 3.0 Release Plans issue, which should link to a couple more issues and PRs.

And this PR with more technical details: https://github.com/jupyterlab/jupyterlab/pull/8385

2 Likes