From e405d9678fe1bfd31c24e844cd6333984f5fcbab Mon Sep 17 00:00:00 2001 From: Tim Head Date: Thu, 6 Feb 2020 07:46:43 +0100 Subject: [PATCH] Make it optional to install the extension for lab Some versions of lab used by repo2docker are not compatible with the offlinenotebook extension. We try to install the extension and if it fails we move on without raising an error. --- repo2docker/buildpacks/conda/install-miniconda.bash | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/repo2docker/buildpacks/conda/install-miniconda.bash b/repo2docker/buildpacks/conda/install-miniconda.bash index 0449a124..54065715 100755 --- a/repo2docker/buildpacks/conda/install-miniconda.bash +++ b/repo2docker/buildpacks/conda/install-miniconda.bash @@ -54,8 +54,9 @@ conda env create -p ${NB_PYTHON_PREFIX} -f /tmp/environment.yml # after the server connection has been lost # This will install and enable the extension for jupyter notebook ${NB_PYTHON_PREFIX}/bin/python -m pip install https://github.com/manics/jupyter-offlinenotebook/archive/7ba3520.zip -# and this installs it for lab -${NB_PYTHON_PREFIX}/bin/jupyter labextension install jupyter-offlinenotebook +# and this installs it for lab. Keep going if the lab version is incompatible +# with the extension +${NB_PYTHON_PREFIX}/bin/jupyter labextension install jupyter-offlinenotebook || true # empty conda history file, # which seems to result in some effective pinning of packages in the initial env,