Skip to content
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

Python version pinning mechanism in docker-stack-foundation does not match comment description #2084

Closed
1 task done
ehfd opened this issue Jan 20, 2024 · 1 comment · Fixed by #2085
Closed
1 task done
Labels
type:Bug A problem with the definition of one of the docker images maintained here

Comments

@ehfd
Copy link

ehfd commented Jan 20, 2024

What docker image(s) are you using?

docker-stacks-foundation

Host OS system

Ubuntu 22.04

Host architecture

x86_64

What Docker command are you running?

docker run -it -p 8888:8888 quay.io/jupyter/scipy-notebook

How to Reproduce the problem?

Try to extend the containers based on docker-stacks-foundation and install other packages (such as RAPIDS.ai) with specific requirements for Python revision versions for Conda. The installation fails.

Command output

Pins seem to be involved in the conflict. Currently pinned specs:
 - python==3.11.7 (labeled as 'pin-1')

Expected behavior

    # Pin major.minor version of python
    mamba list python | grep '^python ' | tr -s ' ' | cut -d ' ' -f 1,2 | sed 's/\.[^.]*$/.* /' >> "${CONDA_DIR}/conda-meta/pinned" && \

Adding sed 's/\.[^.]*$/.* /' is the correct solution to the explanation of # Pin major.minor version of python.

Thus:

cat "${CONDA_DIR}/conda-meta/pinned"
> python 3.11.*

Actual behavior

cat "${CONDA_DIR}/conda-meta/pinned"
> python 3.11.7

Anything else?

No response

Latest Docker version

  • I've updated my Docker version to the latest available, and the issue persists
@ehfd ehfd added the type:Bug A problem with the definition of one of the docker images maintained here label Jan 20, 2024
@ehfd ehfd changed the title Python pinning mechanism in docker-stack-foundation is incorrect Python version pinning mechanism in docker-stack-foundation does not match comment description Jan 20, 2024
@mathbunnyru
Copy link
Member

Thank you for the issue.
Could you please create a PR with the proposed change?
If you also know how to do in a more clear way than grep, tr, cut and sed, that would be nice.

And if you want to make sure it won’t break in a future, please add a test here:
https://github.com/jupyter/docker-stacks/blob/main/tests/docker-stacks-foundation/test_python.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug A problem with the definition of one of the docker images maintained here
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants