Skip to content

Commit

Permalink
chore: update jupyterlab (#466)
Browse files Browse the repository at this point in the history
This also switches the base dependency handling to conda to avoid conda/pip conflicts.
  • Loading branch information
rokroskar authored Aug 26, 2024
1 parent 11d93a4 commit c26e8e3
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ updates:
# python dependencies
#

- package-ecosystem: "pip"
- package-ecosystem: "conda"
directory: "/docker/py"
schedule:
interval: daily
Expand Down
10 changes: 5 additions & 5 deletions docker/py/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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

Expand All @@ -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" ]

Expand Down
17 changes: 17 additions & 0 deletions docker/py/environment.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 0 additions & 13 deletions docker/py/requirements.txt

This file was deleted.

5 changes: 2 additions & 3 deletions docker/vnc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 7 additions & 6 deletions tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit c26e8e3

Please sign in to comment.