diff --git a/features/src/cccl-dev/devcontainer-feature.json b/features/src/cccl-dev/devcontainer-feature.json index 0c767b59a..05aa9389d 100644 --- a/features/src/cccl-dev/devcontainer-feature.json +++ b/features/src/cccl-dev/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "NVIDIA CCCL development utilities", "id": "cccl-dev", - "version": "25.6.1", + "version": "25.6.2", "description": "A feature to install NVIDIA CCCL development utilities", "options": { "litVersion": { diff --git a/features/src/cccl-dev/install.sh b/features/src/cccl-dev/install.sh index 9b7c539a6..dc890387b 100644 --- a/features/src/cccl-dev/install.sh +++ b/features/src/cccl-dev/install.sh @@ -1,5 +1,5 @@ #! /usr/bin/env bash -set -ex +set -e LIT_VERSION="${LITVERSION:-latest}"; diff --git a/features/src/openmpi/devcontainer-feature.json b/features/src/openmpi/devcontainer-feature.json index 4b597b065..38b075b36 100644 --- a/features/src/openmpi/devcontainer-feature.json +++ b/features/src/openmpi/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "OpenMPI", "id": "openmpi", - "version": "25.6.1", + "version": "25.6.2", "description": "A feature to install OpenMPI with optional CUDA and UCX support", "options": { "version": { diff --git a/features/src/openmpi/install.sh b/features/src/openmpi/install.sh index 5a934c986..ba1a2526c 100755 --- a/features/src/openmpi/install.sh +++ b/features/src/openmpi/install.sh @@ -1,5 +1,5 @@ #! /usr/bin/env bash -set -ex +set -e OPENMPI_VERSION="${VERSION:-system}"; diff --git a/features/src/rapids-build-utils/devcontainer-feature.json b/features/src/rapids-build-utils/devcontainer-feature.json index eea08310e..d8df711ed 100644 --- a/features/src/rapids-build-utils/devcontainer-feature.json +++ b/features/src/rapids-build-utils/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "NVIDIA RAPIDS devcontainer build utilities", "id": "rapids-build-utils", - "version": "25.6.2", + "version": "25.6.3", "description": "A feature to install the RAPIDS devcontainer build utilities", "containerEnv": { "BASH_ENV": "/etc/bash.bash_env" diff --git a/features/src/rapids-build-utils/install.sh b/features/src/rapids-build-utils/install.sh index 6f6c9c805..d3c57bc77 100644 --- a/features/src/rapids-build-utils/install.sh +++ b/features/src/rapids-build-utils/install.sh @@ -9,9 +9,9 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"; PKGS=(bc jq pigz sudo wget gettext-base bash-completion ca-certificates); -if ! command -v /usr/bin/python3 >/dev/null 2>&1; then +if ! command -v python3 >/dev/null 2>&1; then PKGS+=(python3 python3-pip); -elif ! /usr/bin/python3 -m pip >/dev/null 2>&1; then +elif ! python3 -m pip >/dev/null 2>&1; then PKGS+=(python3-pip); fi @@ -43,9 +43,9 @@ if [[ "${DISTRIB_RELEASE}" > "22.04" ]]; then fi fi -/usr/bin/python3 -m pip install "${_PIP_INSTALL_ARGS[@]}" "${_PIP_UPGRADE_ARGS[@]}" pip; +python3 -m pip install "${_PIP_INSTALL_ARGS[@]}" "${_PIP_UPGRADE_ARGS[@]}" pip; # Install RAPIDS dependency file generator, conda-merge, and toml -/usr/bin/python3 -m pip install "${_PIP_INSTALL_ARGS[@]}" \ +python3 -m pip install "${_PIP_INSTALL_ARGS[@]}" \ 'rapids-dependency-file-generator<1.14' \ conda-merge \ toml; @@ -112,11 +112,11 @@ mkdir -p /etc/bash_completion.d/; yq shell-completion bash | tee /etc/bash_completion.d/yq >/dev/null; # Activate venv in /etc/bash.bashrc -append_to_etc_bashrc "$(cat .bashrc)"; +append_to_etc_bashrc "$(cat .bashrc)\n\nexport ORIG_PYTHON=$(which python3)"; # Activate venv in ~/.bashrc -append_to_all_bashrcs "$(cat .bashrc)"; +append_to_all_bashrcs "$(cat .bashrc)\n\nexport ORIG_PYTHON=$(which python3)"; # export envvars in /etc/profile.d -add_etc_profile_d_script rapids-build-utils "$(cat .bashrc)"; +add_etc_profile_d_script rapids-build-utils "$(cat .bashrc)\n\nexport ORIG_PYTHON=$(which python3)"; # Clean up # rm -rf /tmp/*; diff --git a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-conda-dependencies.sh b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-conda-dependencies.sh index 4e4124fdf..a711bce3a 100755 --- a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-conda-dependencies.sh +++ b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-conda-dependencies.sh @@ -63,7 +63,7 @@ make_conda_dependencies() { local cuda_version="${CUDA_VERSION:-${CUDA_VERSION_MAJOR:-12}.${CUDA_VERSION_MINOR:-0}}"; cuda_version="$(grep -o '^[0-9]*.[0-9]' <<< "${cuda_version}")"; - local python_version="${PYTHON_VERSION:-$(python3 --version 2>&1 | cut -d' ' -f2)}"; + local python_version="${PYTHON_VERSION:-$("${ORIG_PYTHON:-python3}" --version 2>&1 | cut -d' ' -f2)}"; python_version="$(cut -d'.' -f3 --complement <<< "${python_version}")"; local -a _matrix_selectors=( diff --git a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-pip-dependencies.sh b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-pip-dependencies.sh index 97451e8eb..d7938e740 100755 --- a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-pip-dependencies.sh +++ b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/make-pip-dependencies.sh @@ -64,7 +64,7 @@ make_pip_dependencies() { local cuda_version="${CUDA_VERSION_MAJOR_MINOR:-}"; local -r cuda_version_major="$(cut -d'.' -f1 <<< "${cuda_version}")"; - local python_version="${PYTHON_VERSION:-$(python3 --version 2>&1 | cut -d' ' -f2)}"; + local python_version="${PYTHON_VERSION:-$("${ORIG_PYTHON:-python3}" --version 2>&1 | cut -d' ' -f2)}"; python_version="$(cut -d'.' -f3 --complement <<< "${python_version}")"; # Why default to cuda_suffixed=true? diff --git a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/python-uses-scikit-build-core.sh b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/python-uses-scikit-build-core.sh index 90410abae..7e92bc7ed 100755 --- a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/python-uses-scikit-build-core.sh +++ b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/python-uses-scikit-build-core.sh @@ -5,7 +5,7 @@ set -e; test -f "${1}/pyproject.toml"; # where rapids-build-backend is used, its does a bit of work then forwards on to another build backend... which might be scikit-build-core -[[ "scikit_build_core.build" == "$(/usr/bin/python3 -c "import toml; print(toml.load('${1}/pyproject.toml')['build-system']['build-backend'])" 2>/dev/null)" ]] \ +[[ "scikit_build_core.build" == "$("${ORIG_PYTHON:-python3}" -c "import toml; print(toml.load('${1}/pyproject.toml')['build-system']['build-backend'])" 2>/dev/null)" ]] \ || \ -[[ "scikit_build_core.build" == "$(/usr/bin/python3 -c "import toml; print(toml.load('${1}/pyproject.toml')['tool']['rapids-build-backend']['build-backend'])" 2>/dev/null)" ]] \ +[[ "scikit_build_core.build" == "$("${ORIG_PYTHON:-python3}" -c "import toml; print(toml.load('${1}/pyproject.toml')['tool']['rapids-build-backend']['build-backend'])" 2>/dev/null)" ]] \ ; diff --git a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/python-uses-scikit-build.sh b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/python-uses-scikit-build.sh index 8fe181246..5a27627e9 100755 --- a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/python-uses-scikit-build.sh +++ b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/python-uses-scikit-build.sh @@ -3,4 +3,4 @@ set -e; test -f "${1}/pyproject.toml"; -test "True" = "$(/usr/bin/python3 -c "import toml; print(any('scikit-build-core' not in x and 'scikit-build' in x for x in toml.load('${1}/pyproject.toml')['build-system']['requires']))" 2>/dev/null)"; +test "True" = "$("${ORIG_PYTHON:-python3}" -c "import toml; print(any('scikit-build-core' not in x and 'scikit-build' in x for x in toml.load('${1}/pyproject.toml')['build-system']['requires']))" 2>/dev/null)"; diff --git a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/tmpl/python.clean.tmpl.sh b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/tmpl/python.clean.tmpl.sh index 3951f739d..97220fbc3 100755 --- a/features/src/rapids-build-utils/opt/rapids-build-utils/bin/tmpl/python.clean.tmpl.sh +++ b/features/src/rapids-build-utils/opt/rapids-build-utils/bin/tmpl/python.clean.tmpl.sh @@ -40,7 +40,7 @@ clean_${PY_LIB}_python() { fi done - local py_ver="${PYTHON_VERSION:-$(python3 --version 2>&1 | cut -d' ' -f2)}"; + local py_ver="${PYTHON_VERSION:-$("${ORIG_PYTHON:-python3}" --version 2>&1 | cut -d' ' -f2)}"; py_ver="$(grep -Po '^[0-9]+\.[0-9]+' <<< "${py_ver}")"; if test -d "${PY_SRC}/build"; then diff --git a/features/src/utils/devcontainer-feature.json b/features/src/utils/devcontainer-feature.json index b078fc120..ee6251c28 100644 --- a/features/src/utils/devcontainer-feature.json +++ b/features/src/utils/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "devcontainer-utils", "id": "utils", - "version": "25.6.2", + "version": "25.6.3", "description": "A feature to install RAPIDS devcontainer utility scripts", "containerEnv": { "BASH_ENV": "/etc/bash.bash_env" diff --git a/features/src/utils/install.sh b/features/src/utils/install.sh index 514c9b56e..4a2d31072 100644 --- a/features/src/utils/install.sh +++ b/features/src/utils/install.sh @@ -21,9 +21,9 @@ PKGS=( ca-certificates ); -if ! command -v /usr/bin/python3 >/dev/null 2>&1; then +if ! command -v python3 >/dev/null 2>&1; then PKGS+=(python3 python3-pip); -elif ! /usr/bin/python3 -m pip >/dev/null 2>&1; then +elif ! python3 -m pip >/dev/null 2>&1; then PKGS+=(python3-pip); fi @@ -42,7 +42,7 @@ if [[ "${DISTRIB_RELEASE}" > "22.04" ]]; then fi fi -/usr/bin/python3 -m pip install "${_PIP_INSTALL_ARGS[@]}" "${_PIP_UPGRADE_ARGS[@]}" pip; +python3 -m pip install "${_PIP_INSTALL_ARGS[@]}" "${_PIP_UPGRADE_ARGS[@]}" pip; # Install yq if not installed if ! command -v yq >/dev/null 2>&1; then @@ -133,11 +133,12 @@ for_each_user_bashrc 'sed -i -re "s/^#(export GCC_COLORS)/\1/g" "$0"'; for_each_user_bashrc 'sed -i -re "s/^(HIST(FILE)?SIZE=).*$/\1/g" "$0"'; # export envvars in bashrc files -append_to_etc_bashrc "$(cat .bashrc)"; -append_to_all_bashrcs "$(cat .bashrc)"; +append_to_etc_bashrc "$(cat .bashrc)\n\nexport ORIG_PYTHON=$(which python3)"; + +append_to_all_bashrcs "$(cat .bashrc)\n\nexport ORIG_PYTHON=$(which python3)"; # export envvars in /etc/profile.d -add_etc_profile_d_script devcontainer-utils "$(cat .bashrc)"; +add_etc_profile_d_script devcontainer-utils "$(cat .bashrc)\n\nexport ORIG_PYTHON=$(which python3)"; # Add GitHub's key fingerprints to known_hosts (curl -s https://api.github.com/meta | jq -r '.ssh_keys | map("github.com \(.)") | .[]') # Add GitLab's key fingerprints to known_hosts (https://docs.gitlab.com/ee/user/gitlab_com/index.html#ssh-known_hosts-entries) diff --git a/matrix.yml b/matrix.yml index 909ed0dce..26f942627 100644 --- a/matrix.yml +++ b/matrix.yml @@ -30,8 +30,8 @@ x-nvhpc-curr: &nvhpc_curr { name: "nvhpc", version: "25.3" } x-nvhpc-env: &nvhpc_env { CC: "nvc", CXX: "nvc++", CUDAHOSTCXX: "nvc++" } x-mambaforge: &conda { name: "mambaforge" } -x-python: &python { name: "ghcr.io/devcontainers/features/python:1.6.2", version: "os-provided", installTools: "false", hide: true } -x-python-rapids: &python_rapids { name: "ghcr.io/devcontainers/features/python:1.6.2", version: "3.12", installTools: "false", hide: true } +x-python: &python { name: "ghcr.io/devcontainers/features/python:1.7.1", version: "os-provided", installTools: false, enableShared: true, optimize: true, hide: true } +x-python-rapids: &python_rapids { name: "ghcr.io/devcontainers/features/python:1.7.1", version: "3.12", installTools: false, enableShared: true, optimize: true, hide: true } x-ucx-rapids: &ucx_rapids { name: "ucx", version: "1.18.0" } x-openmpi: &openmpi { name: "openmpi" }