eWaterCycle / infra

Instructions for system administrators to deploy the eWaterCycle platform
Apache License 2.0
0 stars 0 forks source link

Upgrade Jupyter Hub/Lab #46

Closed sverhoeven closed 4 years ago

sverhoeven commented 4 years ago

We are running old versions of all Jupyter components, causing problems installing new extensions. I would like to upgrade to the latest versions.

Current versions are

jupyterhub --version
0.9.4
jupyter-labextension list
JupyterLab v0.35.4
Known labextensions:
   app dir: /usr/local/share/jupyter/lab
        @ewatercycle/jupyterlab_thredds v0.3.0  enabled  OK
        @jupyter-widgets/jupyterlab-manager v0.38.1  enabled  OK
        @jupyterlab/geojson-extension v0.18.1  enabled  OK
        @jupyterlab/hub-extension v0.12.0  enabled  OK
        @jupyterlab/toc v0.6.0  enabled  OK
        @pyviz/jupyterlab_pyviz v0.6.4  enabled  OK
        jupyter-leaflet v0.10.0  enabled  OK
        jupyter-matplotlib v0.3.0  enabled  OK
        jupyterlab_bokeh v0.6.3  enabled  OK

The https://github.com/eWaterCycle/jupyterlab_thredds repo needs to be updated to be able to use the latest JupyerLab. See https://github.com/eWaterCycle/jupyterlab_thredds/issues/32

We need to check if all current extensions still work.

sverhoeven commented 4 years ago

After upgrading check that the experment can be launched from https://explore.ewatercycle.org .

sverhoeven commented 4 years ago

Versions of OS/Python/Node/Conda packages currently installed on jupyter.ewatercycle.org conda-pip.freeze.txt dpkg-list.txt npm-g-list.txt os-pip3-freeze.txt conda-list.txt

sverhoeven commented 4 years ago

All labextensions work in Jupyterlab 2.1.5 except for jupyterlab_thredds + I also had problems with geoviews.

Local conda install In a fresth conda env without existing jupyter config files ```shell mv ~/.jupyter ~/.jupyter.notnow mv ~/.local/share/jupyter ~/.local/share/jupyter.notnow conda create -n jl2 pip conda activate jl2 pip install jupyterlab notebook conda env export > jl-only.yml jupyter lab conda install -c conda-forge nodejs ipywidgets jupyter labextension install @jupyter-widgets/jupyterlab-manager conda env export > jl-widgets.yml jupyter lab # @jupyterlab/hub-extension is deprecated, skipping conda install -c bokeh jupyter_bokeh jupyter labextension install @bokeh/jupyter_bokeh conda env export > bokeh.yml jupyter lab conda install -c conda-forge ipyleaflet jupyter labextension install jupyter-leaflet conda env export > leaflet.yml jupyter lab conda install -c conda-forge -c pyviz holoviz geoviews geoviews-core # Downgraded nodejs, numpy and bokeh jupyter labextension install @pyviz/jupyterlab_pyviz conda env export > pyviz.yml jupyter lab # geoviews Example on http://geoviews.org/index.html does not work gives `ValueError: Feature type not found, could not apply options.` # holoviews example does work pip install jupyterlab_thredds jupyter labextension install @ewatercycle/jupyterlab_thredds ``` labextension install failed with ```shell An error occured. ValueError: The extension "@ewatercycle/jupyterlab_thredds" does not yet support the current version of JupyterLab. Conflicting Dependencies: JupyterLab Extension Package >=2.1.2 <2.2.0 >=1.1.0 <2.0.0 @jupyterlab/application >=2.1.1 <2.2.0 >=1.1.0 <2.0.0 @jupyterlab/apputils >=2.1.2 <2.2.0 >=1.1.0 <2.0.0 @jupyterlab/docmanager >=2.1.2 <2.2.0 >=1.1.0 <2.0.0 @jupyterlab/filebrowser >=2.1.2 <2.2.0 >=1.1.0 <2.0.0 @jupyterlab/notebook >=5.1.0 <5.2.0 >=4.0.5 <5.0.0 @jupyterlab/services >=16.9.0 <16.10.0 >=16.8.6 <16.9.0 react >=16.9.0 <16.10.0 >=16.8.6 <16.9.0 react-dom See the log file for details: /tmp/jupyterlab-debug-zturodqa.log ``` Rollback and continue with other extensions ```shell pip uninstall jupyterlab_thredds jupyter labextension install @jupyterlab/geojson-extension jupyter lab jupyter labextension install @jupyterlab/toc conda install -c conda-forge ipympl conda env export > ipympl.yml # Labextension for matplotlib part of already installed @jupyter-widgets/jupyterlab-manager, just need rebuild jupyter lab build jupyter lab Formatter for #37 ```shell conda install -c conda-forge jupyterlab_code_formatter black isort jupyter serverextension enable --py jupyterlab_code_formatter conda env export > format.yml jupyter labextension install @ryantam626/jupyterlab_code_formatter jupyter lab ``` Pangeo for #50 ```shell conda install -c conda-forge jupyter-server-proxy dask distributed dask-jobqueue dask-labextension conda env export > pangeo.yml jupyter serverextension enable dask_labextension jupyter labextension install @jupyterlab/server-proxy dask-labextension jupyter labextension list JupyterLab v2.1.5 Known labextensions: app dir: /home/verhoes/miniconda37/envs/jl2/share/jupyter/lab @bokeh/jupyter_bokeh v2.0.2 enabled OK @jupyter-widgets/jupyterlab-manager v2.0.0 enabled OK @jupyterlab/geojson-extension v2.0.1 enabled OK @jupyterlab/server-proxy v2.1.0 enabled OK @jupyterlab/toc v4.0.0 enabled OK @pyviz/jupyterlab_pyviz v1.0.4 enabled OK @ryantam626/jupyterlab_code_formatter v1.3.1 enabled OK dask-labextension v2.0.2 enabled OK jupyter-leaflet v0.13.0 enabled OK jupyter-matplotlib v0.7.2 enabled OK ```
sverhoeven commented 4 years ago

PR has been merged next up

  1. Run playbook against server
  2. Check functionality on server
    • [x] Run sample-notebooks/bmi/Walrus.ipynb
    • [x] Experiment launcher still works
    • [x] Plotting with matplotlib
sverhoeven commented 4 years ago

Also checked geojson, leaflet, toc, geoviews.