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

Pin to Python 3.11. #388

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Conversation

bdice
Copy link
Contributor

@bdice bdice commented Sep 5, 2024

Pin devcontainers to Python 3.11.

During the migration to Python 3.12, we are getting py=3.12 as a matrix selector for rapids-dependency-file-generator, which in turn selects python=3.12 for repositories that have added support. However, for repositories that have not migrated yet, we get the fallback matrix python>=3.10,<3.12 which conflicts with the other pinning. To avoid this, we can pin devcontainers to use PYTHON_VERSION="3.11" which will be passed through to the logic here:

local python_version="${PYTHON_VERSION:-$(python3 --version 2>&1 | cut -d' ' -f2)}";
python_version="$(cut -d'.' -f3 --complement <<< "${python_version}")";
local -a _matrix_selectors=(
arch="$(uname -m)"
cuda="${cuda_version}"
py="${python_version}"
);
# add extra arguments (if there are conflicts, e.g. 'py=3.10;py=3.11', it's fine... the last one will win)
test ${#matrix_entry[@]} -gt 0 && _matrix_selectors+=("${matrix_entry[@]}");
local -r matrix_selectors=$(IFS=";"; echo "${_matrix_selectors[*]}")

@bdice bdice requested a review from a team as a code owner September 5, 2024 17:39
@bdice bdice requested review from jameslamb and removed request for a team September 5, 2024 17:39
Copy link
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this!

I hadn't considered the way that Python version detection here would have been silently hitting the fallback matrices until at least one repo had a match.

I've updated rapidsai/build-planning#40 with checklist items so when we go to add Python 3.13 in the future, we remember to do this again.

@trxcllnt trxcllnt merged commit 68807e3 into rapidsai:branch-24.10 Sep 5, 2024
211 of 213 checks passed
trxcllnt pushed a commit that referenced this pull request Sep 16, 2024
Contributes to rapidsai/build-planning#40

#388 pinned to Python 3.11 for building the mambaforge images here, to
prevent issues in the situation where some but not all RAPIDS repos had
added Python 3.12 support.

This proposes moving that pin to Python 3.12.

Keeping this hard-coded will prevent similar issues the next time we go
to add a Python version (Python 3.13) across RAPIDS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants