From c26e8e3908d72e8c4dbb807f9b2b2003b3561219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rok=20Ro=C5=A1kar?= Date: Mon, 26 Aug 2024 16:25:30 +0200 Subject: [PATCH] chore: update jupyterlab (#466) This also switches the base dependency handling to conda to avoid conda/pip conflicts. --- .github/dependabot.yml | 2 +- docker/py/Dockerfile | 10 +++++----- docker/py/environment.yml | 17 +++++++++++++++++ docker/py/requirements.txt | 13 ------------- docker/vnc/Dockerfile | 5 ++--- tests/package-lock.json | 13 +++++++------ tests/package.json | 2 +- 7 files changed, 33 insertions(+), 29 deletions(-) create mode 100644 docker/py/environment.yml delete mode 100644 docker/py/requirements.txt diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6ccdb10f..ce773bec 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -40,7 +40,7 @@ updates: # python dependencies # -- package-ecosystem: "pip" +- package-ecosystem: "conda" directory: "/docker/py" schedule: interval: daily diff --git a/docker/py/Dockerfile b/docker/py/Dockerfile index cf785db4..967d74fb 100644 --- a/docker/py/Dockerfile +++ b/docker/py/Dockerfile @@ -14,9 +14,8 @@ RUN sed -i '/nodejs/d' /opt/conda/conda-meta/pinned # switch to the notebook user USER $NB_USER # install jupyterlab, papermill, git extension and renku-jupyterlab-ts -COPY requirements.txt /tmp/requirements.txt -RUN python3 -m pip install --no-cache-dir -U pip && \ - python3 -m pip install --no-cache-dir -r /tmp/requirements.txt && \ +COPY environment.yml /tmp/environment.yml +RUN mamba env update -f /tmp/environment.yml && \ jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \ rm -rf "/home/${NB_USER}/.cache" @@ -81,7 +80,7 @@ RUN mkdir -p "$HOME/.ssh" && \ # configure bash and shell prompt ENV PATH=$HOME/.local/bin:$PATH:$HOME/.renku/bin COPY --chown=1000:100 bashrc /renku/ -RUN cat "/renku/bashrc" >> "${HOME}/.bashrc" +RUN cat "/renku/bashrc" >> "${HOME}/.bashrc" COPY entrypoint.sh /entrypoint.sh @@ -97,7 +96,8 @@ COPY sshd_config /opt/ssh/sshd_config RUN chown -R 0:100 /opt/ssh/ && \ chmod -R u=rwX,g=rX,o= /opt/ssh && \ - chmod -R u=rwX,g=rwX,o= /opt/ssh/pid + chmod -R u=rwX,g=rwX,o= /opt/ssh/pid && \ + rm -rf /opt/conda ENTRYPOINT [ "tini", "--", "/entrypoint.sh" ] diff --git a/docker/py/environment.yml b/docker/py/environment.yml new file mode 100644 index 00000000..0e5daf43 --- /dev/null +++ b/docker/py/environment.yml @@ -0,0 +1,17 @@ +name: base +channels: + - conda-forge +dependencies: + - bleach>5.0.0 # closes #300 + - certifi>=2022.12.7 # not directly required, pinned by Snyk to avoid a vulnerability + - Jinja2<3.1 # because of https://github.com/jupyter/nbconvert/issues/1742 + - jupyter-server-proxy==4.3.0 + - jupyterlab>4.0,<5.0 + - jupyterlab-git==0.50.1 + - mistune>=2.0.1 # not directly required, pinned by Snyk to avoid a vulnerability + - papermill~=2.6.0 + - requests>=2.20.0 + - setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability + - virtualenv>=20.7.2 + - ipython>=8.10.0 # not directly required, pinned by Snyk to avoid a vulnerability + - tornado>=6.3.3 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/docker/py/requirements.txt b/docker/py/requirements.txt deleted file mode 100644 index 3499d9d2..00000000 --- a/docker/py/requirements.txt +++ /dev/null @@ -1,13 +0,0 @@ -bleach>5.0.0 # closes #300 -certifi>=2022.12.7 # not directly required, pinned by Snyk to avoid a vulnerability -Jinja2<3.1 # because of https://github.com/jupyter/nbconvert/issues/1742 -jupyter-server-proxy==4.3.0 -jupyterlab-git==0.50.1 -jupyterlab-system-monitor~=0.8.0 -mistune>=2.0.1 # not directly required, pinned by Snyk to avoid a vulnerability -papermill~=2.6.0 -requests>=2.20.0 -setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability -virtualenv>=20.7.2 -ipython>=8.10.0 # not directly required, pinned by Snyk to avoid a vulnerability -tornado>=6.3.3 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/docker/vnc/Dockerfile b/docker/vnc/Dockerfile index 300a42bc..9e8b4776 100644 --- a/docker/vnc/Dockerfile +++ b/docker/vnc/Dockerfile @@ -68,9 +68,8 @@ RUN chmod +x /home/jovyan/Desktop/gitk.desktop && \ # Install the jupyter extensions USER ${NB_USER} -RUN mamba install -y jupyter-server-proxy numpy websockify -c conda-forge \ - && jupyter labextension install @jupyterlab/server-proxy \ - && mamba clean -y --all +RUN mamba install -y numpy websockify -c conda-forge && \ + mamba clean -y --all COPY jupyter_notebook_config.py /home/jovyan/.jupyter/jupyter_notebook_config.py diff --git a/tests/package-lock.json b/tests/package-lock.json index f6f1a681..c274e835 100644 --- a/tests/package-lock.json +++ b/tests/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.1", "license": "ISC", "devDependencies": { - "@renku/notebooks-cypress-tests": "^0.0.11", + "@renku/notebooks-cypress-tests": "^0.0.13", "@types/node": "^18.7.18", "axios": "^1.6.0", "axios-cookiejar-support": "^4.0.3", @@ -115,10 +115,10 @@ } }, "node_modules/@renku/notebooks-cypress-tests": { - "version": "0.0.11", - "resolved": "git+ssh://git@github.com/leafty/notebooks-cypress-tests.git#998453ad7965192f729971cc2846e1bab70ae905", + "version": "0.0.13", + "resolved": "https://registry.npmjs.org/@renku/notebooks-cypress-tests/-/notebooks-cypress-tests-0.0.13.tgz", + "integrity": "sha512-0GU+iHG/vMg8cpYXhAuo4ztMA4ZxlEnJuQJThSpEMN9BjzUL5Bhj2Ia64a83ryW3mrYe5UDIrvWjKFoCDvd4tQ==", "dev": true, - "license": "ISC", "dependencies": { "cypress": "^11.0.1" } @@ -3037,9 +3037,10 @@ } }, "@renku/notebooks-cypress-tests": { - "version": "git+ssh://git@github.com/leafty/notebooks-cypress-tests.git#998453ad7965192f729971cc2846e1bab70ae905", + "version": "0.0.13", + "resolved": "https://registry.npmjs.org/@renku/notebooks-cypress-tests/-/notebooks-cypress-tests-0.0.13.tgz", + "integrity": "sha512-0GU+iHG/vMg8cpYXhAuo4ztMA4ZxlEnJuQJThSpEMN9BjzUL5Bhj2Ia64a83ryW3mrYe5UDIrvWjKFoCDvd4tQ==", "dev": true, - "from": "@renku/notebooks-cypress-tests@^0.0.11", "requires": { "cypress": "^11.0.1" }, diff --git a/tests/package.json b/tests/package.json index 0e12b59f..4a77ed8c 100644 --- a/tests/package.json +++ b/tests/package.json @@ -9,7 +9,7 @@ "author": "", "license": "ISC", "devDependencies": { - "@renku/notebooks-cypress-tests": "^0.0.11", + "@renku/notebooks-cypress-tests": "^0.0.13", "@types/node": "^18.7.18", "axios": "^1.6.0", "axios-cookiejar-support": "^4.0.3",