-
Notifications
You must be signed in to change notification settings - Fork 3k
Pin python version in a strict way #1354
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 python version in a strict way #1354
Conversation
Seems to work fine. Master: Also saves 90 MB of information. |
base-notebook/Dockerfile
Outdated
conda list python | grep '^python ' | tr -s ' ' | cut -d '.' -f 1,2 | sed 's/$/.*/' >> $CONDA_DIR/conda-meta/pinned && \ | ||
conda list python | grep '^python ' | tr -s ' ' | cut -d ' ' -f 1,2 >> $CONDA_DIR/conda-meta/pinned && \ |
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.
This is too technical for me to parse, can you describe what is changed in what was previously written to the pinned file vs what is now written to the pinned file?
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.
For example, the current version of python is 3.9.2
.
Currently, in the master branch we will pin the version like this python 3.9.*
.
So, during conda update (and even install), we might update (and even downgrade) python version to 3.9.x
.
The change: write exactly python 3.9.2
. This way we pin python versions in a strict way and it won't change during conda update / install.
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.
Excellent thank you!
Questions in my mind
|
As this review shows, we can rely on adding a line to the pinned file (python version is not changing).
I think, it's ok to pin the version in a strict way - we provide our docker images with complete python tag like |
And, I think we're updating quite a lot our mambaforge installation (at least we try), so we will be always with quite recent version of python). |
Let's try this one out. |
Fix: #1352
This is another approach to fix the python version (mamba doesn't change the python version in #1351).
For now, I'm not 100% sure about this PR, because @parente wanted the python patch version to be floating (#778 (comment)).
I want to see how it's gonna work for pyspark image, which was updating python version, even it might not be needed.
Also, it's nice to see the same tags in all the images and to control python version via a variable (it was unexpected for me that two images had different python versions at all).