From 0135e2e7e52afe93829caf68cb7f0f9389529135 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Tue, 22 Jun 2021 17:49:02 +0300 Subject: [PATCH 1/7] Install pkgs with pip instead of conda Ref: https://github.com/2i2c-org/pilot-hubs/pull/204#issuecomment-776674549 --- deployments/utoronto/image/environment.yml | 59 --------------------- deployments/utoronto/image/requirements.txt | 50 +++++++++++++++++ 2 files changed, 50 insertions(+), 59 deletions(-) delete mode 100644 deployments/utoronto/image/environment.yml create mode 100644 deployments/utoronto/image/requirements.txt diff --git a/deployments/utoronto/image/environment.yml b/deployments/utoronto/image/environment.yml deleted file mode 100644 index 425582d..0000000 --- a/deployments/utoronto/image/environment.yml +++ /dev/null @@ -1,59 +0,0 @@ -channels: - - conda-forge -dependencies: - # for jupyter-desktop-server - - websockify - - # language runtimes - - python=3.8.* - - - numpy - - scipy - - matplotlib - - pandas - - seaborn - - sympy - - networkx - - scikit-learn - - beautifulsoup4 - - statsmodels - - nltk - - spacy - - geopandas - # From https://github.com/utoronto-2i2c/jupyterhub-deploy/issues/29 - - astroquery - - astropy - - galpy - - - pip<20.3 - - - pip: - # Infrastructure things - - jupyterlab==2.* - - voila==0.1.23 - - nbgitpuller==0.9.* - - jupyter-resource-usage==0.5.1 - - nbinteract==0.2.5 - - jupytext==1.6.* - - RISE==5.6.1 - - jupyter_contrib_nbextensions==0.5.1 - - jupyter-desktop-server==0.1.3 - - git-credential-helpers==0.2 - - notebook==6.1.6 - - jupyterhub==1.3.0 - - jupyter-server-proxy==1.5.2 - - jupyter-rsession-proxy==1.2 - - jupyter-shiny-proxy==1.1 - - jupyter-tree-download==1.0.1 - - ipywidgets==7.6.2 - # This is temporary (ref: https://github.com/utoronto-2i2c/jupyterhub-deploy/issues/77) - - jedi==0.17.2 - - - datascience - - geojson - - folium - - geopy - - # nbextensions - - jupyterthemes==0.20.0 - - qgrid==1.3.1 diff --git a/deployments/utoronto/image/requirements.txt b/deployments/utoronto/image/requirements.txt new file mode 100644 index 0000000..c0f0b24 --- /dev/null +++ b/deployments/utoronto/image/requirements.txt @@ -0,0 +1,50 @@ +# for jupyter-desktop-server +- websockify + +- numpy +- scipy +- matplotlib +- pandas +- seaborn +- sympy +- networkx +- scikit-learn +- beautifulsoup4 +- statsmodels +- nltk +- spacy +- geopandas +# From https://github.com/utoronto-2i2c/jupyterhub-deploy/issues/29 +- astroquery +- astropy +- galpy + +# Infrastructure things +- jupyterlab==2.* +- voila==0.1.23 +- nbgitpuller==0.9.* +- jupyter-resource-usage==0.5.1 +- nbinteract==0.2.5 +- jupytext==1.6.* +- RISE==5.6.1 +- jupyter_contrib_nbextensions==0.5.1 +- jupyter-desktop-server==0.1.3 +- git-credential-helpers==0.2 +- notebook==6.1.6 +- jupyterhub==1.3.0 +- jupyter-server-proxy==1.5.2 +- jupyter-rsession-proxy==1.2 +- jupyter-shiny-proxy==1.1 +- jupyter-tree-download==1.0.1 +- ipywidgets==7.6.2 +# This is temporary (ref: https://github.com/utoronto-2i2c/jupyterhub-deploy/issues/77) +- jedi==0.17.2 + +- datascience +- geojson +- folium +- geopy + +# nbextensions +- jupyterthemes==0.20.0 +- qgrid==1.3.1 From 8ff159e178e968fdad2d4d543aeedf3ee8e0a120 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Tue, 22 Jun 2021 18:08:13 +0300 Subject: [PATCH 2/7] Bump jupyterlab and few other pkgs --- deployments/utoronto/image/requirements.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/deployments/utoronto/image/requirements.txt b/deployments/utoronto/image/requirements.txt index c0f0b24..fbaa47b 100644 --- a/deployments/utoronto/image/requirements.txt +++ b/deployments/utoronto/image/requirements.txt @@ -20,11 +20,11 @@ - galpy # Infrastructure things -- jupyterlab==2.* -- voila==0.1.23 +- jupyterlab==3.* +- voila==0.2.10 - nbgitpuller==0.9.* - jupyter-resource-usage==0.5.1 -- nbinteract==0.2.5 +- nbinteract==0.2.6 - jupytext==1.6.* - RISE==5.6.1 - jupyter_contrib_nbextensions==0.5.1 @@ -32,7 +32,6 @@ - git-credential-helpers==0.2 - notebook==6.1.6 - jupyterhub==1.3.0 -- jupyter-server-proxy==1.5.2 - jupyter-rsession-proxy==1.2 - jupyter-shiny-proxy==1.1 - jupyter-tree-download==1.0.1 @@ -48,3 +47,10 @@ # nbextensions - jupyterthemes==0.20.0 - qgrid==1.3.1 + +# JupyterLab extensions +- jupyterlab_widgets==1.0.* +- jupyter-server-proxy==3.0.2 +- jupytext==1.10.* +- ipympl==0.7.0 +# todo: qgrid https://github.com/quantopian/qgrid/pull/356 \ No newline at end of file From 70302a44a26477c910e8211bc669039a00256c4f Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Tue, 22 Jun 2021 18:08:45 +0300 Subject: [PATCH 3/7] Lab extensions now installed with pip --- deployments/utoronto/image/Dockerfile | 4 ++-- deployments/utoronto/image/install-jupyter-extensions.bash | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/deployments/utoronto/image/Dockerfile b/deployments/utoronto/image/Dockerfile index 626172b..1017fa0 100644 --- a/deployments/utoronto/image/Dockerfile +++ b/deployments/utoronto/image/Dockerfile @@ -163,9 +163,9 @@ RUN sed -i -e '/^R_LIBS_USER=/s/^/#/' /etc/R/Renviron && \ USER ${NB_USER} -COPY environment.yml /tmp/ +COPY requirements.txt /tmp/ -RUN conda env update -p ${CONDA_DIR} -f /tmp/environment.yml +RUN python3 -m pip install -r /tmp/requirements.txt COPY install-jupyter-extensions.bash /tmp/install-jupyter-extensions.bash RUN /tmp/install-jupyter-extensions.bash diff --git a/deployments/utoronto/image/install-jupyter-extensions.bash b/deployments/utoronto/image/install-jupyter-extensions.bash index ab98fec..caf63ee 100755 --- a/deployments/utoronto/image/install-jupyter-extensions.bash +++ b/deployments/utoronto/image/install-jupyter-extensions.bash @@ -1,13 +1,6 @@ #!/bin/bash set -euo pipefail -jupyter labextension install --debug \ - @jupyter-widgets/jupyterlab-manager@2 \ - @jupyterlab/server-proxy@2.1.1 \ - jupyterlab-jupytext@1.2.1 \ - jupyter-matplotlib@0.7.4 \ - qgrid2@1.1.3 - # Install jupyter-contrib-nbextensions jupyter contrib nbextension install --sys-prefix From ac3fcb0fc07877ae71a72c1d53e23480021a2419 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Fri, 25 Jun 2021 13:32:04 +0300 Subject: [PATCH 4/7] Don't use a list --- deployments/utoronto/image/requirements.txt | 90 ++++++++++----------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/deployments/utoronto/image/requirements.txt b/deployments/utoronto/image/requirements.txt index fbaa47b..c4475ea 100644 --- a/deployments/utoronto/image/requirements.txt +++ b/deployments/utoronto/image/requirements.txt @@ -1,56 +1,56 @@ # for jupyter-desktop-server -- websockify +websockify -- numpy -- scipy -- matplotlib -- pandas -- seaborn -- sympy -- networkx -- scikit-learn -- beautifulsoup4 -- statsmodels -- nltk -- spacy -- geopandas +numpy +scipy +matplotlib +pandas +seaborn +sympy +networkx +scikit-learn +beautifulsoup4 +statsmodels +nltk +spacy +geopandas # From https://github.com/utoronto-2i2c/jupyterhub-deploy/issues/29 -- astroquery -- astropy -- galpy +astroquery +astropy +galpy # Infrastructure things -- jupyterlab==3.* -- voila==0.2.10 -- nbgitpuller==0.9.* -- jupyter-resource-usage==0.5.1 -- nbinteract==0.2.6 -- jupytext==1.6.* -- RISE==5.6.1 -- jupyter_contrib_nbextensions==0.5.1 -- jupyter-desktop-server==0.1.3 -- git-credential-helpers==0.2 -- notebook==6.1.6 -- jupyterhub==1.3.0 -- jupyter-rsession-proxy==1.2 -- jupyter-shiny-proxy==1.1 -- jupyter-tree-download==1.0.1 -- ipywidgets==7.6.2 +jupyterlab==3.* +voila==0.2.10 +nbgitpuller==0.9.* +jupyter-resource-usage==0.5.1 +nbinteract==0.2.6 +RISE==5.6.1 +jupyter_contrib_nbextensions==0.5.1 +jupyter-desktop-server==0.1.3 +git-credential-helpers==0.2 +notebook==6.1.6 +jupyterhub==1.3.0 +jupyter-rsession-proxy==1.2 +jupyter-shiny-proxy==1.1 +jupyter-tree-download==1.0.1 +ipywidgets==7.6.2 +traitlets>=5.0 +nbformat>=5.0 # This is temporary (ref: https://github.com/utoronto-2i2c/jupyterhub-deploy/issues/77) -- jedi==0.17.2 +jedi==0.17.2 -- datascience -- geojson -- folium -- geopy +datascience +geojson +folium +geopy # nbextensions -- jupyterthemes==0.20.0 -- qgrid==1.3.1 +jupyterthemes==0.20.0 +qgrid==1.3.1 # JupyterLab extensions -- jupyterlab_widgets==1.0.* -- jupyter-server-proxy==3.0.2 -- jupytext==1.10.* -- ipympl==0.7.0 -# todo: qgrid https://github.com/quantopian/qgrid/pull/356 \ No newline at end of file +jupyterlab_widgets==1.0.* +jupyter-server-proxy==3.0.2 +jupytext==1.10.* +ipympl==0.7.0 \ No newline at end of file From 9fdf90ae1f21d50af0e583ec0363292de2e61d6c Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Fri, 25 Jun 2021 13:32:30 +0300 Subject: [PATCH 5/7] Re-arrange Dockerfile to reduce rebuilding of our R packages --- deployments/utoronto/image/Dockerfile | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/deployments/utoronto/image/Dockerfile b/deployments/utoronto/image/Dockerfile index 1017fa0..188a665 100644 --- a/deployments/utoronto/image/Dockerfile +++ b/deployments/utoronto/image/Dockerfile @@ -163,26 +163,25 @@ RUN sed -i -e '/^R_LIBS_USER=/s/^/#/' /etc/R/Renviron && \ USER ${NB_USER} -COPY requirements.txt /tmp/ - -RUN python3 -m pip install -r /tmp/requirements.txt - -COPY install-jupyter-extensions.bash /tmp/install-jupyter-extensions.bash -RUN /tmp/install-jupyter-extensions.bash - # Set CRAN mirror to rspm before we install anything COPY Rprofile.site /usr/lib/R/etc/Rprofile.site # RStudio needs its own config COPY rsession.conf /etc/rstudio/rsession.conf -# Install IRKernel -RUN r -e "install.packages('IRkernel', version='1.1.1')" && \ - r -e "IRkernel::installspec(prefix='${CONDA_DIR}')" - # Install R packages, cleanup temp package download location COPY install.R /tmp/install.R RUN /tmp/install.R && \ rm -rf /tmp/downloaded_packages/ /tmp/*.rds +COPY requirements.txt /tmp/ +RUN python3 -m pip install -r /tmp/requirements.txt + +COPY install-jupyter-extensions.bash /tmp/install-jupyter-extensions.bash +RUN /tmp/install-jupyter-extensions.bash + +# Install IRKernel +RUN r -e "install.packages('IRkernel', version='1.1.1')" && \ + r -e "IRkernel::installspec(prefix='${CONDA_DIR}')" + # Disable history. ADD ipython_config.py ${CONDA_PREFIX}/etc/ipython/ From bdd820c4be087355fee5d5c9a4c46412a4a33259 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Fri, 25 Jun 2021 18:01:14 +0300 Subject: [PATCH 6/7] Remove nbinteract --- deployments/utoronto/image/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/deployments/utoronto/image/requirements.txt b/deployments/utoronto/image/requirements.txt index c4475ea..1fa3c82 100644 --- a/deployments/utoronto/image/requirements.txt +++ b/deployments/utoronto/image/requirements.txt @@ -24,7 +24,6 @@ jupyterlab==3.* voila==0.2.10 nbgitpuller==0.9.* jupyter-resource-usage==0.5.1 -nbinteract==0.2.6 RISE==5.6.1 jupyter_contrib_nbextensions==0.5.1 jupyter-desktop-server==0.1.3 From a9c53edc07868b3997b5616c1168b15a95df3652 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Fri, 25 Jun 2021 18:03:48 +0300 Subject: [PATCH 7/7] Upgrade nbgitpuller version --- deployments/utoronto/image/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployments/utoronto/image/requirements.txt b/deployments/utoronto/image/requirements.txt index 1fa3c82..fc16852 100644 --- a/deployments/utoronto/image/requirements.txt +++ b/deployments/utoronto/image/requirements.txt @@ -22,7 +22,7 @@ galpy # Infrastructure things jupyterlab==3.* voila==0.2.10 -nbgitpuller==0.9.* +nbgitpuller==0.10.* jupyter-resource-usage==0.5.1 RISE==5.6.1 jupyter_contrib_nbextensions==0.5.1