From c7bd6c7b61392b6944192d8bd5553ac436adcc63 Mon Sep 17 00:00:00 2001 From: arpita0911patel Date: Tue, 23 Aug 2022 15:33:09 -0500 Subject: [PATCH 01/10] Installed jupyterlab_vim using pip install command for jupyter v3 https://github.com/jupyterlab-contrib/jupyterlab-vim --- Dockerfile | 8 ++++++-- environment.yml | 11 ----------- postBuild | 2 +- 3 files changed, 7 insertions(+), 14 deletions(-) delete mode 100644 environment.yml diff --git a/Dockerfile b/Dockerfile index c8bd9d1..3ac3e16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,8 +42,12 @@ RUN export PATH=${NB_PYTHON_PREFIX}/bin:${PATH} \ && pip install --no-cache-dir \ https://github.com/jupyterhub/jupyter-remote-desktop-proxy/archive/main.zip -COPY environment.yml /tmp/ +#COPY environment.yml /tmp/ -RUN mamba env update --name ${CONDA_ENV} -f /tmp/environment.yml +#RUN mamba env update --name ${CONDA_ENV} -f /tmp/environment.yml + +RUN pip install jupyterlab_vim +RUN cd /srv/conda/envs/notebook/share/jupyter/labextensions/@axlair/jupyterlab_vim/schemas/@axlair/jupyterlab_vim +RUN sed -i 's/\"default\": true/\"default\": false/g' plugin.json USER ${NB_USER} \ No newline at end of file diff --git a/environment.yml b/environment.yml deleted file mode 100644 index b3e577d..0000000 --- a/environment.yml +++ /dev/null @@ -1,11 +0,0 @@ -# This is the standard conda configuration file. Use this file to list -# the conda packages that you need installed in your environment. -channels: - - conda-forge - -dependencies: - - pip - # Add other packages here - - pip: - - jupyterlab_vim - \ No newline at end of file diff --git a/postBuild b/postBuild index b14b219..5e8f6ed 100644 --- a/postBuild +++ b/postBuild @@ -2,7 +2,7 @@ set -euo pipefail # Activate the extension -jupyter labextension install jupyterlab_vim +pip install install jupyterlab_vim # copy custom Jupyter Lab settings cd /home/jovyan/.jupyter/lab/user-settings/@axlair/jupyterlab_vim sed -i 's/"enabled": true/"enabled": false/g' plugin.jupyterlab-settings \ No newline at end of file From 2759c50ff14382c589668214d74e7996e9fe7f05 Mon Sep 17 00:00:00 2001 From: arpita0911patel Date: Tue, 23 Aug 2022 15:53:28 -0500 Subject: [PATCH 02/10] Added environment.yaml to add pip dependency and kept sed command in postBuild --- Dockerfile | 8 +++----- environment.yml | 11 +++++++++++ postBuild | 8 +++----- 3 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 environment.yml diff --git a/Dockerfile b/Dockerfile index 3ac3e16..ff66b5a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,12 +42,10 @@ RUN export PATH=${NB_PYTHON_PREFIX}/bin:${PATH} \ && pip install --no-cache-dir \ https://github.com/jupyterhub/jupyter-remote-desktop-proxy/archive/main.zip -#COPY environment.yml /tmp/ - -#RUN mamba env update --name ${CONDA_ENV} -f /tmp/environment.yml +COPY environment.yml /tmp/ RUN pip install jupyterlab_vim -RUN cd /srv/conda/envs/notebook/share/jupyter/labextensions/@axlair/jupyterlab_vim/schemas/@axlair/jupyterlab_vim -RUN sed -i 's/\"default\": true/\"default\": false/g' plugin.json + +RUN mamba env update --name ${CONDA_ENV} -f /tmp/environment.yml USER ${NB_USER} \ No newline at end of file diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..8705307 --- /dev/null +++ b/environment.yml @@ -0,0 +1,11 @@ +#/bin/bash +# This is the standard conda configuration file. Use this file to list +# the conda packages that you need installed in your environment. +channels: + - conda-forge + +dependencies: + - pip + # Add other packages here + - pip: + - jupyterlab_vim \ No newline at end of file diff --git a/postBuild b/postBuild index 5e8f6ed..ef2f769 100644 --- a/postBuild +++ b/postBuild @@ -1,8 +1,6 @@ #!/bin/bash set -euo pipefail -# Activate the extension -pip install install jupyterlab_vim -# copy custom Jupyter Lab settings -cd /home/jovyan/.jupyter/lab/user-settings/@axlair/jupyterlab_vim -sed -i 's/"enabled": true/"enabled": false/g' plugin.jupyterlab-settings \ No newline at end of file +# Update custom Jupyter Lab settings +cd /srv/conda/envs/notebook/share/jupyter/labextensions/@axlair/jupyterlab_vim/schemas/@axlair/jupyterlab_vim +sed -i 's/\"default\": true/\"default\": false/g' plugin.json \ No newline at end of file From af370d3134bac84c7b58764af89d8f0f328f1fef Mon Sep 17 00:00:00 2001 From: arpita0911patel Date: Tue, 23 Aug 2022 16:37:56 -0500 Subject: [PATCH 03/10] Moved pip install in postBuild --- postBuild | 1 + 1 file changed, 1 insertion(+) diff --git a/postBuild b/postBuild index ef2f769..bc7b18d 100644 --- a/postBuild +++ b/postBuild @@ -1,6 +1,7 @@ #!/bin/bash set -euo pipefail +pip install jupyterlab-vim # Update custom Jupyter Lab settings cd /srv/conda/envs/notebook/share/jupyter/labextensions/@axlair/jupyterlab_vim/schemas/@axlair/jupyterlab_vim sed -i 's/\"default\": true/\"default\": false/g' plugin.json \ No newline at end of file From a786410f4910f1e58f9c89503a9bb25b50923978 Mon Sep 17 00:00:00 2001 From: arpita0911patel Date: Tue, 23 Aug 2022 21:29:18 -0500 Subject: [PATCH 04/10] Moved pip install to postBuild --- Dockerfile | 2 -- postBuild | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ff66b5a..c8bd9d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,8 +44,6 @@ RUN export PATH=${NB_PYTHON_PREFIX}/bin:${PATH} \ COPY environment.yml /tmp/ -RUN pip install jupyterlab_vim - RUN mamba env update --name ${CONDA_ENV} -f /tmp/environment.yml USER ${NB_USER} \ No newline at end of file diff --git a/postBuild b/postBuild index bc7b18d..e1f0752 100644 --- a/postBuild +++ b/postBuild @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail -pip install jupyterlab-vim +pip install jupyterlab_vim # Update custom Jupyter Lab settings cd /srv/conda/envs/notebook/share/jupyter/labextensions/@axlair/jupyterlab_vim/schemas/@axlair/jupyterlab_vim sed -i 's/\"default\": true/\"default\": false/g' plugin.json \ No newline at end of file From 15c20afabf37a4c41ca4620c87755de1053fdc86 Mon Sep 17 00:00:00 2001 From: arpita0911patel Date: Tue, 23 Aug 2022 22:15:21 -0500 Subject: [PATCH 05/10] Using labextension install cmd --- postBuild | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/postBuild b/postBuild index e1f0752..8406521 100644 --- a/postBuild +++ b/postBuild @@ -1,7 +1,8 @@ #!/bin/bash set -euo pipefail -pip install jupyterlab_vim +jupyter labextension install @axlair/jupyterlab_vim + # Update custom Jupyter Lab settings -cd /srv/conda/envs/notebook/share/jupyter/labextensions/@axlair/jupyterlab_vim/schemas/@axlair/jupyterlab_vim -sed -i 's/\"default\": true/\"default\": false/g' plugin.json \ No newline at end of file +cd /home/jovyan/.jupyter/lab/user-settings/@axlair/jupyterlab_vim +sed -i 's/"enabled": true/"enabled": false/g' plugin.jupyterlab-settings \ No newline at end of file From 4bc076240fbf2b50cc59c5cf7bc566f9a8eab747 Mon Sep 17 00:00:00 2001 From: arpita0911patel Date: Wed, 24 Aug 2022 08:11:54 -0500 Subject: [PATCH 06/10] Adding jupyter labextension enable for jupyterlab_vim --- postBuild | 1 + 1 file changed, 1 insertion(+) diff --git a/postBuild b/postBuild index 8406521..3f286c6 100644 --- a/postBuild +++ b/postBuild @@ -2,6 +2,7 @@ set -euo pipefail jupyter labextension install @axlair/jupyterlab_vim +jupyter labextension enable @axlair/jupyterlab_vim # Update custom Jupyter Lab settings cd /home/jovyan/.jupyter/lab/user-settings/@axlair/jupyterlab_vim From a2517132cafc4973ac8d0eacbd74c62d3c099bdd Mon Sep 17 00:00:00 2001 From: arpita0911patel Date: Wed, 24 Aug 2022 09:12:24 -0500 Subject: [PATCH 07/10] Added pip install for jupyterlab_vim before USER NB_USER --- Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c8bd9d1..9ef337a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,8 +42,14 @@ RUN export PATH=${NB_PYTHON_PREFIX}/bin:${PATH} \ && pip install --no-cache-dir \ https://github.com/jupyterhub/jupyter-remote-desktop-proxy/archive/main.zip -COPY environment.yml /tmp/ +RUN pip install jupyterlab_vim -RUN mamba env update --name ${CONDA_ENV} -f /tmp/environment.yml +# Update custom Jupyter Lab settings +RUN cd /srv/conda/envs/notebook/share/jupyter/labextensions/@axlair/jupyterlab_vim/schemas/@axlair/jupyterlab_vim +RUN sed -i 's/\"default\": true/\"default\": false/g' plugin.json + +#COPY environment.yml /tmp/ + +#RUN mamba env update --name ${CONDA_ENV} -f /tmp/environment.yml USER ${NB_USER} \ No newline at end of file From f0c013c8710406dcdbb73bf651cd91559b8860f3 Mon Sep 17 00:00:00 2001 From: arpita0911patel Date: Wed, 24 Aug 2022 09:21:37 -0500 Subject: [PATCH 08/10] Merged the lines for running sed command --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9ef337a..687cfeb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,8 +45,7 @@ RUN export PATH=${NB_PYTHON_PREFIX}/bin:${PATH} \ RUN pip install jupyterlab_vim # Update custom Jupyter Lab settings -RUN cd /srv/conda/envs/notebook/share/jupyter/labextensions/@axlair/jupyterlab_vim/schemas/@axlair/jupyterlab_vim -RUN sed -i 's/\"default\": true/\"default\": false/g' plugin.json +RUN sed -i 's/\"default\": true/\"default\": false/g' /srv/conda/envs/notebook/share/jupyter/labextensions/@axlair/jupyterlab_vim/schemas/@axlair/jupyterlab_vim/plugin.json #COPY environment.yml /tmp/ From cb10c161b85123a3238d7ff14954bc25ed7cf766 Mon Sep 17 00:00:00 2001 From: arpita0911patel Date: Wed, 24 Aug 2022 09:34:39 -0500 Subject: [PATCH 09/10] Removing postBuild and environment.yaml file as its not needed --- environment.yml | 11 ----------- postBuild | 9 --------- 2 files changed, 20 deletions(-) delete mode 100644 environment.yml delete mode 100644 postBuild diff --git a/environment.yml b/environment.yml deleted file mode 100644 index 8705307..0000000 --- a/environment.yml +++ /dev/null @@ -1,11 +0,0 @@ -#/bin/bash -# This is the standard conda configuration file. Use this file to list -# the conda packages that you need installed in your environment. -channels: - - conda-forge - -dependencies: - - pip - # Add other packages here - - pip: - - jupyterlab_vim \ No newline at end of file diff --git a/postBuild b/postBuild deleted file mode 100644 index 3f286c6..0000000 --- a/postBuild +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -set -euo pipefail - -jupyter labextension install @axlair/jupyterlab_vim -jupyter labextension enable @axlair/jupyterlab_vim - -# Update custom Jupyter Lab settings -cd /home/jovyan/.jupyter/lab/user-settings/@axlair/jupyterlab_vim -sed -i 's/"enabled": true/"enabled": false/g' plugin.jupyterlab-settings \ No newline at end of file From 968f7d885aa615d8a2176bca3dde558d35c8e5bb Mon Sep 17 00:00:00 2001 From: arpita0911patel Date: Wed, 24 Aug 2022 09:35:20 -0500 Subject: [PATCH 10/10] Removed the commented code --- Dockerfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 687cfeb..3bddc63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,8 +47,4 @@ RUN pip install jupyterlab_vim # Update custom Jupyter Lab settings RUN sed -i 's/\"default\": true/\"default\": false/g' /srv/conda/envs/notebook/share/jupyter/labextensions/@axlair/jupyterlab_vim/schemas/@axlair/jupyterlab_vim/plugin.json -#COPY environment.yml /tmp/ - -#RUN mamba env update --name ${CONDA_ENV} -f /tmp/environment.yml - USER ${NB_USER} \ No newline at end of file