After the upgrade to the newest Renku and Python 3.10 (because 3.9 does not support the latest pymc), the git jupyter plug-in seems to not work any more.
Thank you @pascal.baumann for sharing this issue with us. Apparently, extensions needs to be enabled now and the server probably needs to be restarted, we will investigate how to do that automatically. In case you find a solution, please let us know.
Thank you for your reply! While checking the extensions with jupyter labextension list (something I could have done in the beginning - sorry for my oversight) I got the following output:
Given that the latest version of @jupyterlab/git@ is 0.50.1 and of jupyterlab is 4.2.4, I believe an update of the jupyterlab in the renku base container is the way to go.
Please tell me if you need some debugging from my side - as I do not want to try to hack something together (like updating jupyterlab in the container) or downgrading the extension, I think it would help the community more if the base container is fixed - please tell me, I am quite happy to help =)
Addendum: Further investigation of renkulab-py:3.10-0.23.0 led me to find that it’s based on jupyter/base-notebook:3.10 which was last built/pushed in march last year:
I believe that is the core of the outdated jupyter lab. On how to best proceed we probably need the input of @rrrrrok as I saw that he manages the GitHub docker images.
Hi @rrrrrok , I tried to upgrade to renkulab-py:3.10-0.24.0, but got errors with setuptools, so I made a minimum working example Pascal Baumann / TestPyMCRenku · GitLab and it has the same issues, do you have an idea?
I am not sure how this same package works in the old images but not in the new ones. What does work is installing this package with mamba (i.e. conda). To do this just remove the entry from requirements.txt and add a line to environment.yml.
So your environment.yml should look like this:
name: "base"
# WARNING : As Renku makes use of mamba for more efficient package builds, please use the popular "conda-forge" channel
# For more details : https://mamba.readthedocs.io/en/latest/user_guide/troubleshooting.html#mixing-the-defaults-and-conda-forge-channels
# Using the defaults channel from Anaconda can easily result in getting your
# laptop, CI pipeline, etc. blacklisted by Anaconda which makes building packages
# impossible. To get permission to use Anaconda again you need to either pay or prove that
# you meet the requirements for a free license. Using the conda-forge channel avoids
# these restrictions completely.
channels:
- conda-forge
dependencies:
- pymc==5.16.2. # <<<------ This is the only new line
# - add packages here
# - one per line
prefix: "/opt/conda"
In general it is better to install packages via the environment.yml file since that uses mamba which is much better when it comes to resolving dependencies. And scientific packages like pymc or numpy or similar usually have complicated dependencies. Anything from requirements.txt is installed only via pip which is not as robust. I know from my own experience installing numpy from pip is usually a pain or it does not work. I have not done this in a while and maybe things are better now. But when I used numpy more a few years back I would always install it with conda or mamba.
I cloned your project and could reproduce your error locally. With the proposed change the image builds. But please run it and make sure everything is ok. And let me know if there are any other issues - but I dont think there will be.
And please make sure that you remove the pymc package from your requirements.txt file. If you have it in both places (i.e. requirements.txt and environment.yml) then things will also probably break.
I generally avoid conda because it sideloads a lot of dependencies that can make the environment unusable, and the dependency resolver sometimes stalls the pipeline or just completely breaks, while with pip I have a lot more control and insight why something is breaking.
Generally I do not understand why the pipeline builds in renkulab-py:3.10-0.23.0 but breaks in renkulab-py:3.10-0.24.0. If the official answer is, don’t use pip requirements but only conda, I will be unhappy but ok. But this means a lot of legacy projects will have to get migrated.
I am pretty sure I can figure out why pip does not work. I just need some time. It is suspicious why the old image worked fine with pip but the new one does not. So I will get back to you.
@pascal.baumann something is a bit off with the setuptools installation in our images. And thanks to a colleague of mine (@leafty) who did some troubleshooting we noticed that this can be fixed by installing backports.tarfile in the current environment. We will rollout a proper fix for this.
But in the meantime you can get unstuck by installing this package in your Dockerfile. Like this:
########################################################
# Renku install section - do not edit #
FROM renku/renkulab-py:3.10-0.24.0 as builder
# RENKU_VERSION determines the version of the renku CLI
# that will be used in this image. To find the latest version,
# visit https://pypi.org/project/renku/#history.
ARG RENKU_VERSION=2.9.2
# Install renku from pypi or from github if a dev version
RUN if [ -n "$RENKU_VERSION" ] ; then \
source .renku/venv/bin/activate ; \
currentversion=$(renku --version) ; \
if [ "$RENKU_VERSION" != "$currentversion" ] ; then \
pip uninstall renku -y ; \
gitversion=$(echo "$RENKU_VERSION" | sed -n "s/^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\(rc[[:digit:]]\+\)*\(\.dev[[:digit:]]\+\)*\(+g\([a-f0-9]\+\)\)*\(+dirty\)*$/\4/p") ; \
if [ -n "$gitversion" ] ; then \
pip install --no-cache-dir --force "git+https://github.com/SwissDataScienceCenter/renku-python.git@$gitversion" ;\
else \
pip install --no-cache-dir --force renku==${RENKU_VERSION} ;\
fi \
fi \
fi
# End Renku install section #
########################################################
FROM renku/renkulab-py:3.10-0.24.0
# Uncomment and adapt if code is to be included in the image
# COPY src /code/src
# Uncomment and adapt if your R or python packages require extra linux (ubuntu) software
# e.g. the following installs apt-utils and vim; each pkg on its own line, all lines
# except for the last end with backslash '\' to continue the RUN line
#
# USER root
# RUN apt-get update && \
# apt-get install -y --no-install-recommends \
# apt-utils \
# vim
# USER ${NB_USER}
# install the python dependencies
COPY requirements.txt environment.yml /tmp/
RUN mamba env update -q -f /tmp/environment.yml && \
/opt/conda/bin/pip install --no-cache-dir backports.tarfile && \ # <<<<<<<<<<<< new line
/opt/conda/bin/pip install -r /tmp/requirements.txt --no-cache-dir && \
mamba clean -y --all && \
mamba env export -n "root" && \
rm -rf ${HOME}/.renku/venv
COPY --from=builder ${HOME}/.renku/venv ${HOME}/.renku/venv