Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion features/src/cccl-dev/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion features/src/cccl-dev/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env bash
set -ex
set -e

LIT_VERSION="${LITVERSION:-latest}";

Expand Down
2 changes: 1 addition & 1 deletion features/src/openmpi/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion features/src/openmpi/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env bash
set -ex
set -e

OPENMPI_VERSION="${VERSION:-system}";

Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
11 changes: 7 additions & 4 deletions features/src/rapids-build-utils/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -113,10 +113,13 @@ 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 "BASE_PYTHON=$(which python3)";
# Activate venv in ~/.bashrc
append_to_all_bashrcs "$(cat .bashrc)";
append_to_all_bashrcs "BASE_PYTHON=$(which python3)";
# export envvars in /etc/profile.d
add_etc_profile_d_script rapids-build-utils "$(cat .bashrc)";
echo "BASE_PYTHON=$(which python3)" >> "$(which /etc/profile.d/*-rapids-build-utils.sh)";

# Clean up
# rm -rf /tmp/*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:-$("${BASE_PYTHON:-python3}" --version 2>&1 | cut -d' ' -f2)}";
python_version="$(cut -d'.' -f3 --complement <<< "${python_version}")";

local -a _matrix_selectors=(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:-$("${BASE_PYTHON:-python3}" --version 2>&1 | cut -d' ' -f2)}";
python_version="$(cut -d'.' -f3 --complement <<< "${python_version}")";

# Why default to cuda_suffixed=true?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" == "$("${BASE_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" == "$("${BASE_PYTHON:-python3}" -c "import toml; print(toml.load('${1}/pyproject.toml')['tool']['rapids-build-backend']['build-backend'])" 2>/dev/null)" ]] \
;
Original file line number Diff line number Diff line change
Expand Up @@ -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" = "$("${BASE_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)";
Original file line number Diff line number Diff line change
Expand Up @@ -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:-$("${BASE_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
Expand Down
2 changes: 1 addition & 1 deletion features/src/utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
10 changes: 7 additions & 3 deletions features/src/utils/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -134,10 +134,14 @@ 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_etc_bashrc "BASE_PYTHON=$(which python3)";

append_to_all_bashrcs "$(cat .bashrc)";
append_to_all_bashrcs "BASE_PYTHON=$(which python3)";

# export envvars in /etc/profile.d
add_etc_profile_d_script devcontainer-utils "$(cat .bashrc)";
echo "BASE_PYTHON=$(which python3)" >> "$(which /etc/profile.d/*-devcontainer-utils.sh)";

# 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)
Expand Down
4 changes: 2 additions & 2 deletions matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }

Expand Down