-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pin jupyter-notebook version #469
Conversation
8c05cd8
to
17fbf57
Compare
RUN cat /opt/requirements.txt | xargs -I{} conda config --system --add pinned_packages {} | ||
|
||
# Upgrade pip to latest | ||
RUN pip install --upgrade --no-cache-dir pip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pip is originally installed via conda so I've changed this and use mamba update pip
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should think about updating conda and mamba as well? (for another PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mamba is from jupyter image, so I think it is safe to use any version it used, and if I remember correctly they spin up the build process periodically and will try to bring the latest mamba.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but we're not using the latest jupyter image. In fact our current one is quite old. And even when we upgrade, I don't think we'll ever want to use the most recent one, since it would likely produce a lot of churn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't use aiidalab mamba for quite a while, did you see some annoying warnings ask to update? If so I am totally fine with updating to the latest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not, I just think it is a good practice to keep it updated. I'll take a closer look and prepare a PR at some point.
btw: Thanks for the review, I've added some tests in case you want to take a look. Waiting for the build to finish and will then merge.
@unkcpz would you have time to take a look in the next few days? I'd like to publish a new version of the image after we merge this. |
Yes, it is in my list, I'll have a look asap. Sorry. |
No worries at all, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a safe move. Thanks @danielhollas.
We've been having discussions in the past about pinning some jupyter-related packages to prevent this scenario from happening.
Yep.
RUN cat /opt/requirements.txt | xargs -I{} conda config --system --add pinned_packages {} | ||
|
||
# Upgrade pip to latest | ||
RUN pip install --upgrade --no-cache-dir pip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mamba is from jupyter image, so I think it is safe to use any version it used, and if I remember correctly they spin up the build process periodically and will try to bring the latest mamba.
Thanks @unkcpz. I've added some tests. After merging this I'm going to publish a new version. |
In aiidalab/aiidalab-qe#640, @superstar54 and I were debugging an issue with a stalled pip installation, likely caused by his quite complex dev environment. One thing I noticed that while the pip was trying hard to solve the dependencies, it started backtracking and looking at older versions of some of the core Jupyter libraries, most notably Jupyter notebook (
notebook
package). This is definitely not desirable, and if pip was able to finish, it would likely break the container.We've been having discussions in the past about pinning some jupyter-related packages to prevent this scenario from happening. I'll open a separate issue for that, but for starters I think we should pin at least the notebook package. We definitely don't want users to be able to downgrade the version, and we also don't want them to upgrade it, since we know that v7 will currently not work as it is a completely different architecture.