From 39689d53ebe0cc9f1cf89bf9999883d1979cccf9 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 15:35:32 -0300 Subject: [PATCH 01/36] rollback to code-server installation --- qhub/template/image/jupyterlab/environment.yaml | 3 --- qhub/template/image/jupyterlab/postBuild | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index 6611c4d3c..af2b89917 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -48,9 +48,6 @@ dependencies: - isort - importnb - # vscode - - code-server >= 3.2 - - pip: # vscode jupyterlab launcher - git+https://github.com/betatim/vscode-binder diff --git a/qhub/template/image/jupyterlab/postBuild b/qhub/template/image/jupyterlab/postBuild index 34f7ad1fb..d129631f2 100755 --- a/qhub/template/image/jupyterlab/postBuild +++ b/qhub/template/image/jupyterlab/postBuild @@ -5,6 +5,22 @@ set -x # install classic notebook extensions jupyter nbextension enable --py widgetsnbextension --sys-prefix +# ====== code-server install/config +mkdir -p /opt/code_server +cd /opt/code_server +# Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing +curl -fsSL https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh > install.sh +expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253 + +if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then + echo Unexpected hash from code-server install script + exit 1 +fi +sh install.sh --prefix /opt/code_server + +# === fix permissions === +fix-permissions /opt/code_server + # if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise # it substitutes the string x. This allows us to check if the variable # is set without triggering an unbound variable error From 67a85883b97e0f2084010b9d1d4b03d48cf17bef Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 16:06:12 -0300 Subject: [PATCH 02/36] test if build passes --- qhub/template/image/jupyterlab/environment.yaml | 1 - qhub/template/image/jupyterlab/postBuild | 16 ---------------- 2 files changed, 17 deletions(-) diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index af2b89917..8edc71a26 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -50,5 +50,4 @@ dependencies: - pip: # vscode jupyterlab launcher - - git+https://github.com/betatim/vscode-binder - git+https://github.com/dask/dask-labextension.git@fc8de03447778e0605d0abafa3d3135f9e49e0d6 diff --git a/qhub/template/image/jupyterlab/postBuild b/qhub/template/image/jupyterlab/postBuild index d129631f2..34f7ad1fb 100755 --- a/qhub/template/image/jupyterlab/postBuild +++ b/qhub/template/image/jupyterlab/postBuild @@ -5,22 +5,6 @@ set -x # install classic notebook extensions jupyter nbextension enable --py widgetsnbextension --sys-prefix -# ====== code-server install/config -mkdir -p /opt/code_server -cd /opt/code_server -# Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing -curl -fsSL https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh > install.sh -expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253 - -if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then - echo Unexpected hash from code-server install script - exit 1 -fi -sh install.sh --prefix /opt/code_server - -# === fix permissions === -fix-permissions /opt/code_server - # if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise # it substitutes the string x. This allows us to check if the variable # is set without triggering an unbound variable error From efed55fdd8ef7fd2eaed53698b182d1deaf90b2f Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 16:16:09 -0300 Subject: [PATCH 03/36] bump dask-labextension to fix CI --- qhub/template/image/jupyterlab/environment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index 8edc71a26..3dc3792a4 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -50,4 +50,4 @@ dependencies: - pip: # vscode jupyterlab launcher - - git+https://github.com/dask/dask-labextension.git@fc8de03447778e0605d0abafa3d3135f9e49e0d6 + - dask-labextension==5.3.0 From 7b124bea633bd33f5cf2a56d6801803bb6f89570 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 16:33:56 -0300 Subject: [PATCH 04/36] update image again test CI --- qhub/template/image/jupyterlab/environment.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index 3dc3792a4..23e32679f 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -48,6 +48,10 @@ dependencies: - isort - importnb + # vscode +# - code-server >= 3.2 + - pip: # vscode jupyterlab launcher - - dask-labextension==5.3.0 + # - git+https://github.com/betatim/vscode-binder + - git+https://github.com/dask/dask-labextension.git@fc8de03447778e0605d0abafa3d3135f9e49e0d6 From c0fd620c569e1d22316aa7a49d3c3b224c8e0d93 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 16:43:12 -0300 Subject: [PATCH 05/36] update image again test CI --- qhub/template/image/jupyterlab/environment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index 23e32679f..b6f566be8 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -53,5 +53,5 @@ dependencies: - pip: # vscode jupyterlab launcher - # - git+https://github.com/betatim/vscode-binder - - git+https://github.com/dask/dask-labextension.git@fc8de03447778e0605d0abafa3d3135f9e49e0d6 + - git+https://github.com/betatim/vscode-binder + - dask-labextension==5.3.0 From 90ee8a7292fb380626c3f11efed2b1a627c8f66d Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 16:52:40 -0300 Subject: [PATCH 06/36] rollback to code-server installation --- qhub/template/image/jupyterlab/environment.yaml | 3 --- qhub/template/image/jupyterlab/postBuild | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index b6f566be8..b0b7b0219 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -48,9 +48,6 @@ dependencies: - isort - importnb - # vscode -# - code-server >= 3.2 - - pip: # vscode jupyterlab launcher - git+https://github.com/betatim/vscode-binder diff --git a/qhub/template/image/jupyterlab/postBuild b/qhub/template/image/jupyterlab/postBuild index 34f7ad1fb..d129631f2 100755 --- a/qhub/template/image/jupyterlab/postBuild +++ b/qhub/template/image/jupyterlab/postBuild @@ -5,6 +5,22 @@ set -x # install classic notebook extensions jupyter nbextension enable --py widgetsnbextension --sys-prefix +# ====== code-server install/config +mkdir -p /opt/code_server +cd /opt/code_server +# Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing +curl -fsSL https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh > install.sh +expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253 + +if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then + echo Unexpected hash from code-server install script + exit 1 +fi +sh install.sh --prefix /opt/code_server + +# === fix permissions === +fix-permissions /opt/code_server + # if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise # it substitutes the string x. This allows us to check if the variable # is set without triggering an unbound variable error From edd8c03644a0ed680dabe4aeecd30c96da71695c Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 19:04:14 -0300 Subject: [PATCH 07/36] rollback dask-lab version --- qhub/template/image/jupyterlab/environment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index b0b7b0219..1bc69ebda 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -51,4 +51,4 @@ dependencies: - pip: # vscode jupyterlab launcher - git+https://github.com/betatim/vscode-binder - - dask-labextension==5.3.0 + - git+https://github.com/dask/dask-labextension.git@01bf0418c20d1940160ba2fe459fb7444d48c195 From 2c9eaa43989c3de4404c5016065efbfd3d3fb3d7 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 19:24:34 -0300 Subject: [PATCH 08/36] install extension from conda --- qhub/template/image/jupyterlab/environment.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index 1bc69ebda..6c785f962 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -19,7 +19,7 @@ dependencies: - retrolab # jupyterlab extensions -# - dask_labextension >=5.0.0 + - dask_labextension == 5.3.0 - jupyterlab-git >=0.30.0 - sidecar >=0.5.0 - jupyter-videochat >=0.5.0 @@ -51,4 +51,3 @@ dependencies: - pip: # vscode jupyterlab launcher - git+https://github.com/betatim/vscode-binder - - git+https://github.com/dask/dask-labextension.git@01bf0418c20d1940160ba2fe459fb7444d48c195 From 614477266e7ee32bf5948fe1b59ac064f267223b Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 20:22:36 -0300 Subject: [PATCH 09/36] change install location to use local env --- qhub/template/image/jupyterlab/postBuild | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/qhub/template/image/jupyterlab/postBuild b/qhub/template/image/jupyterlab/postBuild index d129631f2..f32a145fd 100755 --- a/qhub/template/image/jupyterlab/postBuild +++ b/qhub/template/image/jupyterlab/postBuild @@ -16,10 +16,7 @@ if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then echo Unexpected hash from code-server install script exit 1 fi -sh install.sh --prefix /opt/code_server - -# === fix permissions === -fix-permissions /opt/code_server +sh install.sh --prefix "/opt/conda/envs/${DEFAULT_ENV}/shared/code-server" # if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise # it substitutes the string x. This allows us to check if the variable From ad49fa606075bab945709b17e8a56928469a7bd0 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 20:51:51 -0300 Subject: [PATCH 10/36] change install location to use local env --- qhub/template/image/jupyterlab/postBuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qhub/template/image/jupyterlab/postBuild b/qhub/template/image/jupyterlab/postBuild index f32a145fd..495e51435 100755 --- a/qhub/template/image/jupyterlab/postBuild +++ b/qhub/template/image/jupyterlab/postBuild @@ -16,7 +16,7 @@ if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then echo Unexpected hash from code-server install script exit 1 fi -sh install.sh --prefix "/opt/conda/envs/${DEFAULT_ENV}/shared/code-server" +sh install.sh --prefix "/opt/conda/envs/${DEFAULT_ENV}/share/code-server" # if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise # it substitutes the string x. This allows us to check if the variable From 1635bd350441a918c1fc9314b0cf1027f1607f1d Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 21:35:11 -0300 Subject: [PATCH 11/36] change install location to use local env --- .../image/jupyterlab/environment.yaml | 3 --- qhub/template/image/jupyterlab/postBuild | 12 +----------- .../image/scripts/install-code-server.sh | 19 +++++++++++++++++++ 3 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 qhub/template/image/scripts/install-code-server.sh diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index 6c785f962..c4ba71c4b 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -48,6 +48,3 @@ dependencies: - isort - importnb - - pip: - # vscode jupyterlab launcher - - git+https://github.com/betatim/vscode-binder diff --git a/qhub/template/image/jupyterlab/postBuild b/qhub/template/image/jupyterlab/postBuild index 495e51435..2b5aaaa78 100755 --- a/qhub/template/image/jupyterlab/postBuild +++ b/qhub/template/image/jupyterlab/postBuild @@ -6,17 +6,7 @@ set -x jupyter nbextension enable --py widgetsnbextension --sys-prefix # ====== code-server install/config -mkdir -p /opt/code_server -cd /opt/code_server -# Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing -curl -fsSL https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh > install.sh -expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253 - -if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then - echo Unexpected hash from code-server install script - exit 1 -fi -sh install.sh --prefix "/opt/conda/envs/${DEFAULT_ENV}/share/code-server" +../scripts/install-code-server.sh # if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise # it substitutes the string x. This allows us to check if the variable diff --git a/qhub/template/image/scripts/install-code-server.sh b/qhub/template/image/scripts/install-code-server.sh new file mode 100644 index 000000000..0dbdfda0c --- /dev/null +++ b/qhub/template/image/scripts/install-code-server.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -xe + +mkdir -p /opt/conda/envs/${DEFAULT_ENV}/share/code-server +cd /opt/conda/envs/${DEFAULT_ENV}/share/code-server + +# Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing +curl -fsSL https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh > install.sh +expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253 + +if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then + echo Unexpected hash from code-server install script + exit 1 +fi + +sh install.sh --prefix "/opt/conda/envs/${DEFAULT_ENV}/share/code-server" + +# Install the VS code proxy +pip install git+https://github.com/betatim/vscode-binder \ No newline at end of file From c27899f8046a595f3ba2a9bdb8d2c023107e9bca Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 22:29:52 -0300 Subject: [PATCH 12/36] change install location to use local env --- qhub/template/image/Dockerfile.jupyterlab | 3 +++ qhub/template/image/jupyterlab/postBuild | 4 ++-- qhub/template/image/scripts/install-code-server.sh | 9 +++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/qhub/template/image/Dockerfile.jupyterlab b/qhub/template/image/Dockerfile.jupyterlab index 159229711..3d16481c0 100644 --- a/qhub/template/image/Dockerfile.jupyterlab +++ b/qhub/template/image/Dockerfile.jupyterlab @@ -44,6 +44,9 @@ RUN \ fi ; \ /opt/scripts/install-conda-environment.sh "${ENV_FILE}" 'true' +# ========== code-server install ============ +COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh + COPY jupyterlab /opt/jupyterlab RUN /opt/jupyterlab/postBuild diff --git a/qhub/template/image/jupyterlab/postBuild b/qhub/template/image/jupyterlab/postBuild index 2b5aaaa78..fb1f110c0 100755 --- a/qhub/template/image/jupyterlab/postBuild +++ b/qhub/template/image/jupyterlab/postBuild @@ -5,8 +5,8 @@ set -x # install classic notebook extensions jupyter nbextension enable --py widgetsnbextension --sys-prefix -# ====== code-server install/config -../scripts/install-code-server.sh +# install code-server extension +sh /opt/scripts/install-code-server.sh "/opt/conda/envs/${DEFAULT_ENV}" # if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise # it substitutes the string x. This allows us to check if the variable diff --git a/qhub/template/image/scripts/install-code-server.sh b/qhub/template/image/scripts/install-code-server.sh index 0dbdfda0c..76637c796 100644 --- a/qhub/template/image/scripts/install-code-server.sh +++ b/qhub/template/image/scripts/install-code-server.sh @@ -1,11 +1,12 @@ #!/usr/bin/env bash set -xe +DEFAULT_PREFIX="${1}"; shift # path to environment yaml or lock file -mkdir -p /opt/conda/envs/${DEFAULT_ENV}/share/code-server -cd /opt/conda/envs/${DEFAULT_ENV}/share/code-server +mkdir -p ${DEFAULT_PREFIX}/share/code-server +cd ${DEFAULT_PREFIX}/share/code-server # Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing -curl -fsSL https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh > install.sh +wget --quiet https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253 if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then @@ -13,7 +14,7 @@ if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then exit 1 fi -sh install.sh --prefix "/opt/conda/envs/${DEFAULT_ENV}/share/code-server" +sh ./install.sh --prefix ${DEFAULT_PREFIX}/share/code-server # Install the VS code proxy pip install git+https://github.com/betatim/vscode-binder \ No newline at end of file From 93c24efcaabf77540ab04e5a1bbb8beb7508bdfd Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 23:24:59 -0300 Subject: [PATCH 13/36] Update script installation --- .../image/scripts/install-code-server.sh | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/qhub/template/image/scripts/install-code-server.sh b/qhub/template/image/scripts/install-code-server.sh index 76637c796..f13a1b0e7 100644 --- a/qhub/template/image/scripts/install-code-server.sh +++ b/qhub/template/image/scripts/install-code-server.sh @@ -14,7 +14,28 @@ if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then exit 1 fi -sh ./install.sh --prefix ${DEFAULT_PREFIX}/share/code-server +export VSCODE_EXTENSIONS="~/.local/share/code-server/extensions" + +sh ./install.sh --method standalone --prefix ${DEFAULT_PREFIX}/share/code-server + +export PATH="${DEFAULT_PREFIX}/share/code-server/bin:$PATH" + +# Directly check whether the code-server call also works inside of conda-build +code-server --help + +# Remove unnecessary resources +find ${DEFAULT_PREFIX}/share/code-server -name '*.map' -delete +rm -rf \ + ${DEFAULT_PREFIX}/share/code-server/node \ + ${DEFAULT_PREFIX}/share/code-server/lib/node \ + ${DEFAULT_PREFIX}/share/code-server/lib/lib* \ + ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/vscode-sqlite3/build/Release/obj* \ + ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/vscode-sqlite3/build/Release/sqlite3.a \ + ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/vscode-sqlite3/deps \ + ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/.cache \ + ${DEFAULT_PREFIX}/share/code-server/lib/vscode/out/vs/workbench/*.map \ + ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/@coder/requirefs/coverage +find ${DEFAULT_PREFIX}/share/code-server/ -name obj.target | xargs rm -r # Install the VS code proxy -pip install git+https://github.com/betatim/vscode-binder \ No newline at end of file +pip install git+https://github.com/betatim/vscode-binder From 9cd02b8f57a5d683d77a04509b4e7eb9d292ba5d Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 23:54:04 -0300 Subject: [PATCH 14/36] Try to fix missing path --- qhub/template/image/Dockerfile.jupyterlab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qhub/template/image/Dockerfile.jupyterlab b/qhub/template/image/Dockerfile.jupyterlab index 3d16481c0..918196c66 100644 --- a/qhub/template/image/Dockerfile.jupyterlab +++ b/qhub/template/image/Dockerfile.jupyterlab @@ -20,7 +20,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # Set PATH for Dockerfile so that conda works and some useful scripts are # available. Any changes intended to propagate to runtime containers should be # set in /etc/profile.d (see setup_shell_behavior.sh) -ENV PATH=/opt/conda/envs/${DEFAULT_ENV}/bin:/opt/conda/bin:${PATH}:/opt/scripts +ENV PATH=/opt/conda/envs/${DEFAULT_ENV}/bin:/opt/conda/envs/${DEFAULT_ENV}/share/code-server/bin:$PATH:/opt/conda/bin:${PATH}:/opt/scripts # ============= base install =============== # install conda From 419fbb8ef00a79e4c720e84d8724407a23445d77 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Tue, 5 Jul 2022 23:59:54 -0300 Subject: [PATCH 15/36] Try to fix missing path --- qhub/template/image/Dockerfile.jupyterlab | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qhub/template/image/Dockerfile.jupyterlab b/qhub/template/image/Dockerfile.jupyterlab index 918196c66..9fab8d700 100644 --- a/qhub/template/image/Dockerfile.jupyterlab +++ b/qhub/template/image/Dockerfile.jupyterlab @@ -20,7 +20,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # Set PATH for Dockerfile so that conda works and some useful scripts are # available. Any changes intended to propagate to runtime containers should be # set in /etc/profile.d (see setup_shell_behavior.sh) -ENV PATH=/opt/conda/envs/${DEFAULT_ENV}/bin:/opt/conda/envs/${DEFAULT_ENV}/share/code-server/bin:$PATH:/opt/conda/bin:${PATH}:/opt/scripts +ENV PATH=/opt/conda/envs/${DEFAULT_ENV}/bin:/opt/conda/bin:${PATH}:/opt/scripts # ============= base install =============== # install conda @@ -45,6 +45,7 @@ RUN \ /opt/scripts/install-conda-environment.sh "${ENV_FILE}" 'true' # ========== code-server install ============ +ENV PATH=/opt/conda/envs/${DEFAULT_ENV}/share/code-server/bin:${PATH} COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh COPY jupyterlab /opt/jupyterlab From 0f3c5056c0f2802476a4207d45c3acf8e3cc1538 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 00:42:33 -0300 Subject: [PATCH 16/36] try something else --- qhub/template/image/Dockerfile.jupyterlab | 4 +- .../image/jupyterlab/environment.yaml | 8 ++ .../image/scripts/install-code-server.sh | 82 +++++++++---------- 3 files changed, 51 insertions(+), 43 deletions(-) diff --git a/qhub/template/image/Dockerfile.jupyterlab b/qhub/template/image/Dockerfile.jupyterlab index 9fab8d700..faebbaae8 100644 --- a/qhub/template/image/Dockerfile.jupyterlab +++ b/qhub/template/image/Dockerfile.jupyterlab @@ -45,8 +45,8 @@ RUN \ /opt/scripts/install-conda-environment.sh "${ENV_FILE}" 'true' # ========== code-server install ============ -ENV PATH=/opt/conda/envs/${DEFAULT_ENV}/share/code-server/bin:${PATH} -COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh +# ENV PATH=/opt/conda/envs/${DEFAULT_ENV}/share/code-server/bin:${PATH} +# COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh COPY jupyterlab /opt/jupyterlab RUN /opt/jupyterlab/postBuild diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index c4ba71c4b..585669c5b 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -48,3 +48,11 @@ dependencies: - isort - importnb + - code-server >= 3.2 + + - pip: + # vscode jupyterlab launcher + - git+https://github.com/betatim/vscode-binder + +variables: + CODE_EXTENSIONSDIR: '~/.local/share/code-server/extensions' diff --git a/qhub/template/image/scripts/install-code-server.sh b/qhub/template/image/scripts/install-code-server.sh index f13a1b0e7..d577b20f3 100644 --- a/qhub/template/image/scripts/install-code-server.sh +++ b/qhub/template/image/scripts/install-code-server.sh @@ -1,41 +1,41 @@ -#!/usr/bin/env bash -set -xe -DEFAULT_PREFIX="${1}"; shift # path to environment yaml or lock file - -mkdir -p ${DEFAULT_PREFIX}/share/code-server -cd ${DEFAULT_PREFIX}/share/code-server - -# Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing -wget --quiet https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh -expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253 - -if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then - echo Unexpected hash from code-server install script - exit 1 -fi - -export VSCODE_EXTENSIONS="~/.local/share/code-server/extensions" - -sh ./install.sh --method standalone --prefix ${DEFAULT_PREFIX}/share/code-server - -export PATH="${DEFAULT_PREFIX}/share/code-server/bin:$PATH" - -# Directly check whether the code-server call also works inside of conda-build -code-server --help - -# Remove unnecessary resources -find ${DEFAULT_PREFIX}/share/code-server -name '*.map' -delete -rm -rf \ - ${DEFAULT_PREFIX}/share/code-server/node \ - ${DEFAULT_PREFIX}/share/code-server/lib/node \ - ${DEFAULT_PREFIX}/share/code-server/lib/lib* \ - ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/vscode-sqlite3/build/Release/obj* \ - ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/vscode-sqlite3/build/Release/sqlite3.a \ - ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/vscode-sqlite3/deps \ - ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/.cache \ - ${DEFAULT_PREFIX}/share/code-server/lib/vscode/out/vs/workbench/*.map \ - ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/@coder/requirefs/coverage -find ${DEFAULT_PREFIX}/share/code-server/ -name obj.target | xargs rm -r - -# Install the VS code proxy -pip install git+https://github.com/betatim/vscode-binder +# #!/usr/bin/env bash +# set -xe +# DEFAULT_PREFIX="${1}"; shift # path to environment yaml or lock file + +# mkdir -p ${DEFAULT_PREFIX}/share/code-server +# cd ${DEFAULT_PREFIX}/share/code-server + +# # Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing +# wget --quiet https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh +# expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253 + +# if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then +# echo Unexpected hash from code-server install script +# exit 1 +# fi + +# export VSCODE_EXTENSIONS="~/.local/share/code-server/extensions" + +# sh ./install.sh --method standalone --prefix ${DEFAULT_PREFIX}/share/code-server + +# export PATH="${DEFAULT_PREFIX}/share/code-server/bin:$PATH" + +# # Directly check whether the code-server call also works inside of conda-build +# code-server --help + +# # Remove unnecessary resources +# find ${DEFAULT_PREFIX}/share/code-server -name '*.map' -delete +# rm -rf \ +# ${DEFAULT_PREFIX}/share/code-server/node \ +# ${DEFAULT_PREFIX}/share/code-server/lib/node \ +# ${DEFAULT_PREFIX}/share/code-server/lib/lib* \ +# ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/vscode-sqlite3/build/Release/obj* \ +# ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/vscode-sqlite3/build/Release/sqlite3.a \ +# ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/vscode-sqlite3/deps \ +# ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/.cache \ +# ${DEFAULT_PREFIX}/share/code-server/lib/vscode/out/vs/workbench/*.map \ +# ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/@coder/requirefs/coverage +# find ${DEFAULT_PREFIX}/share/code-server/ -name obj.target | xargs rm -r + +# # Install the VS code proxy +# pip install git+https://github.com/betatim/vscode-binder From 8fbcb8eec73ffd7e303da457a1c7d0ccacd3f317 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 00:48:11 -0300 Subject: [PATCH 17/36] try something else --- qhub/template/image/jupyterlab/postBuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qhub/template/image/jupyterlab/postBuild b/qhub/template/image/jupyterlab/postBuild index fb1f110c0..2bf646b6d 100755 --- a/qhub/template/image/jupyterlab/postBuild +++ b/qhub/template/image/jupyterlab/postBuild @@ -6,7 +6,7 @@ set -x jupyter nbextension enable --py widgetsnbextension --sys-prefix # install code-server extension -sh /opt/scripts/install-code-server.sh "/opt/conda/envs/${DEFAULT_ENV}" +# sh /opt/scripts/install-code-server.sh "/opt/conda/envs/${DEFAULT_ENV}" # if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise # it substitutes the string x. This allows us to check if the variable From 42e0883940046b2fbd81648fec400374e431121f Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 00:50:36 -0300 Subject: [PATCH 18/36] Trigger CI build From 6a3fdd0379bb137f568764cd5add2950ea3afaf0 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 00:52:17 -0300 Subject: [PATCH 19/36] try something else --- qhub/template/image/jupyterlab/environment.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index 585669c5b..b182425ec 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -48,6 +48,7 @@ dependencies: - isort - importnb +# vscode - code-server >= 3.2 - pip: From 7a98f42d862f525458bf14e6a2295779dfdd7007 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 09:40:17 -0300 Subject: [PATCH 20/36] Rollback to previous conda install --- qhub/template/image/jupyterlab/environment.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index b182425ec..9fcc2c7b1 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -54,6 +54,3 @@ dependencies: - pip: # vscode jupyterlab launcher - git+https://github.com/betatim/vscode-binder - -variables: - CODE_EXTENSIONSDIR: '~/.local/share/code-server/extensions' From 730feafd7b90dca514d9296267e158076d636a30 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 10:23:39 -0300 Subject: [PATCH 21/36] Use jupyter proxy instead of changing installation --- .../files/jupyter/jupyter_notebook_config.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py b/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py index 96e551a23..cadc8494d 100644 --- a/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py +++ b/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py @@ -36,3 +36,13 @@ ############################################################################### # JupyterHub idle culler total timeout corresponds (approximately) to: # max(cull_idle_timeout, cull_inactive_timeout) + shutdown_no_activity_timeout + + +c.ServerProxy.servers = { + "code-server": { + "command": [ + "--extensions-dir: ~/.local/share/code-server/extensions", + ], + "timeout": 20, + } +} From dade74d939a18e2bb82a0447359386c180cdaa80 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 10:47:12 -0300 Subject: [PATCH 22/36] Update install method --- qhub/template/image/Dockerfile.jupyterlab | 3 +- .../image/jupyterlab/environment.yaml | 7 --- qhub/template/image/jupyterlab/postBuild | 2 +- .../image/scripts/install-code-server.sh | 48 ++++++------------- 4 files changed, 16 insertions(+), 44 deletions(-) diff --git a/qhub/template/image/Dockerfile.jupyterlab b/qhub/template/image/Dockerfile.jupyterlab index faebbaae8..3d16481c0 100644 --- a/qhub/template/image/Dockerfile.jupyterlab +++ b/qhub/template/image/Dockerfile.jupyterlab @@ -45,8 +45,7 @@ RUN \ /opt/scripts/install-conda-environment.sh "${ENV_FILE}" 'true' # ========== code-server install ============ -# ENV PATH=/opt/conda/envs/${DEFAULT_ENV}/share/code-server/bin:${PATH} -# COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh +COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh COPY jupyterlab /opt/jupyterlab RUN /opt/jupyterlab/postBuild diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index 9fcc2c7b1..44a0dbdeb 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -47,10 +47,3 @@ dependencies: - black - isort - importnb - -# vscode - - code-server >= 3.2 - - - pip: - # vscode jupyterlab launcher - - git+https://github.com/betatim/vscode-binder diff --git a/qhub/template/image/jupyterlab/postBuild b/qhub/template/image/jupyterlab/postBuild index 2bf646b6d..77e3a8385 100755 --- a/qhub/template/image/jupyterlab/postBuild +++ b/qhub/template/image/jupyterlab/postBuild @@ -6,7 +6,7 @@ set -x jupyter nbextension enable --py widgetsnbextension --sys-prefix # install code-server extension -# sh /opt/scripts/install-code-server.sh "/opt/conda/envs/${DEFAULT_ENV}" +sh /opt/scripts/install-code-server.sh # if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise # it substitutes the string x. This allows us to check if the variable diff --git a/qhub/template/image/scripts/install-code-server.sh b/qhub/template/image/scripts/install-code-server.sh index d577b20f3..49b06843d 100644 --- a/qhub/template/image/scripts/install-code-server.sh +++ b/qhub/template/image/scripts/install-code-server.sh @@ -1,41 +1,21 @@ -# #!/usr/bin/env bash -# set -xe +#!/usr/bin/env bash +set -xe # DEFAULT_PREFIX="${1}"; shift # path to environment yaml or lock file -# mkdir -p ${DEFAULT_PREFIX}/share/code-server -# cd ${DEFAULT_PREFIX}/share/code-server +mkdir -p /opt/code-server +cd /opt/code-server -# # Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing -# wget --quiet https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh -# expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253 +# Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing +wget --quiet https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh +expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253 -# if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then -# echo Unexpected hash from code-server install script -# exit 1 -# fi +if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then + echo Unexpected hash from code-server install script + exit 1 +fi -# export VSCODE_EXTENSIONS="~/.local/share/code-server/extensions" +sh ./install.sh --method standalone --prefix /opt/code-server -# sh ./install.sh --method standalone --prefix ${DEFAULT_PREFIX}/share/code-server -# export PATH="${DEFAULT_PREFIX}/share/code-server/bin:$PATH" - -# # Directly check whether the code-server call also works inside of conda-build -# code-server --help - -# # Remove unnecessary resources -# find ${DEFAULT_PREFIX}/share/code-server -name '*.map' -delete -# rm -rf \ -# ${DEFAULT_PREFIX}/share/code-server/node \ -# ${DEFAULT_PREFIX}/share/code-server/lib/node \ -# ${DEFAULT_PREFIX}/share/code-server/lib/lib* \ -# ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/vscode-sqlite3/build/Release/obj* \ -# ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/vscode-sqlite3/build/Release/sqlite3.a \ -# ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/vscode-sqlite3/deps \ -# ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/.cache \ -# ${DEFAULT_PREFIX}/share/code-server/lib/vscode/out/vs/workbench/*.map \ -# ${DEFAULT_PREFIX}/share/code-server/lib/vscode/node_modules/@coder/requirefs/coverage -# find ${DEFAULT_PREFIX}/share/code-server/ -name obj.target | xargs rm -r - -# # Install the VS code proxy -# pip install git+https://github.com/betatim/vscode-binder +# Install the VS code proxy +pip install git+https://github.com/betatim/vscode-binder From 9f3bea4ddaadb327593fe1ada01602bdb258778c Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 11:01:25 -0300 Subject: [PATCH 23/36] rm proxy settings --- .../files/jupyter/jupyter_notebook_config.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py b/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py index cadc8494d..96e551a23 100644 --- a/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py +++ b/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py @@ -36,13 +36,3 @@ ############################################################################### # JupyterHub idle culler total timeout corresponds (approximately) to: # max(cull_idle_timeout, cull_inactive_timeout) + shutdown_no_activity_timeout - - -c.ServerProxy.servers = { - "code-server": { - "command": [ - "--extensions-dir: ~/.local/share/code-server/extensions", - ], - "timeout": 20, - } -} From dfc82834d4e270c79b43f498af7d58f90d54ed58 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 11:09:09 -0300 Subject: [PATCH 24/36] add code-server to path --- qhub/template/image/Dockerfile.jupyterlab | 1 + 1 file changed, 1 insertion(+) diff --git a/qhub/template/image/Dockerfile.jupyterlab b/qhub/template/image/Dockerfile.jupyterlab index 3d16481c0..4349e6d00 100644 --- a/qhub/template/image/Dockerfile.jupyterlab +++ b/qhub/template/image/Dockerfile.jupyterlab @@ -45,6 +45,7 @@ RUN \ /opt/scripts/install-conda-environment.sh "${ENV_FILE}" 'true' # ========== code-server install ============ +ENV PATH=/opt/code-server/bin:${PATH} COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh COPY jupyterlab /opt/jupyterlab From 983ff94aa36c3d4e1c87ac16faf7865d6edc5a9f Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 12:09:51 -0300 Subject: [PATCH 25/36] add code-server to path --- qhub/template/image/Dockerfile.jupyterlab | 2 +- qhub/template/image/scripts/install-code-server.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/qhub/template/image/Dockerfile.jupyterlab b/qhub/template/image/Dockerfile.jupyterlab index 4349e6d00..b1533b28e 100644 --- a/qhub/template/image/Dockerfile.jupyterlab +++ b/qhub/template/image/Dockerfile.jupyterlab @@ -45,7 +45,7 @@ RUN \ /opt/scripts/install-conda-environment.sh "${ENV_FILE}" 'true' # ========== code-server install ============ -ENV PATH=/opt/code-server/bin:${PATH} +ENV PATH=/opt/code-server/bin:/opt/code-server/bin/code-server:${PATH} COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh COPY jupyterlab /opt/jupyterlab diff --git a/qhub/template/image/scripts/install-code-server.sh b/qhub/template/image/scripts/install-code-server.sh index 49b06843d..5ccc36b6a 100644 --- a/qhub/template/image/scripts/install-code-server.sh +++ b/qhub/template/image/scripts/install-code-server.sh @@ -16,6 +16,10 @@ fi sh ./install.sh --method standalone --prefix /opt/code-server +cat <<'EOF' >opt/code-server/bin/code-server +#!/bin/bash +node opt/code-server/lib/code-server-4.5.0/out/node/entry.js $* +EOF # Install the VS code proxy pip install git+https://github.com/betatim/vscode-binder From 012dd77e6d4b1695a6449d52234e8825104861de Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 12:21:04 -0300 Subject: [PATCH 26/36] Will fix everything --- qhub/template/image/Dockerfile.jupyterlab | 2 +- qhub/template/image/scripts/install-code-server.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qhub/template/image/Dockerfile.jupyterlab b/qhub/template/image/Dockerfile.jupyterlab index b1533b28e..4349e6d00 100644 --- a/qhub/template/image/Dockerfile.jupyterlab +++ b/qhub/template/image/Dockerfile.jupyterlab @@ -45,7 +45,7 @@ RUN \ /opt/scripts/install-conda-environment.sh "${ENV_FILE}" 'true' # ========== code-server install ============ -ENV PATH=/opt/code-server/bin:/opt/code-server/bin/code-server:${PATH} +ENV PATH=/opt/code-server/bin:${PATH} COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh COPY jupyterlab /opt/jupyterlab diff --git a/qhub/template/image/scripts/install-code-server.sh b/qhub/template/image/scripts/install-code-server.sh index 5ccc36b6a..a27293850 100644 --- a/qhub/template/image/scripts/install-code-server.sh +++ b/qhub/template/image/scripts/install-code-server.sh @@ -16,9 +16,12 @@ fi sh ./install.sh --method standalone --prefix /opt/code-server +rm -rf /opt/code-server/bin +mv /opt/code-server/lib/code-server-4.5.0/* /opt/code-server + cat <<'EOF' >opt/code-server/bin/code-server #!/bin/bash -node opt/code-server/lib/code-server-4.5.0/out/node/entry.js $* +node opt/code-server/out/node/entry.js $* EOF # Install the VS code proxy From 6aa39591384c5cb07bd509a2af4083a2509d9499 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 12:36:03 -0300 Subject: [PATCH 27/36] Will fix everything 2 --- qhub/template/image/Dockerfile.jupyterlab | 8 ++++---- qhub/template/image/jupyterlab/environment.yaml | 4 ++++ qhub/template/image/scripts/install-code-server.sh | 10 ++++------ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/qhub/template/image/Dockerfile.jupyterlab b/qhub/template/image/Dockerfile.jupyterlab index 4349e6d00..638b24e30 100644 --- a/qhub/template/image/Dockerfile.jupyterlab +++ b/qhub/template/image/Dockerfile.jupyterlab @@ -32,6 +32,10 @@ COPY jupyterlab/apt.txt /opt/jupyterlab/apt.txt COPY scripts/install-apt.sh /opt/scripts/install-apt.sh RUN /opt/scripts/install-apt.sh /opt/jupyterlab/apt.txt +# ========== code-server install ============ +ENV PATH=/opt/code-server/bin:${PATH} +COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh + ARG SKIP_CONDA_SOLVE=no COPY scripts/install-conda-environment.sh /opt/scripts/install-conda-environment.sh COPY jupyterlab/environment.yaml /opt/jupyterlab/environment.yaml @@ -44,10 +48,6 @@ RUN \ fi ; \ /opt/scripts/install-conda-environment.sh "${ENV_FILE}" 'true' -# ========== code-server install ============ -ENV PATH=/opt/code-server/bin:${PATH} -COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh - COPY jupyterlab /opt/jupyterlab RUN /opt/jupyterlab/postBuild diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index 44a0dbdeb..6c785f962 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -47,3 +47,7 @@ dependencies: - black - isort - importnb + + - pip: + # vscode jupyterlab launcher + - git+https://github.com/betatim/vscode-binder diff --git a/qhub/template/image/scripts/install-code-server.sh b/qhub/template/image/scripts/install-code-server.sh index a27293850..621ee09bf 100644 --- a/qhub/template/image/scripts/install-code-server.sh +++ b/qhub/template/image/scripts/install-code-server.sh @@ -14,15 +14,13 @@ if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then exit 1 fi -sh ./install.sh --method standalone --prefix /opt/code-server +mkdir /opt/tmpdir +sh ./install.sh --method standalone --prefix /opt/tmpdir -rm -rf /opt/code-server/bin -mv /opt/code-server/lib/code-server-4.5.0/* /opt/code-server +mv /opt/tmpdir/lib/code-server-4.5.0/* /opt/code-server/ +rm -rf /opt/tmpdir cat <<'EOF' >opt/code-server/bin/code-server #!/bin/bash node opt/code-server/out/node/entry.js $* EOF - -# Install the VS code proxy -pip install git+https://github.com/betatim/vscode-binder From 0cbd4edf9eaeae9061b88ace076aea331f13e7c9 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 12:54:55 -0300 Subject: [PATCH 28/36] fix dir typo --- qhub/template/image/scripts/install-code-server.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qhub/template/image/scripts/install-code-server.sh b/qhub/template/image/scripts/install-code-server.sh index 621ee09bf..8daed80ee 100644 --- a/qhub/template/image/scripts/install-code-server.sh +++ b/qhub/template/image/scripts/install-code-server.sh @@ -17,10 +17,10 @@ fi mkdir /opt/tmpdir sh ./install.sh --method standalone --prefix /opt/tmpdir -mv /opt/tmpdir/lib/code-server-4.5.0/* /opt/code-server/ +mv /opt/tmpdir/lib/code-server-4.5.0/* /opt/code-server rm -rf /opt/tmpdir -cat <<'EOF' >opt/code-server/bin/code-server +cat <<'EOF' > /opt/code-server/bin/code-server #!/bin/bash node opt/code-server/out/node/entry.js $* EOF From 3206b6c5fb1d4cc6c6b99e81107f80dcaccd7305 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 13:13:50 -0300 Subject: [PATCH 29/36] missed another typo again --- qhub/template/image/scripts/install-code-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qhub/template/image/scripts/install-code-server.sh b/qhub/template/image/scripts/install-code-server.sh index 8daed80ee..5def40474 100644 --- a/qhub/template/image/scripts/install-code-server.sh +++ b/qhub/template/image/scripts/install-code-server.sh @@ -22,5 +22,5 @@ rm -rf /opt/tmpdir cat <<'EOF' > /opt/code-server/bin/code-server #!/bin/bash -node opt/code-server/out/node/entry.js $* +node /opt/code-server/out/node/entry.js $* EOF From 6a6a8575631a3f4f2b7bae9d33902750baeca8ee Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 14:18:26 -0300 Subject: [PATCH 30/36] Will fix everything 3 --- qhub/template/image/Dockerfile.jupyterlab | 8 ++++---- qhub/template/image/jupyterlab/postBuild | 9 +++++++++ qhub/template/image/scripts/install-code-server.sh | 5 ----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/qhub/template/image/Dockerfile.jupyterlab b/qhub/template/image/Dockerfile.jupyterlab index 638b24e30..4349e6d00 100644 --- a/qhub/template/image/Dockerfile.jupyterlab +++ b/qhub/template/image/Dockerfile.jupyterlab @@ -32,10 +32,6 @@ COPY jupyterlab/apt.txt /opt/jupyterlab/apt.txt COPY scripts/install-apt.sh /opt/scripts/install-apt.sh RUN /opt/scripts/install-apt.sh /opt/jupyterlab/apt.txt -# ========== code-server install ============ -ENV PATH=/opt/code-server/bin:${PATH} -COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh - ARG SKIP_CONDA_SOLVE=no COPY scripts/install-conda-environment.sh /opt/scripts/install-conda-environment.sh COPY jupyterlab/environment.yaml /opt/jupyterlab/environment.yaml @@ -48,6 +44,10 @@ RUN \ fi ; \ /opt/scripts/install-conda-environment.sh "${ENV_FILE}" 'true' +# ========== code-server install ============ +ENV PATH=/opt/code-server/bin:${PATH} +COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh + COPY jupyterlab /opt/jupyterlab RUN /opt/jupyterlab/postBuild diff --git a/qhub/template/image/jupyterlab/postBuild b/qhub/template/image/jupyterlab/postBuild index 77e3a8385..4b24ba1a1 100755 --- a/qhub/template/image/jupyterlab/postBuild +++ b/qhub/template/image/jupyterlab/postBuild @@ -8,6 +8,15 @@ jupyter nbextension enable --py widgetsnbextension --sys-prefix # install code-server extension sh /opt/scripts/install-code-server.sh +# Enable the proxy extension in notebook and lab +jupyter serverextension enable --py jupyter_server_proxy +jupyter labextension install @jupyterlab/server-proxy +jupyter lab build + +code-server --install-extension ms-python.python + +conda pip install git+https://github.com/betatim/vscode-binder.git + # if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise # it substitutes the string x. This allows us to check if the variable # is set without triggering an unbound variable error diff --git a/qhub/template/image/scripts/install-code-server.sh b/qhub/template/image/scripts/install-code-server.sh index 5def40474..604f414b3 100644 --- a/qhub/template/image/scripts/install-code-server.sh +++ b/qhub/template/image/scripts/install-code-server.sh @@ -19,8 +19,3 @@ sh ./install.sh --method standalone --prefix /opt/tmpdir mv /opt/tmpdir/lib/code-server-4.5.0/* /opt/code-server rm -rf /opt/tmpdir - -cat <<'EOF' > /opt/code-server/bin/code-server -#!/bin/bash -node /opt/code-server/out/node/entry.js $* -EOF From 0de3de9d7bbec3afca50f0df40da423359fadd18 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 14:29:47 -0300 Subject: [PATCH 31/36] Will fix everything 4 --- qhub/template/image/jupyterlab/postBuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qhub/template/image/jupyterlab/postBuild b/qhub/template/image/jupyterlab/postBuild index 4b24ba1a1..18b04355e 100755 --- a/qhub/template/image/jupyterlab/postBuild +++ b/qhub/template/image/jupyterlab/postBuild @@ -15,7 +15,8 @@ jupyter lab build code-server --install-extension ms-python.python -conda pip install git+https://github.com/betatim/vscode-binder.git +conda activate ${DEFAULT_ENV} +pip install git+https://github.com/betatim/vscode-binder.git # if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise # it substitutes the string x. This allows us to check if the variable From a07201ffbc525eecef4de2d4db7dc8a1ff7fde12 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 14:35:27 -0300 Subject: [PATCH 32/36] Will fix everything 4 --- qhub/template/image/jupyterlab/postBuild | 3 --- 1 file changed, 3 deletions(-) diff --git a/qhub/template/image/jupyterlab/postBuild b/qhub/template/image/jupyterlab/postBuild index 18b04355e..1486fcd4b 100755 --- a/qhub/template/image/jupyterlab/postBuild +++ b/qhub/template/image/jupyterlab/postBuild @@ -15,9 +15,6 @@ jupyter lab build code-server --install-extension ms-python.python -conda activate ${DEFAULT_ENV} -pip install git+https://github.com/betatim/vscode-binder.git - # if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise # it substitutes the string x. This allows us to check if the variable # is set without triggering an unbound variable error From 3cfc295406912801b38535c969fd6a06b38ce4de Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 15:14:14 -0300 Subject: [PATCH 33/36] Will fix everything 5 --- qhub/template/image/Dockerfile.jupyterlab | 7 ++-- .../image/jupyterlab/environment.yaml | 3 ++ qhub/template/image/jupyterlab/postBuild | 9 +----- .../image/scripts/install-code-server.sh | 32 +++++++++---------- 4 files changed, 23 insertions(+), 28 deletions(-) diff --git a/qhub/template/image/Dockerfile.jupyterlab b/qhub/template/image/Dockerfile.jupyterlab index 4349e6d00..46b801abc 100644 --- a/qhub/template/image/Dockerfile.jupyterlab +++ b/qhub/template/image/Dockerfile.jupyterlab @@ -32,6 +32,9 @@ COPY jupyterlab/apt.txt /opt/jupyterlab/apt.txt COPY scripts/install-apt.sh /opt/scripts/install-apt.sh RUN /opt/scripts/install-apt.sh /opt/jupyterlab/apt.txt +# ========== code-server install ============ +ENV CODE_EXTENSIONSDIR=~/.local/share/code-server/extensions + ARG SKIP_CONDA_SOLVE=no COPY scripts/install-conda-environment.sh /opt/scripts/install-conda-environment.sh COPY jupyterlab/environment.yaml /opt/jupyterlab/environment.yaml @@ -44,10 +47,6 @@ RUN \ fi ; \ /opt/scripts/install-conda-environment.sh "${ENV_FILE}" 'true' -# ========== code-server install ============ -ENV PATH=/opt/code-server/bin:${PATH} -COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh - COPY jupyterlab /opt/jupyterlab RUN /opt/jupyterlab/postBuild diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index 6c785f962..9fcc2c7b1 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -48,6 +48,9 @@ dependencies: - isort - importnb +# vscode + - code-server >= 3.2 + - pip: # vscode jupyterlab launcher - git+https://github.com/betatim/vscode-binder diff --git a/qhub/template/image/jupyterlab/postBuild b/qhub/template/image/jupyterlab/postBuild index 1486fcd4b..be8edc8cd 100755 --- a/qhub/template/image/jupyterlab/postBuild +++ b/qhub/template/image/jupyterlab/postBuild @@ -5,14 +5,7 @@ set -x # install classic notebook extensions jupyter nbextension enable --py widgetsnbextension --sys-prefix -# install code-server extension -sh /opt/scripts/install-code-server.sh - -# Enable the proxy extension in notebook and lab -jupyter serverextension enable --py jupyter_server_proxy -jupyter labextension install @jupyterlab/server-proxy -jupyter lab build - +# install code-server basic extensions code-server --install-extension ms-python.python # if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise diff --git a/qhub/template/image/scripts/install-code-server.sh b/qhub/template/image/scripts/install-code-server.sh index 604f414b3..a322a62fa 100644 --- a/qhub/template/image/scripts/install-code-server.sh +++ b/qhub/template/image/scripts/install-code-server.sh @@ -1,21 +1,21 @@ -#!/usr/bin/env bash -set -xe -# DEFAULT_PREFIX="${1}"; shift # path to environment yaml or lock file +# #!/usr/bin/env bash +# set -xe +# # DEFAULT_PREFIX="${1}"; shift # path to environment yaml or lock file -mkdir -p /opt/code-server -cd /opt/code-server +# mkdir -p /opt/code-server +# cd /opt/code-server -# Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing -wget --quiet https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh -expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253 +# # Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing +# wget --quiet https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh +# expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253 -if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then - echo Unexpected hash from code-server install script - exit 1 -fi +# if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then +# echo Unexpected hash from code-server install script +# exit 1 +# fi -mkdir /opt/tmpdir -sh ./install.sh --method standalone --prefix /opt/tmpdir +# mkdir /opt/tmpdir +# sh ./install.sh --method standalone --prefix /opt/tmpdir -mv /opt/tmpdir/lib/code-server-4.5.0/* /opt/code-server -rm -rf /opt/tmpdir +# mv /opt/tmpdir/lib/code-server-4.5.0/* /opt/code-server +# rm -rf /opt/tmpdir From 82d59a49b19e75981faeb22f8c3fbb5a95eef3fb Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 17:11:37 -0300 Subject: [PATCH 34/36] rm external proxy and use jupyter builtin --- qhub/template/image/Dockerfile.jupyterlab | 7 ++-- .../image/jupyterlab/environment.yaml | 7 ---- qhub/template/image/jupyterlab/postBuild | 5 +-- .../image/scripts/install-code-server.sh | 32 +++++++++---------- .../files/jupyter/jupyter_notebook_config.py | 19 +++++++++++ 5 files changed, 42 insertions(+), 28 deletions(-) diff --git a/qhub/template/image/Dockerfile.jupyterlab b/qhub/template/image/Dockerfile.jupyterlab index 46b801abc..9fab8d700 100644 --- a/qhub/template/image/Dockerfile.jupyterlab +++ b/qhub/template/image/Dockerfile.jupyterlab @@ -32,9 +32,6 @@ COPY jupyterlab/apt.txt /opt/jupyterlab/apt.txt COPY scripts/install-apt.sh /opt/scripts/install-apt.sh RUN /opt/scripts/install-apt.sh /opt/jupyterlab/apt.txt -# ========== code-server install ============ -ENV CODE_EXTENSIONSDIR=~/.local/share/code-server/extensions - ARG SKIP_CONDA_SOLVE=no COPY scripts/install-conda-environment.sh /opt/scripts/install-conda-environment.sh COPY jupyterlab/environment.yaml /opt/jupyterlab/environment.yaml @@ -47,6 +44,10 @@ RUN \ fi ; \ /opt/scripts/install-conda-environment.sh "${ENV_FILE}" 'true' +# ========== code-server install ============ +ENV PATH=/opt/conda/envs/${DEFAULT_ENV}/share/code-server/bin:${PATH} +COPY scripts/install-code-server.sh /opt/scripts/install-code-server.sh + COPY jupyterlab /opt/jupyterlab RUN /opt/jupyterlab/postBuild diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index 9fcc2c7b1..44a0dbdeb 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -47,10 +47,3 @@ dependencies: - black - isort - importnb - -# vscode - - code-server >= 3.2 - - - pip: - # vscode jupyterlab launcher - - git+https://github.com/betatim/vscode-binder diff --git a/qhub/template/image/jupyterlab/postBuild b/qhub/template/image/jupyterlab/postBuild index be8edc8cd..4fad3d41c 100755 --- a/qhub/template/image/jupyterlab/postBuild +++ b/qhub/template/image/jupyterlab/postBuild @@ -5,8 +5,9 @@ set -x # install classic notebook extensions jupyter nbextension enable --py widgetsnbextension --sys-prefix -# install code-server basic extensions -code-server --install-extension ms-python.python +# install code-server extension +sh /opt/scripts/install-code-server.sh "/opt/conda/envs/${DEFAULT_ENV}/share" + # if DEFAULT_ENV is unset ${DEFAULT_ENV+x} expands to nothing otherwise # it substitutes the string x. This allows us to check if the variable diff --git a/qhub/template/image/scripts/install-code-server.sh b/qhub/template/image/scripts/install-code-server.sh index a322a62fa..0184150ac 100644 --- a/qhub/template/image/scripts/install-code-server.sh +++ b/qhub/template/image/scripts/install-code-server.sh @@ -1,21 +1,21 @@ -# #!/usr/bin/env bash -# set -xe -# # DEFAULT_PREFIX="${1}"; shift # path to environment yaml or lock file +#!/usr/bin/env bash +set -xe +DEFAULT_PREFIX="${1}"; shift # path to environment yaml or lock file -# mkdir -p /opt/code-server -# cd /opt/code-server +mkdir -p ${DEFAULT_PREFIX}/code-server +cd ${DEFAULT_PREFIX}/code-server -# # Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing -# wget --quiet https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh -# expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253 +# Fetch the snapshot of https://code-server.dev/install.sh as of the time of writing +wget --quiet https://raw.githubusercontent.com/coder/code-server/326a1d1862872955cec062030df2bd103799a1eb/install.sh +expected_sum=ed18563871beb535130019b6c5b62206cc4a60c8bf4256aae96ce737951fc253 -# if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then -# echo Unexpected hash from code-server install script -# exit 1 -# fi +if [[ ! $(sha256sum install.sh) == "${expected_sum} install.sh" ]];then + echo Unexpected hash from code-server install script + exit 1 +fi -# mkdir /opt/tmpdir -# sh ./install.sh --method standalone --prefix /opt/tmpdir +mkdir /opt/tmpdir +sh ./install.sh --method standalone --prefix /opt/tmpdir -# mv /opt/tmpdir/lib/code-server-4.5.0/* /opt/code-server -# rm -rf /opt/tmpdir +mv /opt/tmpdir/lib/code-server-4.5.0/* ${DEFAULT_PREFIX}/code-server +rm -rf /opt/tmpdir diff --git a/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py b/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py index 96e551a23..5cc522aff 100644 --- a/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py +++ b/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py @@ -36,3 +36,22 @@ ############################################################################### # JupyterHub idle culler total timeout corresponds (approximately) to: # max(cull_idle_timeout, cull_inactive_timeout) + shutdown_no_activity_timeout + + +c.ServerProxy.servers = { + "code-server": { + "command": [ + "code-server", + "--auth", + "none", + "--disable-telemetry", + "--port=8080", + "--extensions-dir: ~/.local/share/code-server/extensions", + ], + "timeout": 20, + "new_browser_tab": True, + "launcher_entry": { + "title": "VS Code", + }, + } +} From d50aa5881f9ac03307e45a2e33492db8035486a0 Mon Sep 17 00:00:00 2001 From: viniciusdc Date: Wed, 6 Jul 2022 17:28:50 -0300 Subject: [PATCH 35/36] rollback to using vscode proxy --- .../image/jupyterlab/environment.yaml | 4 ++++ .../files/jupyter/jupyter_notebook_config.py | 19 ------------------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index 44a0dbdeb..6c785f962 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -47,3 +47,7 @@ dependencies: - black - isort - importnb + + - pip: + # vscode jupyterlab launcher + - git+https://github.com/betatim/vscode-binder diff --git a/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py b/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py index 5cc522aff..96e551a23 100644 --- a/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py +++ b/qhub/template/stages/07-kubernetes-services/modules/kubernetes/services/jupyterhub/files/jupyter/jupyter_notebook_config.py @@ -36,22 +36,3 @@ ############################################################################### # JupyterHub idle culler total timeout corresponds (approximately) to: # max(cull_idle_timeout, cull_inactive_timeout) + shutdown_no_activity_timeout - - -c.ServerProxy.servers = { - "code-server": { - "command": [ - "code-server", - "--auth", - "none", - "--disable-telemetry", - "--port=8080", - "--extensions-dir: ~/.local/share/code-server/extensions", - ], - "timeout": 20, - "new_browser_tab": True, - "launcher_entry": { - "title": "VS Code", - }, - } -} From cf640e12ba938800c7917ed461301ef8759a72db Mon Sep 17 00:00:00 2001 From: eskild <42120229+iameskild@users.noreply.github.com> Date: Wed, 6 Jul 2022 13:51:05 -0700 Subject: [PATCH 36/36] Update qhub/template/image/jupyterlab/environment.yaml Co-authored-by: Vinicius D. Cerutti <51954708+viniciusdc@users.noreply.github.com> --- qhub/template/image/jupyterlab/environment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qhub/template/image/jupyterlab/environment.yaml b/qhub/template/image/jupyterlab/environment.yaml index 6c785f962..954fb5a05 100644 --- a/qhub/template/image/jupyterlab/environment.yaml +++ b/qhub/template/image/jupyterlab/environment.yaml @@ -19,7 +19,7 @@ dependencies: - retrolab # jupyterlab extensions - - dask_labextension == 5.3.0 + - dask_labextension >= 5.3.0 - jupyterlab-git >=0.30.0 - sidecar >=0.5.0 - jupyter-videochat >=0.5.0