You’ll want to peruse repo2docker
codebase. For example, if you only provide a requirements.txt
, you’ll get
- (old)
nodejs
,less
andunzip
from apt - python 3.7 installed with python which resolves to this conda-lock-compatible list of packages
- this includes
jupyterlab_widgets
(which provides@jupyter-widgets/*
)jupyterlab-offline-notebook
(which provides its eponymous package)
- this includes
Once you start asking for r
, julia
, etc. it gets… more complicated, with some packages installed from… all over. r
, in particular, causes a cascading download of rstudio and a bunch of other stuff.
As of JupyterLab 3.0, there is no specific jupyterlab handling performed, as everything is handled by the pre-built extensions installed by conda
(or by your requirements.txt
).
From a performance perspective, you should make every effort not to use “source” extensions via jupyter lab build
or jupyter labextension install
in postBuild
, as this will usually a) increase your build time substantially and b) reduce the reproducibility. Of course, if you have extensions you need that haven’t updated, you’ll still have to take the hit, and download 1gb+ of node_modules
, run webpack, etc. then have binder push all of that trash to the various nodes.
However, if you/your users don’t use/like the giant text labels added to the notebook toolbar by jupyterlab-offline-notebook
it’s “safe” (won’t invoke npm
/webpack
) to do jupyter labextension disable jupyterlab-offline-notebook
.
Additionally, to enable jupyterlab 3.1
’s collaborative features, you’ll have to do a little bit of extra work:
- in
requirements.txt
, specifyjupyterlab >=3.1
(or a specific version)- probably install
jupyterlab-link-share
to avoid having to root around for yourtoken
- probably install
- in
jupyter_config.json
specify{"LabApp": {"collaborative": true}}
- using this file (instead of
jupyter_notebook_config.json
and/orjupyter_server_config.json
) avoids having to think too much about launchingjupyter notebook
(the default) vsjupyter lab
orjupyter server
- using this file (instead of
For a more concrete example, see this gist (and just not use rc2
).