Closed manics closed 4 years ago
This issue has been mentioned on Jupyter Community Forum. There might be relevant details there:
https://discourse.jupyter.org/t/list-of-supported-dependency-version-for-binder/5945/8
The repo got rebuilt just before I posted on the forum so it should be using the latest version of repo2docker. This is super weird :-/
Jupyterlab and offlinenotebook are installed in an earlier build step, so although the repo is rebuilt the earlier steps will have been cached and could be quite old. One possibility is there was a issue with one of the intermediate dependencies which has now been "locked in" to the cached image. I'll try and figure out how JupyterLab dependencies work....
jupyter labextension install jupyter-offlinenotebook
sometimes fails, example of the debug logs when it fails /tmp/jupyterlab-debug-2qo3sy0z.log
:
There's a few other reports of this error, e.g. https://github.com/jupyterlab/jupyterlab/issues/7608
This error is hidden during the repo2docker build due to || true
in case an incompatible version of JupyterLab is installed in the repo:
https://github.com/jupyterhub/repo2docker/blob/8fe59166acf964cfc74d313b2c974bce48905225/repo2docker/buildpacks/conda/install-miniforge.bash#L50-L52
I've no idea why it only occurs sometimes on mybinder, and never locally :-/
If it does occur, running
$NB_PYTHON_PREFIX/bin/jupyter lab build --debug
also fails with the same error, however clicking the Build
button in the dialog does work. Disabling minimisation for production builds on the command line also works:
$NB_PYTHON_PREFIX/bin/jupyter lab build --minimize=False
Possible solutions (we may want more than one):
Install jupyterlab extension in two steps:
${NB_PYTHON_PREFIX}/bin/jupyter labextension install --no-build jupyter-offlinenotebook && \
$NB_PYTHON_PREFIX/bin/jupyter lab build --minimize=False || \
true
Upgrade to the latest JupyterLab, currently we're on 2.2.0
, the latest is 2.2.7
Disable the JupyterLab build dialog in a jupyterlab config file https://jupyterlab.readthedocs.io/en/stable/user/extensions.html#disabling-rebuild-checks
My discovery that $NB_PYTHON_PREFIX/bin/jupyter lab build --minimize=False
seemed to fix things wasn't a fluke, there's some justification for it:
I've opened https://github.com/jupyterhub/repo2docker/pull/963
As pointed out in https://discourse.jupyter.org/t/list-of-supported-dependency-version-for-binder/5945/4 If you launch JupyterLab in: http://mybinder.org/v2/gh/binder-examples/conda_environment/master?urlpath=lab and some other repos you'll see this dialog:
This occurs on gke and ovh, but not on gesis, nor when it's built locally with repo2docker which makes this tricky to track down.