From 84313e84dc91dc5637bd6caf461c19104f54d375 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Thu, 7 Apr 2022 09:20:29 -0400 Subject: [PATCH 01/34] release: update to use image pavics/workflow-tests:220407 --- Jenkinsfile | 2 +- binder/Dockerfile | 2 +- launchcontainer | 2 +- launchnotebook | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e07652aa..a1096ff6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { // https://jenkins.io/doc/book/pipeline/syntax/ agent { docker { - image "pavics/workflow-tests:220401" + image "pavics/workflow-tests:220407" label 'linux && docker' } } diff --git a/binder/Dockerfile b/binder/Dockerfile index c7cc9ea8..d0f0bbdc 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -1,4 +1,4 @@ -FROM pavics/workflow-tests:220401 +FROM pavics/workflow-tests:220407 USER root diff --git a/launchcontainer b/launchcontainer index 0b1a1338..7b0a772b 100755 --- a/launchcontainer +++ b/launchcontainer @@ -1,7 +1,7 @@ #!/bin/sh -x if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220401" + DOCKER_IMAGE="pavics/workflow-tests:220407" fi if [ -z "$CONTAINER_NAME" ]; then diff --git a/launchnotebook b/launchnotebook index b6e60684..c17798e6 100755 --- a/launchnotebook +++ b/launchnotebook @@ -7,7 +7,7 @@ if [ -z "$PORT" ]; then fi if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220401" + DOCKER_IMAGE="pavics/workflow-tests:220407" fi if [ -z "$CONTAINER_NAME" ]; then From 3a0b90ebf9a21f678409829da5009887780eb8ce Mon Sep 17 00:00:00 2001 From: Long Vu Date: Thu, 7 Apr 2022 22:02:12 -0400 Subject: [PATCH 02/34] docker: get dask dashboard and "panel serve" to work Add `jupyter-server-proxy`, `dask-labextension` and enable `panel.io.jupyter_server_extension`. The `jupyter-server-proxy` allows to proxy URL like "http://127.0.0.1:8787/status" (dask dashboard URL sample) to "https://pavics.ouranos.ca/jupyter/user-redirect/proxy/8787/status" which the `dask-labextension` will accept. http://127.0.0.1:8787/status is mapped to https://pavics.ouranos.ca/jupyter/user-redirect/proxy/8787/status For "panel serve", we can do it this way: `! panel serve --allow-websocket-origin=pavics.ouranos.ca --port 5007 /notebook_dir/writable-workspace/tmp-test/test-panel.ipynb` 2022-04-08 01:33:50,268 Starting Bokeh server version 2.4.2 (running on Tornado 6.1) 2022-04-08 01:33:50,270 User authentication hooks NOT provided (default user enabled) 2022-04-08 01:33:50,272 Bokeh app running at: http://localhost:5007/test-panel 2022-04-08 01:33:50,272 Starting Bokeh server with process id: 2155 2022-04-08 01:34:06,179 WebSocket connection opened 2022-04-08 01:34:06,179 ServerConnection created Then open a new browser tab to https://pavics.ouranos.ca/jupyter, login again if it asks, and to go this URL: https://pavics.ouranos.ca/jupyter/user-redirect/proxy/5007/test-panel http://localhost:5007/test-panel is mapped to https://pavics.ouranos.ca/jupyter/user-redirect/proxy/5007/test-panel --- docker/Dockerfile | 4 +++- docker/environment.yml | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 6c19bf04..096f8651 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -70,7 +70,9 @@ RUN python -m ipykernel install --name birdy # https://github.com/plotly/jupyter-dash/issues/49 RUN jupyter lab build -RUN jupyter serverextension enable voila --sys-prefix +RUN jupyter serverextension enable voila --sys-prefix \ + && jupyter serverextension enable panel.io.jupyter_server_extension --sys-prefix \ + && jupyter serverextension list # && jupyter labextension install jupyterlab-clipboard # This should be "master" but commit diff --git a/docker/environment.yml b/docker/environment.yml index 62a156c7..ccc1cd85 100644 --- a/docker/environment.yml +++ b/docker/environment.yml @@ -170,6 +170,10 @@ dependencies: # xeus-python: back-end kernel implementing the Jupyter Debug Protocol - xeus-python - jupyter-dash + # https:://github.com/jupyterhub/jupyter-server-proxy + - jupyter-server-proxy + # https://github.com/dask/dask-labextension + - dask-labextension # Force newer nodejs for 'jupyter lab build' issue # https://github.com/jupyterlab/jupyterlab/issues/11726#issuecomment-998901247 # TODO: remove nodejs once all extensions move to prebuilt extensions, see comment From 68d7c4d902afb61e3e3f2c2fc221b579057d57db Mon Sep 17 00:00:00 2001 From: Long Vu Date: Thu, 7 Apr 2022 22:05:42 -0400 Subject: [PATCH 03/34] release: update to use image pavics/workflow-tests:220407.1 --- Jenkinsfile | 2 +- binder/Dockerfile | 2 +- launchcontainer | 2 +- launchnotebook | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a1096ff6..10082d9d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { // https://jenkins.io/doc/book/pipeline/syntax/ agent { docker { - image "pavics/workflow-tests:220407" + image "pavics/workflow-tests:220407.1" label 'linux && docker' } } diff --git a/binder/Dockerfile b/binder/Dockerfile index d0f0bbdc..649c3c5d 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -1,4 +1,4 @@ -FROM pavics/workflow-tests:220407 +FROM pavics/workflow-tests:220407.1 USER root diff --git a/launchcontainer b/launchcontainer index 7b0a772b..62bcb299 100755 --- a/launchcontainer +++ b/launchcontainer @@ -1,7 +1,7 @@ #!/bin/sh -x if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220407" + DOCKER_IMAGE="pavics/workflow-tests:220407.1" fi if [ -z "$CONTAINER_NAME" ]; then diff --git a/launchnotebook b/launchnotebook index c17798e6..dc1f1e98 100755 --- a/launchnotebook +++ b/launchnotebook @@ -7,7 +7,7 @@ if [ -z "$PORT" ]; then fi if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220407" + DOCKER_IMAGE="pavics/workflow-tests:220407.1" fi if [ -z "$CONTAINER_NAME" ]; then From ef0bf0647991df529813abd68078e748363d157b Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 12 Apr 2022 07:49:36 -0400 Subject: [PATCH 04/34] release: update to use image pavics/workflow-tests:220412 --- Jenkinsfile | 2 +- binder/Dockerfile | 2 +- launchcontainer | 2 +- launchnotebook | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 10082d9d..9a2f0846 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { // https://jenkins.io/doc/book/pipeline/syntax/ agent { docker { - image "pavics/workflow-tests:220407.1" + image "pavics/workflow-tests:220412" label 'linux && docker' } } diff --git a/binder/Dockerfile b/binder/Dockerfile index 649c3c5d..75a80a66 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -1,4 +1,4 @@ -FROM pavics/workflow-tests:220407.1 +FROM pavics/workflow-tests:220412 USER root diff --git a/launchcontainer b/launchcontainer index 62bcb299..00da217b 100755 --- a/launchcontainer +++ b/launchcontainer @@ -1,7 +1,7 @@ #!/bin/sh -x if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220407.1" + DOCKER_IMAGE="pavics/workflow-tests:220412" fi if [ -z "$CONTAINER_NAME" ]; then diff --git a/launchnotebook b/launchnotebook index dc1f1e98..4c15d5a9 100755 --- a/launchnotebook +++ b/launchnotebook @@ -7,7 +7,7 @@ if [ -z "$PORT" ]; then fi if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220407.1" + DOCKER_IMAGE="pavics/workflow-tests:220412" fi if [ -z "$CONTAINER_NAME" ]; then From b812f376e46a7e0b6eab75db886a5a33a7e7e4d5 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Thu, 14 Apr 2022 13:02:50 -0400 Subject: [PATCH 05/34] docker: add jupyter-panel-proxy to hopefully able to customize panel serve display url Found solution here https://discourse.holoviz.org/t/is-it-possible-to-deploy-and-run-panel-apps-via-jupyter-hub/189 Not sure if it works. --- docker/environment.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/environment.yml b/docker/environment.yml index ccc1cd85..b5c7c8e4 100644 --- a/docker/environment.yml +++ b/docker/environment.yml @@ -5,6 +5,7 @@ channels: - cdat - bokeh - plotly # for jupyter-dash + - pyviz # for jupyter-panel-proxy - defaults dependencies: @@ -174,6 +175,8 @@ dependencies: - jupyter-server-proxy # https://github.com/dask/dask-labextension - dask-labextension + # https://github.com/holoviz/jupyter-panel-proxy + - jupyter-panel-proxy # Force newer nodejs for 'jupyter lab build' issue # https://github.com/jupyterlab/jupyterlab/issues/11726#issuecomment-998901247 # TODO: remove nodejs once all extensions move to prebuilt extensions, see comment From 3a2538725481fd71678af3c4c54f7b57d4f8feef Mon Sep 17 00:00:00 2001 From: Long Vu Date: Thu, 14 Apr 2022 13:04:38 -0400 Subject: [PATCH 06/34] release: update to use image pavics/workflow-tests:220414 --- Jenkinsfile | 2 +- binder/Dockerfile | 2 +- launchcontainer | 2 +- launchnotebook | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9a2f0846..aedd5025 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { // https://jenkins.io/doc/book/pipeline/syntax/ agent { docker { - image "pavics/workflow-tests:220412" + image "pavics/workflow-tests:220414" label 'linux && docker' } } diff --git a/binder/Dockerfile b/binder/Dockerfile index 75a80a66..3a84af83 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -1,4 +1,4 @@ -FROM pavics/workflow-tests:220412 +FROM pavics/workflow-tests:220414 USER root diff --git a/launchcontainer b/launchcontainer index 00da217b..396d43d0 100755 --- a/launchcontainer +++ b/launchcontainer @@ -1,7 +1,7 @@ #!/bin/sh -x if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220412" + DOCKER_IMAGE="pavics/workflow-tests:220414" fi if [ -z "$CONTAINER_NAME" ]; then diff --git a/launchnotebook b/launchnotebook index 4c15d5a9..ed062cc2 100755 --- a/launchnotebook +++ b/launchnotebook @@ -7,7 +7,7 @@ if [ -z "$PORT" ]; then fi if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220412" + DOCKER_IMAGE="pavics/workflow-tests:220414" fi if [ -z "$CONTAINER_NAME" ]; then From 088bc96b97d98b98e4849a814eb3420bf976d1d0 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Thu, 21 Apr 2022 21:43:44 -0400 Subject: [PATCH 07/34] binder: add TEST-panel.ipynb for testing --- binder/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/binder/Dockerfile b/binder/Dockerfile index 3a84af83..0296a9d9 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -12,6 +12,8 @@ WORKDIR /notebooks RUN ./downloadrepos; DEPLOY_PAVICS_LANDING_NB=1 ./reorg-notebooks; rm -rfv downloadrepos default_build_params reorg-notebooks; chown -R jenkins:jenkins . -RUN pip install https://github.com/Ouranosinc/xclim/archive/master.tar.gz +RUN wget https://gist.githubusercontent.com/tlvu/f8a91585bac38af23c4f4490f94fc513/raw/0c7e0ab4af7b51aa5320b873b7f1bf641fc03e27/test-panel.ipynb -O TEST-panel.ipynb; chown jenkins:jenkins TEST-panel.ipynb + +# RUN pip install https://github.com/Ouranosinc/xclim/archive/master.tar.gz USER jenkins From 2365bcb8b9cfa047ed2b116a15c3e3a116d7386f Mon Sep 17 00:00:00 2001 From: Long Vu Date: Thu, 21 Apr 2022 22:50:14 -0400 Subject: [PATCH 08/34] binder: disable other notebooks and add TEST-panel-servable.ipynb for testing --- binder/Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/binder/Dockerfile b/binder/Dockerfile index 0296a9d9..fe04c43a 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -2,17 +2,19 @@ FROM pavics/workflow-tests:220414 USER root -COPY notebooks /notebooks +#COPY notebooks /notebooks -COPY default_build_params /notebooks -COPY downloadrepos /notebooks -COPY binder/reorg-notebooks /notebooks +#COPY default_build_params /notebooks +#COPY downloadrepos /notebooks +#COPY binder/reorg-notebooks /notebooks WORKDIR /notebooks -RUN ./downloadrepos; DEPLOY_PAVICS_LANDING_NB=1 ./reorg-notebooks; rm -rfv downloadrepos default_build_params reorg-notebooks; chown -R jenkins:jenkins . +#RUN ./downloadrepos; DEPLOY_PAVICS_LANDING_NB=1 ./reorg-notebooks; rm -rfv downloadrepos default_build_params reorg-notebooks; chown -R jenkins:jenkins . -RUN wget https://gist.githubusercontent.com/tlvu/f8a91585bac38af23c4f4490f94fc513/raw/0c7e0ab4af7b51aa5320b873b7f1bf641fc03e27/test-panel.ipynb -O TEST-panel.ipynb; chown jenkins:jenkins TEST-panel.ipynb +ENV BOKEH_ALLOW_WS_ORIGIN "*" + +RUN wget https://gist.githubusercontent.com/tlvu/f8a91585bac38af23c4f4490f94fc513/raw/30894efd1c0cd6b759b2a911e6fe50f16deae14d/TEST-panel-binder.ipynb -O TEST-panel-binder.ipynb; wget https://gist.githubusercontent.com/tlvu/f8a91585bac38af23c4f4490f94fc513/raw/30894efd1c0cd6b759b2a911e6fe50f16deae14d/TEST-panel-servable.ipynb -O TEST-panel-servable.ipynb; chown jenkins:jenkins *.ipynb # RUN pip install https://github.com/Ouranosinc/xclim/archive/master.tar.gz From 4f15b1c98b0d891f3089cf9605917e8b0cb01934 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Thu, 21 Apr 2022 22:59:05 -0400 Subject: [PATCH 09/34] binder: fix notebook dir not writable --- binder/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binder/Dockerfile b/binder/Dockerfile index fe04c43a..c822984a 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -14,7 +14,7 @@ WORKDIR /notebooks ENV BOKEH_ALLOW_WS_ORIGIN "*" -RUN wget https://gist.githubusercontent.com/tlvu/f8a91585bac38af23c4f4490f94fc513/raw/30894efd1c0cd6b759b2a911e6fe50f16deae14d/TEST-panel-binder.ipynb -O TEST-panel-binder.ipynb; wget https://gist.githubusercontent.com/tlvu/f8a91585bac38af23c4f4490f94fc513/raw/30894efd1c0cd6b759b2a911e6fe50f16deae14d/TEST-panel-servable.ipynb -O TEST-panel-servable.ipynb; chown jenkins:jenkins *.ipynb +RUN wget https://gist.githubusercontent.com/tlvu/f8a91585bac38af23c4f4490f94fc513/raw/30894efd1c0cd6b759b2a911e6fe50f16deae14d/TEST-panel-binder.ipynb -O TEST-panel-binder.ipynb; wget https://gist.githubusercontent.com/tlvu/f8a91585bac38af23c4f4490f94fc513/raw/30894efd1c0cd6b759b2a911e6fe50f16deae14d/TEST-panel-servable.ipynb -O TEST-panel-servable.ipynb; chown jenkins:jenkins -R . # RUN pip install https://github.com/Ouranosinc/xclim/archive/master.tar.gz From 47ef7b0c668acc84cb9c1c7cedc2f135aa54dd3a Mon Sep 17 00:00:00 2001 From: Long Vu Date: Thu, 21 Apr 2022 23:10:19 -0400 Subject: [PATCH 10/34] binder: test Panel launcher subdir support --- binder/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binder/Dockerfile b/binder/Dockerfile index c822984a..4bee44a0 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -14,7 +14,7 @@ WORKDIR /notebooks ENV BOKEH_ALLOW_WS_ORIGIN "*" -RUN wget https://gist.githubusercontent.com/tlvu/f8a91585bac38af23c4f4490f94fc513/raw/30894efd1c0cd6b759b2a911e6fe50f16deae14d/TEST-panel-binder.ipynb -O TEST-panel-binder.ipynb; wget https://gist.githubusercontent.com/tlvu/f8a91585bac38af23c4f4490f94fc513/raw/30894efd1c0cd6b759b2a911e6fe50f16deae14d/TEST-panel-servable.ipynb -O TEST-panel-servable.ipynb; chown jenkins:jenkins -R . +RUN wget https://gist.githubusercontent.com/tlvu/f8a91585bac38af23c4f4490f94fc513/raw/30894efd1c0cd6b759b2a911e6fe50f16deae14d/TEST-panel-binder.ipynb -O TEST-panel-binder.ipynb; wget https://gist.githubusercontent.com/tlvu/f8a91585bac38af23c4f4490f94fc513/raw/30894efd1c0cd6b759b2a911e6fe50f16deae14d/TEST-panel-servable.ipynb -O TEST-panel-servable.ipynb; mkdir -p subdir1/subdir2; cp TEST-panel-servable.ipynb subdir1/servable1.ipynb; cp TEST-panel-servable.ipynb subdir1/subdir2/servable2.ipynb; cp TEST-panel-servable.ipynb TEST-panel-servable-Copy.ipynb; chown jenkins:jenkins -R . # RUN pip install https://github.com/Ouranosinc/xclim/archive/master.tar.gz From 9b176c030571e8254cf1e13b50506aa6beb13a89 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Fri, 22 Apr 2022 15:22:48 -0400 Subject: [PATCH 11/34] docker: try to fix jupyter-panel-proxy launcher blank page --- docker/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 096f8651..be8d7056 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -98,6 +98,9 @@ RUN wget https://raw.githubusercontent.com/jupyter/docker-stacks/$DOCKER_STACKS_ mkdir /notebook_dir && chown jenkins /notebook_dir && \ chmod a+rwX -R /opt/conda/envs/birdy/fonts +# For jupyter-panel-proxy launcher. +ENV BOKEH_ALLOW_WS_ORIGIN "*" + # problem running start-notebook.sh when being root # the jupyter/base-notebook image also do not default to root user so we do the same here USER jenkins From bb7a1b7b3e46b3e72229527f600b5c8ecaca79a1 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Fri, 22 Apr 2022 15:23:21 -0400 Subject: [PATCH 12/34] release: update to use image pavics/workflow-tests:220422 --- Jenkinsfile | 2 +- binder/Dockerfile | 2 +- launchcontainer | 2 +- launchnotebook | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index aedd5025..0e9bd16d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { // https://jenkins.io/doc/book/pipeline/syntax/ agent { docker { - image "pavics/workflow-tests:220414" + image "pavics/workflow-tests:220422" label 'linux && docker' } } diff --git a/binder/Dockerfile b/binder/Dockerfile index 3a84af83..f22371db 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -1,4 +1,4 @@ -FROM pavics/workflow-tests:220414 +FROM pavics/workflow-tests:220422 USER root diff --git a/launchcontainer b/launchcontainer index 396d43d0..4bd40605 100755 --- a/launchcontainer +++ b/launchcontainer @@ -1,7 +1,7 @@ #!/bin/sh -x if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220414" + DOCKER_IMAGE="pavics/workflow-tests:220422" fi if [ -z "$CONTAINER_NAME" ]; then diff --git a/launchnotebook b/launchnotebook index ed062cc2..c368eebe 100755 --- a/launchnotebook +++ b/launchnotebook @@ -7,7 +7,7 @@ if [ -z "$PORT" ]; then fi if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220414" + DOCKER_IMAGE="pavics/workflow-tests:220422" fi if [ -z "$CONTAINER_NAME" ]; then From 01370072f237331691e73069c0fa41b123b4ba17 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 26 Apr 2022 09:23:48 -0400 Subject: [PATCH 13/34] binder: commit test notebooks to avoid external dependencies and guaranty reproducibility --- binder/Dockerfile | 6 +- binder/test-notebooks/TEST-panel-binder.ipynb | 85 +++++++++++++++++++ .../test-notebooks/TEST-panel-servable.ipynb | 36 ++++++++ 3 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 binder/test-notebooks/TEST-panel-binder.ipynb create mode 100644 binder/test-notebooks/TEST-panel-servable.ipynb diff --git a/binder/Dockerfile b/binder/Dockerfile index 4bee44a0..9604888e 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -14,7 +14,11 @@ WORKDIR /notebooks ENV BOKEH_ALLOW_WS_ORIGIN "*" -RUN wget https://gist.githubusercontent.com/tlvu/f8a91585bac38af23c4f4490f94fc513/raw/30894efd1c0cd6b759b2a911e6fe50f16deae14d/TEST-panel-binder.ipynb -O TEST-panel-binder.ipynb; wget https://gist.githubusercontent.com/tlvu/f8a91585bac38af23c4f4490f94fc513/raw/30894efd1c0cd6b759b2a911e6fe50f16deae14d/TEST-panel-servable.ipynb -O TEST-panel-servable.ipynb; mkdir -p subdir1/subdir2; cp TEST-panel-servable.ipynb subdir1/servable1.ipynb; cp TEST-panel-servable.ipynb subdir1/subdir2/servable2.ipynb; cp TEST-panel-servable.ipynb TEST-panel-servable-Copy.ipynb; chown jenkins:jenkins -R . +COPY binder/test-notebooks /notebooks + +RUN mkdir -p subdir1/subdir2; cp TEST-panel-servable.ipynb subdir1/servable1.ipynb; cp TEST-panel-servable.ipynb subdir1/subdir2/servable2.ipynb; cp TEST-panel-servable.ipynb TEST-panel-servable-Copy.ipynb + +RUN chown jenkins:jenkins -R . # RUN pip install https://github.com/Ouranosinc/xclim/archive/master.tar.gz diff --git a/binder/test-notebooks/TEST-panel-binder.ipynb b/binder/test-notebooks/TEST-panel-binder.ipynb new file mode 100644 index 00000000..284bd260 --- /dev/null +++ b/binder/test-notebooks/TEST-panel-binder.ipynb @@ -0,0 +1,85 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "d79b1053-3144-47d4-824f-49a3666d68e6", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "WARNING:bokeh.server.util:Host wildcard '*' will allow connections originating from multiple (or possibly all) hostnames or IPs. Use non-wildcard values to restrict access explicitly\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Launching server at http://localhost:5007\n" + ] + } + ], + "source": [ + "import panel as pn\n", + "srv = pn.panel(\n", + " pn.widgets.FloatInput(name='an input')\n", + ").show(port=5007, websocket_origin=\"*\")" + ] + }, + { + "cell_type": "markdown", + "id": "8f18de16-80bd-40dc-9438-ca176fc8c169", + "metadata": {}, + "source": [ + "Your current URL should look something like:\n", + "\n", + "https://hub.gke2.mybinder.org/user/ouranosinc-pavi--workflow-tests-9jerf8qk/lab/tree/TEST-panel-binder.ipynb\n", + "\n", + "Open a new browser tab, then to go to something like this URL (replace `lab/tree/TEST-panel-binder.ipynb` with `proxy/5007/`):\n", + "\n", + "https://hub.gke2.mybinder.org/user/ouranosinc-pavi--workflow-tests-9jerf8qk/proxy/5007/" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2d39a37c-8df6-4f27-9aeb-54181f35c295", + "metadata": {}, + "outputs": [], + "source": [ + "srv.stop() # To stop the server." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fb898f21-f543-40b4-8bf4-b701559b842f", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/binder/test-notebooks/TEST-panel-servable.ipynb b/binder/test-notebooks/TEST-panel-servable.ipynb new file mode 100644 index 00000000..16e5ca2a --- /dev/null +++ b/binder/test-notebooks/TEST-panel-servable.ipynb @@ -0,0 +1,36 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "7acdd82a-bc2d-443c-8fa8-e432de9cfa30", + "metadata": {}, + "outputs": [], + "source": [ + "import panel as pn\n", + "pn.panel('# Ceci est un test').servable()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From b74662d888da5fc76d345569c913d3b2a69a985c Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 26 Apr 2022 12:14:37 -0400 Subject: [PATCH 14/34] binder: test whether Panel launcher requires writable perm at current launch dir --- binder/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/binder/Dockerfile b/binder/Dockerfile index 9604888e..72514fc8 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -18,7 +18,8 @@ COPY binder/test-notebooks /notebooks RUN mkdir -p subdir1/subdir2; cp TEST-panel-servable.ipynb subdir1/servable1.ipynb; cp TEST-panel-servable.ipynb subdir1/subdir2/servable2.ipynb; cp TEST-panel-servable.ipynb TEST-panel-servable-Copy.ipynb -RUN chown jenkins:jenkins -R . +# test whether Panel launcher requires writable perm at current launch dir +# RUN chown jenkins:jenkins -R . # RUN pip install https://github.com/Ouranosinc/xclim/archive/master.tar.gz From 115798173dae1b2c800b0c66ad88d80def502463 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 26 Apr 2022 13:53:39 -0400 Subject: [PATCH 15/34] binder: confirmed Panel launcher do not need writable perm at current launch dir --- binder/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/binder/Dockerfile b/binder/Dockerfile index 72514fc8..9604888e 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -18,8 +18,7 @@ COPY binder/test-notebooks /notebooks RUN mkdir -p subdir1/subdir2; cp TEST-panel-servable.ipynb subdir1/servable1.ipynb; cp TEST-panel-servable.ipynb subdir1/subdir2/servable2.ipynb; cp TEST-panel-servable.ipynb TEST-panel-servable-Copy.ipynb -# test whether Panel launcher requires writable perm at current launch dir -# RUN chown jenkins:jenkins -R . +RUN chown jenkins:jenkins -R . # RUN pip install https://github.com/Ouranosinc/xclim/archive/master.tar.gz From 4a3f00a8b443490e2a200aa920433490dfbdf4f4 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 26 Apr 2022 19:49:32 -0400 Subject: [PATCH 16/34] binder: try to fix conda install on cli ``` ! conda install -c pyviz/label/dev jupyter-panel-proxy Collecting package metadata (current_repodata.json): failed NotWritableError: The current user does not have write permissions to a required path. path: /opt/conda/pkgs/cache/37adb69c.json uid: 1000 gid: 1000 If you feel that permissions on this path are set incorrectly, you can manually change them by executing $ sudo chown 1000:1000 /opt/conda/pkgs/cache/37adb69c.json In general, it's not advisable to use 'sudo conda'. ``` --- binder/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/binder/Dockerfile b/binder/Dockerfile index 9604888e..4c5d552e 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -20,6 +20,8 @@ RUN mkdir -p subdir1/subdir2; cp TEST-panel-servable.ipynb subdir1/servable1.ipy RUN chown jenkins:jenkins -R . +RUN chmod a+rwX -R /opt/conda/pkgs/cache/ + # RUN pip install https://github.com/Ouranosinc/xclim/archive/master.tar.gz USER jenkins From 5219e06e7845c4c69dc008132d17f7360cebb03c Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 26 Apr 2022 20:00:51 -0400 Subject: [PATCH 17/34] binder: get latest jupyter-panel-proxy, the current one is 2 years old --- binder/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/binder/Dockerfile b/binder/Dockerfile index 4c5d552e..8ce31a90 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -25,3 +25,5 @@ RUN chmod a+rwX -R /opt/conda/pkgs/cache/ # RUN pip install https://github.com/Ouranosinc/xclim/archive/master.tar.gz USER jenkins + +RUN conda install -c pyviz/label/dev jupyter-panel-proxy From 6f09cd77261f2d440d6f3f405aa8b22fdf2699f5 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 26 Apr 2022 20:07:41 -0400 Subject: [PATCH 18/34] docker: fix conda install cli permission error Fix for this error: ``` ! conda install -c pyviz/label/dev jupyter-panel-proxy Collecting package metadata (current_repodata.json): failed NotWritableError: The current user does not have write permissions to a required path. path: /opt/conda/pkgs/cache/37adb69c.json uid: 1000 gid: 1000 If you feel that permissions on this path are set incorrectly, you can manually change them by executing $ sudo chown 1000:1000 /opt/conda/pkgs/cache/37adb69c.json In general, it's not advisable to use 'sudo conda'. ``` --- docker/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index be8d7056..c39c3eb8 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -96,7 +96,8 @@ RUN wget https://raw.githubusercontent.com/jupyter/docker-stacks/$DOCKER_STACKS_ chmod a+rx /usr/local/bin/start.sh /usr/local/bin/start-singleuser.sh /usr/local/bin/start-notebook.sh /usr/local/bin/fix-permissions && \ chmod a+r /etc/jupyter/jupyter_notebook_config.py && \ mkdir /notebook_dir && chown jenkins /notebook_dir && \ - chmod a+rwX -R /opt/conda/envs/birdy/fonts + chmod a+rwX -R /opt/conda/envs/birdy/fonts && \ + chmod a+rwX -R /opt/conda/pkgs/cache # For jupyter-panel-proxy launcher. ENV BOKEH_ALLOW_WS_ORIGIN "*" From e687e3ab0d59660fa4e366a945ab61150c49c197 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 26 Apr 2022 20:34:05 -0400 Subject: [PATCH 19/34] docker: get dev version of jupyter-panel-proxy, current ver 0.1.0 is almost 2 years old --- docker/environment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/environment.yml b/docker/environment.yml index b5c7c8e4..3810d6ea 100644 --- a/docker/environment.yml +++ b/docker/environment.yml @@ -5,7 +5,7 @@ channels: - cdat - bokeh - plotly # for jupyter-dash - - pyviz # for jupyter-panel-proxy + - pyviz/label/dev # for jupyter-panel-proxy - defaults dependencies: @@ -176,7 +176,7 @@ dependencies: # https://github.com/dask/dask-labextension - dask-labextension # https://github.com/holoviz/jupyter-panel-proxy - - jupyter-panel-proxy + - jupyter-panel-proxy >= 0.2.0a2 # Force newer nodejs for 'jupyter lab build' issue # https://github.com/jupyterlab/jupyterlab/issues/11726#issuecomment-998901247 # TODO: remove nodejs once all extensions move to prebuilt extensions, see comment From 4be15cc1119b24e93755052f542fed4f7b6fb572 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 26 Apr 2022 20:46:15 -0400 Subject: [PATCH 20/34] docker: fix everything executable under /opt/conda for all, wanted existing executable only --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index c39c3eb8..02ce8a47 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -17,7 +17,7 @@ RUN apt-get update && \ # Change /opt/conda folder permissions for jupyter-conda extension. RUN groupadd --gid 1000 jenkins \ && useradd --uid 1000 --gid jenkins --create-home jenkins && \ - chmod -R a+rwx /opt/conda + chmod -R a+rwX /opt/conda COPY environment.yml /environment.yml From cce6c9d84cabe654d499eb63777874ac6fcb0b8d Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 26 Apr 2022 21:11:06 -0400 Subject: [PATCH 21/34] release: update to use image pavics/workflow-tests:220426 --- Jenkinsfile | 2 +- binder/Dockerfile | 2 +- launchcontainer | 2 +- launchnotebook | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0e9bd16d..ba96d27c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { // https://jenkins.io/doc/book/pipeline/syntax/ agent { docker { - image "pavics/workflow-tests:220422" + image "pavics/workflow-tests:220426" label 'linux && docker' } } diff --git a/binder/Dockerfile b/binder/Dockerfile index f22371db..93f9dbe3 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -1,4 +1,4 @@ -FROM pavics/workflow-tests:220422 +FROM pavics/workflow-tests:220426 USER root diff --git a/launchcontainer b/launchcontainer index 4bd40605..4355cbeb 100755 --- a/launchcontainer +++ b/launchcontainer @@ -1,7 +1,7 @@ #!/bin/sh -x if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220422" + DOCKER_IMAGE="pavics/workflow-tests:220426" fi if [ -z "$CONTAINER_NAME" ]; then diff --git a/launchnotebook b/launchnotebook index c368eebe..9724b9ed 100755 --- a/launchnotebook +++ b/launchnotebook @@ -7,7 +7,7 @@ if [ -z "$PORT" ]; then fi if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220422" + DOCKER_IMAGE="pavics/workflow-tests:220426" fi if [ -z "$CONTAINER_NAME" ]; then From 79552ea69677f29d0ca8b647d4c2f72f8d14caff Mon Sep 17 00:00:00 2001 From: Long Vu Date: Tue, 26 Apr 2022 21:43:06 -0400 Subject: [PATCH 22/34] binder: new base image has the steps already integrated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The conda install step did not work, error below: ``` Step 10/13 : RUN conda install -c pyviz/label/dev jupyter-panel-proxy ---> Running in 3bf123abf1a8 Collecting package metadata (current_repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve. Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): ...working... done Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve. Examining @/linux-64::__linux==5.4.170=0: 17%|█▋ | 1/6 [00:00<00:00, 3591.01it/Examining @/linux-64::__glibc==2.31=0: 33%|███▎ | 2/6 [00:00<00:00, 4232.40it/s] Examining @/linux-64::__archspec==1=x86_64: 83%|████████▎ | 5/6 [00:00<00:00, 38.59it/ Examining conflict for jupyter-panel-proxy python: 17%|█▋ | 1/6 [00:00<00:00, 9 Found conflicts! Looking for incompatible packages. ``` --- binder/Dockerfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/binder/Dockerfile b/binder/Dockerfile index 0bba5f8d..5ff5419c 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -12,18 +12,12 @@ WORKDIR /notebooks #RUN ./downloadrepos; DEPLOY_PAVICS_LANDING_NB=1 ./reorg-notebooks; rm -rfv downloadrepos default_build_params reorg-notebooks; chown -R jenkins:jenkins . -ENV BOKEH_ALLOW_WS_ORIGIN "*" - COPY binder/test-notebooks /notebooks RUN mkdir -p subdir1/subdir2; cp TEST-panel-servable.ipynb subdir1/servable1.ipynb; cp TEST-panel-servable.ipynb subdir1/subdir2/servable2.ipynb; cp TEST-panel-servable.ipynb TEST-panel-servable-Copy.ipynb RUN chown jenkins:jenkins -R . -RUN chmod a+rwX -R /opt/conda/pkgs/cache/ - # RUN pip install https://github.com/Ouranosinc/xclim/archive/master.tar.gz USER jenkins - -RUN conda install -c pyviz/label/dev jupyter-panel-proxy From 6c65cb30117d55d345685bfb8322e2dbf53beacd Mon Sep 17 00:00:00 2001 From: Long Vu Date: Wed, 27 Apr 2022 08:41:27 -0400 Subject: [PATCH 23/34] docker: use devel version of panel to hopefully fix Panel preview problem See comment https://github.com/holoviz/panel/issues/3440#issuecomment-1110682452 To hopefully fix this error: ``` ServerApp - ERROR - Uncaught exception GET /panel-preview/render/workdir/PAVICS-e2e-workflow-tests/binder/test-notebooks/TEST-panel-servable.ipynb (10.10.10.7) HTTPServerRequest(protocol='http', host='lvu.ouranos.ca:8890', method='GET', uri='/panel-preview/render/workdir/PAVICS-e2e-workflow-tests/binder/test-notebooks/TEST-panel-servable.ipynb', version='HTTP/1.1', remote_ip='10.10.10.7') Traceback (most recent call last): File "/opt/conda/envs/birdy/lib/python3.8/site-packages/tornado/web.py", line 1704, in _execute result = await result File "/opt/conda/envs/birdy/lib/python3.8/site-packages/panel/io/jupyter_server_extension.py", line 116, in get page = server_html_page_for_session( File "/opt/conda/envs/birdy/lib/python3.8/site-packages/bokeh/embed/server.py", line 255, in server_html_page_for_session bundle = bundle_for_objs_and_resources(None, resources) File "/opt/conda/envs/birdy/lib/python3.8/site-packages/bokeh/embed/bundle.py", line 211, in bundle_for_objs_and_resources js_files.extend(js_resources.js_files) File "/opt/conda/envs/birdy/lib/python3.8/site-packages/panel/io/resources.py", line 299, in js_files dist_dir = self.dist_dir File "/opt/conda/envs/birdy/lib/python3.8/site-packages/panel/io/resources.py", line 259, in dist_dir if self.absolute: AttributeError: 'Resources' object has no attribute 'absolute' ``` --- docker/environment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/environment.yml b/docker/environment.yml index 3810d6ea..b1691414 100644 --- a/docker/environment.yml +++ b/docker/environment.yml @@ -5,7 +5,7 @@ channels: - cdat - bokeh - plotly # for jupyter-dash - - pyviz/label/dev # for jupyter-panel-proxy + - pyviz/label/dev # for jupyter-panel-proxy, panel - defaults dependencies: @@ -58,7 +58,7 @@ dependencies: - jupyter_bokeh - pscript - h5netcdf - - panel + - panel >= 0.13.1a2 # https://github.com/holoviz/panel - pyviz_comms # (was labextension pyviz/jupyterlab_pyviz in jupyterlab v2) - holoviews From dc6745158f589360573ac7f48db1f207fe30e5ea Mon Sep 17 00:00:00 2001 From: Long Vu Date: Wed, 27 Apr 2022 08:43:52 -0400 Subject: [PATCH 24/34] release: update to use image pavics/workflow-tests:220427 --- Jenkinsfile | 2 +- binder/Dockerfile | 2 +- launchcontainer | 2 +- launchnotebook | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ba96d27c..ea263990 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { // https://jenkins.io/doc/book/pipeline/syntax/ agent { docker { - image "pavics/workflow-tests:220426" + image "pavics/workflow-tests:220427" label 'linux && docker' } } diff --git a/binder/Dockerfile b/binder/Dockerfile index 93f9dbe3..cbb0a285 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -1,4 +1,4 @@ -FROM pavics/workflow-tests:220426 +FROM pavics/workflow-tests:220427 USER root diff --git a/launchcontainer b/launchcontainer index 4355cbeb..425706c2 100755 --- a/launchcontainer +++ b/launchcontainer @@ -1,7 +1,7 @@ #!/bin/sh -x if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220426" + DOCKER_IMAGE="pavics/workflow-tests:220427" fi if [ -z "$CONTAINER_NAME" ]; then diff --git a/launchnotebook b/launchnotebook index 9724b9ed..4c9a8af8 100755 --- a/launchnotebook +++ b/launchnotebook @@ -7,7 +7,7 @@ if [ -z "$PORT" ]; then fi if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220426" + DOCKER_IMAGE="pavics/workflow-tests:220427" fi if [ -z "$CONTAINER_NAME" ]; then From 38cce4533dc40e06b465323de5f0d99cbd8e1ea5 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Wed, 27 Apr 2022 19:22:34 -0400 Subject: [PATCH 25/34] docker: manual force newer clisops, mamba somehow choose an older ver --- docker/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/environment.yml b/docker/environment.yml index b1691414..c5de4da1 100644 --- a/docker/environment.yml +++ b/docker/environment.yml @@ -120,7 +120,7 @@ dependencies: # warnings.warn(f'Downloading: {url}', DownloadWarning) - shapely <= 1.7.1 # https://github.com/roocs/clisops - - clisops >= 0.8.0 + - clisops >= 0.9.0 # Universal Regridder for Geospatial Data # https://github.com/pangeo-data/xESMF # xesmf-0.6.2 requires clisops>=0.8.0 From 2c9c67fb0005162f9bd1746466029aaea230a543 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Thu, 28 Apr 2022 00:13:11 -0400 Subject: [PATCH 26/34] docker: unpin cf_xarray for clisops 0.9.0 need cf_xarray >= 0.7.0 Previous docker build error: ``` Encountered problems while solving: - package clisops-0.9.0-pyh6c4a22f_0 requires cf_xarray >=0.7.0, but none of the providers can be installed ``` cf_xarray was previously pinned because of climex.ipynb (not WPS_example.ipynb, my mistake reading the Jenkins output) performance but it was already happening before the pin so cf_xarray might not be the real culprit. See issue about cf_xarray pinning here https://github.com/Ouranosinc/PAVICS-e2e-workflow-tests/issues/100 --- docker/environment.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/docker/environment.yml b/docker/environment.yml index c5de4da1..6d28b2cb 100644 --- a/docker/environment.yml +++ b/docker/environment.yml @@ -28,9 +28,6 @@ dependencies: - dask <= 2022.1.0 - distributed <= 2022.1.0 - # Pin cf_xarray for slow WPS_example.ipynb. - - cf_xarray<=0.6.3 - - matplotlib # - xarray # from xclim and ravenpy # - numpy # from xclim and ravenpy From 856a871146fa224eb5ee911e8919008f44dc593c Mon Sep 17 00:00:00 2001 From: Long Vu Date: Thu, 28 Apr 2022 10:31:39 -0400 Subject: [PATCH 27/34] release: update to use image pavics/workflow-tests:220428 --- Jenkinsfile | 2 +- binder/Dockerfile | 2 +- launchcontainer | 2 +- launchnotebook | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ea263990..fa3f1fa7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { // https://jenkins.io/doc/book/pipeline/syntax/ agent { docker { - image "pavics/workflow-tests:220427" + image "pavics/workflow-tests:220428" label 'linux && docker' } } diff --git a/binder/Dockerfile b/binder/Dockerfile index cbb0a285..89354ec4 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -1,4 +1,4 @@ -FROM pavics/workflow-tests:220427 +FROM pavics/workflow-tests:220428 USER root diff --git a/launchcontainer b/launchcontainer index 425706c2..4c5eb45c 100755 --- a/launchcontainer +++ b/launchcontainer @@ -1,7 +1,7 @@ #!/bin/sh -x if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220427" + DOCKER_IMAGE="pavics/workflow-tests:220428" fi if [ -z "$CONTAINER_NAME" ]; then diff --git a/launchnotebook b/launchnotebook index 4c9a8af8..0bf38a14 100755 --- a/launchnotebook +++ b/launchnotebook @@ -7,7 +7,7 @@ if [ -z "$PORT" ]; then fi if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220427" + DOCKER_IMAGE="pavics/workflow-tests:220428" fi if [ -z "$CONTAINER_NAME" ]; then From 4e94f42b922588729765bbf703ea5ac8259446c9 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Thu, 28 Apr 2022 12:09:08 -0400 Subject: [PATCH 28/34] docker: remove handcals as it seems to interfere with Panel preview button See comment https://github.com/holoviz/panel/issues/3440#issuecomment-1112182170 --- docker/environment.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/environment.yml b/docker/environment.yml index 6d28b2cb..ce0d4d37 100644 --- a/docker/environment.yml +++ b/docker/environment.yml @@ -201,7 +201,9 @@ dependencies: # Mimics how one might format their calculation if it were written with a # pencil: write the symbolic formula, followed by numeric substitutions, # and then the result. - - handcalcs + # DISABLE handcalcs, interfere with "Panel preview" button + # See comment https://github.com/holoviz/panel/issues/3440#issuecomment-1112182170 + # - handcalcs # https://github.com/ShopRunner/jupyter-notify # Jupyter Magic For Browser Notifications of Cell Completion. - jupyternotify From 864b73595cbd0902843a50d82ec2ec642743b5ed Mon Sep 17 00:00:00 2001 From: Long Vu Date: Thu, 28 Apr 2022 12:10:07 -0400 Subject: [PATCH 29/34] release: update to use image pavics/workflow-tests:220428.1 --- Jenkinsfile | 2 +- binder/Dockerfile | 2 +- launchcontainer | 2 +- launchnotebook | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fa3f1fa7..bcff725a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { // https://jenkins.io/doc/book/pipeline/syntax/ agent { docker { - image "pavics/workflow-tests:220428" + image "pavics/workflow-tests:220428.1" label 'linux && docker' } } diff --git a/binder/Dockerfile b/binder/Dockerfile index 89354ec4..ebe31d15 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -1,4 +1,4 @@ -FROM pavics/workflow-tests:220428 +FROM pavics/workflow-tests:220428.1 USER root diff --git a/launchcontainer b/launchcontainer index 4c5eb45c..488ea3b7 100755 --- a/launchcontainer +++ b/launchcontainer @@ -1,7 +1,7 @@ #!/bin/sh -x if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220428" + DOCKER_IMAGE="pavics/workflow-tests:220428.1" fi if [ -z "$CONTAINER_NAME" ]; then diff --git a/launchnotebook b/launchnotebook index 0bf38a14..a3dcc0f9 100755 --- a/launchnotebook +++ b/launchnotebook @@ -7,7 +7,7 @@ if [ -z "$PORT" ]; then fi if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220428" + DOCKER_IMAGE="pavics/workflow-tests:220428.1" fi if [ -z "$CONTAINER_NAME" ]; then From 7011c86bbbbb4b1814a1ce39445f6eeae217bdeb Mon Sep 17 00:00:00 2001 From: Long Vu Date: Mon, 2 May 2022 23:40:58 -0400 Subject: [PATCH 30/34] docker: patch Panel for 'Render with Panel' button regression fix Remove this patch once a Panel release contain this PR https://github.com/holoviz/panel/pull/3469 --- docker/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 02ce8a47..e20183e5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -106,6 +106,11 @@ ENV BOKEH_ALLOW_WS_ORIGIN "*" # the jupyter/base-notebook image also do not default to root user so we do the same here USER jenkins +# Patch Panel for "Render with Panel" button regression fix +# TODO remove this patch once a Panel release contain this PR https://github.com/holoviz/panel/pull/3469. +RUN wget https://raw.githubusercontent.com/tlvu/panel/ac8d6fb3efdfb66315af1107070a6c67affaebc8/panel/io/jupyter_server_extension.py \ + -O /opt/conda/envs/birdy/lib/python3.8/site-packages/panel/io/jupyter_server_extension.py + # follow jupyter/base-notebook image so config in jupyterhub is simpler # start notebook in conda environment to have working jupyter extensions CMD ["conda", "run", "-n", "birdy", "/usr/local/bin/start-notebook.sh"] From 9f1863c34283c6b8f3c45a5bd8da6573468400b8 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Mon, 2 May 2022 23:42:27 -0400 Subject: [PATCH 31/34] release: update to use image pavics/workflow-tests:220502 --- Jenkinsfile | 2 +- binder/Dockerfile | 2 +- launchcontainer | 2 +- launchnotebook | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index bcff725a..29db25ed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { // https://jenkins.io/doc/book/pipeline/syntax/ agent { docker { - image "pavics/workflow-tests:220428.1" + image "pavics/workflow-tests:220502" label 'linux && docker' } } diff --git a/binder/Dockerfile b/binder/Dockerfile index ebe31d15..cbb38419 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -1,4 +1,4 @@ -FROM pavics/workflow-tests:220428.1 +FROM pavics/workflow-tests:220502 USER root diff --git a/launchcontainer b/launchcontainer index 488ea3b7..d074153e 100755 --- a/launchcontainer +++ b/launchcontainer @@ -1,7 +1,7 @@ #!/bin/sh -x if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220428.1" + DOCKER_IMAGE="pavics/workflow-tests:220502" fi if [ -z "$CONTAINER_NAME" ]; then diff --git a/launchnotebook b/launchnotebook index a3dcc0f9..f8a1b445 100755 --- a/launchnotebook +++ b/launchnotebook @@ -7,7 +7,7 @@ if [ -z "$PORT" ]; then fi if [ -z "$DOCKER_IMAGE" ]; then - DOCKER_IMAGE="pavics/workflow-tests:220428.1" + DOCKER_IMAGE="pavics/workflow-tests:220502" fi if [ -z "$CONTAINER_NAME" ]; then From e42ad29cc9dcfcd7d59e0e8f529c280c7062ec7a Mon Sep 17 00:00:00 2001 From: Long Vu Date: Wed, 4 May 2022 13:24:26 -0400 Subject: [PATCH 32/34] binder: undo temporary changes for testing Holoviz Panel --- binder/Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/binder/Dockerfile b/binder/Dockerfile index 8a9c42fd..9ac81ef9 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -2,21 +2,21 @@ FROM pavics/workflow-tests:220502 USER root -#COPY notebooks /notebooks +COPY notebooks /notebooks -#COPY default_build_params /notebooks -#COPY downloadrepos /notebooks -#COPY binder/reorg-notebooks /notebooks +COPY default_build_params /notebooks +COPY downloadrepos /notebooks +COPY binder/reorg-notebooks /notebooks WORKDIR /notebooks -#RUN ./downloadrepos; DEPLOY_PAVICS_LANDING_NB=1 ./reorg-notebooks; rm -rfv downloadrepos default_build_params reorg-notebooks; chown -R jenkins:jenkins . +RUN ./downloadrepos; DEPLOY_PAVICS_LANDING_NB=1 ./reorg-notebooks; rm -rfv downloadrepos default_build_params reorg-notebooks; chown -R jenkins:jenkins . -COPY binder/test-notebooks /notebooks +#COPY binder/test-notebooks /notebooks -RUN mkdir -p subdir1/subdir2; cp TEST-panel-servable.ipynb subdir1/servable1.ipynb; cp TEST-panel-servable.ipynb subdir1/subdir2/servable2.ipynb; cp TEST-panel-servable.ipynb TEST-panel-servable-Copy.ipynb +#RUN mkdir -p subdir1/subdir2; cp TEST-panel-servable.ipynb subdir1/servable1.ipynb; cp TEST-panel-servable.ipynb subdir1/subdir2/servable2.ipynb; cp TEST-panel-servable.ipynb TEST-panel-servable-Copy.ipynb -RUN chown jenkins:jenkins -R . +#RUN chown jenkins:jenkins -R . # RUN pip install https://github.com/Ouranosinc/xclim/archive/master.tar.gz From c0a31579bfbb4720159d48229d7d0d7d0608f3a1 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Wed, 4 May 2022 14:31:07 -0400 Subject: [PATCH 33/34] docker: remove Holoviz Panel patch, new dev release v0.13.1a3 contains it --- docker/Dockerfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index e20183e5..02ce8a47 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -106,11 +106,6 @@ ENV BOKEH_ALLOW_WS_ORIGIN "*" # the jupyter/base-notebook image also do not default to root user so we do the same here USER jenkins -# Patch Panel for "Render with Panel" button regression fix -# TODO remove this patch once a Panel release contain this PR https://github.com/holoviz/panel/pull/3469. -RUN wget https://raw.githubusercontent.com/tlvu/panel/ac8d6fb3efdfb66315af1107070a6c67affaebc8/panel/io/jupyter_server_extension.py \ - -O /opt/conda/envs/birdy/lib/python3.8/site-packages/panel/io/jupyter_server_extension.py - # follow jupyter/base-notebook image so config in jupyterhub is simpler # start notebook in conda environment to have working jupyter extensions CMD ["conda", "run", "-n", "birdy", "/usr/local/bin/start-notebook.sh"] From 0977f44a2b88065429b2b55a21890f3a90eb3ad6 Mon Sep 17 00:00:00 2001 From: Long Vu Date: Wed, 4 May 2022 15:00:04 -0400 Subject: [PATCH 34/34] docker: bump panel to devel ver 0.13.1a3 for 'Render with Panel' button fix --- docker/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/environment.yml b/docker/environment.yml index ce0d4d37..0b342762 100644 --- a/docker/environment.yml +++ b/docker/environment.yml @@ -55,7 +55,7 @@ dependencies: - jupyter_bokeh - pscript - h5netcdf - - panel >= 0.13.1a2 + - panel >= 0.13.1a3 # https://github.com/holoviz/panel - pyviz_comms # (was labextension pyviz/jupyterlab_pyviz in jupyterlab v2) - holoviews