Skip to content

Commit fc66e40

Browse files
committed
Merge branch 'branch-25.06' of github.com:rapidsai/devcontainers into fea/use-sccache-build-cluster
2 parents da56758 + ae6a295 commit fc66e40

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+191
-187
lines changed

features/src/cccl-dev/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "NVIDIA CCCL development utilities",
33
"id": "cccl-dev",
4-
"version": "25.6.0",
4+
"version": "25.6.1",
55
"description": "A feature to install NVIDIA CCCL development utilities",
66
"options": {
77
"litVersion": {

features/src/cccl-dev/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";
1515
# install global/common scripts
1616
. ./common/install.sh;
1717

18-
if ! type python >/dev/null 2>&1; then
18+
if ! command -v python >/dev/null 2>&1; then
1919
echo "lit feature expects python to already be installed" >&2;
2020
exit 1;
2121
fi
@@ -25,8 +25,8 @@ PKG_TO_REMOVE=();
2525

2626
# Install gcc and g++ because we have to build psutil wheel for non-x86
2727
if [[ "$(uname -p)" != "x86_64" ]]; then
28-
if ! type gcc >/dev/null 2>&1; then PKG_TO_REMOVE+=("gcc"); fi
29-
if ! type g++ >/dev/null 2>&1; then PKG_TO_REMOVE+=("g++"); fi
28+
if ! command -v gcc >/dev/null 2>&1; then PKG_TO_REMOVE+=("gcc"); fi
29+
if ! command -v g++ >/dev/null 2>&1; then PKG_TO_REMOVE+=("g++"); fi
3030
fi
3131

3232
check_packages "${PKG[@]}" "${PKG_TO_REMOVE[@]}";

features/src/cuda/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "CUDA Toolkit",
33
"id": "cuda",
4-
"version": "25.6.0",
4+
"version": "25.6.1",
55
"description": "A feature to install the NVIDIA CUDA Toolkit",
66
"options": {
77
"version": {

features/src/cuda/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ if ! test -L "${CUDA_HOME}"; then
224224
ln -s "${cudapath}" "${CUDA_HOME}";
225225
fi
226226

227-
if test -z "${CUDA_VERSION:-}"; then
227+
if ! test -n "${CUDA_VERSION:+x}"; then
228228
if test -f "${CUDA_HOME}/include/cuda.h"; then
229229
cuda_ver=$(grep "#define CUDA_VERSION" "${CUDA_HOME}/include/cuda.h" | cut -d' ' -f3);
230230
CUDA_VERSION_MAJOR=$((cuda_ver / 1000));

features/src/cuda/prune-extra-cutensor-libs.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
libcutensor_ver="$(dpkg -s libcutensor1 | grep '^Version:' | cut -d' ' -f2 | cut -d'-' -f1 | cut -d'.' -f4 --complement)";
33
libcutensorMg_shared="$(find /usr/lib -type f -regex "^.*/libcutensor/${CUDA_VERSION_MAJOR}/libcutensorMg.so.${libcutensor_ver}$")";
44

5-
if test -n "${libcutensorMg_shared:-}"; then
5+
if test -n "${libcutensorMg_shared:+x}"; then
66

77
libcutensorMg_shared="$(find /usr/lib -type f -regex "^.*/libcutensor/${CUDA_VERSION_MAJOR}/libcutensorMg.so.${libcutensor_ver}$")";
88
libcutensorMg_static="$(find /usr/lib -type f -regex "^.*/libcutensor/${CUDA_VERSION_MAJOR}/libcutensorMg_static.a$")";
@@ -18,29 +18,29 @@ if test -n "${libcutensorMg_shared:-}"; then
1818
# 2. Install only the alternative for the version we keep
1919
# 3. Set the default alternatives
2020

21-
if test -n "${libcutensorMg_shared}" && test -f "${libcutensorMg_shared}" \
22-
&& test -n "${libcutensorMg_shared_link}" && test -L "${libcutensorMg_shared_link}"; then
21+
if test -n "${libcutensorMg_shared:+x}" && test -f "${libcutensorMg_shared}" \
22+
&& test -n "${libcutensorMg_shared_link:+x}" && test -L "${libcutensorMg_shared_link}"; then
2323
(update-alternatives --remove-all libcutensorMg.so.${libcutensor_ver} >/dev/null 2>&1 || true);
2424
update-alternatives --install "${libcutensorMg_shared_link}" libcutensorMg.so.${libcutensor_ver} "${libcutensorMg_shared}" 0;
2525
update-alternatives --set libcutensorMg.so.${libcutensor_ver} "${libcutensorMg_shared}";
2626
fi
2727

28-
if test -n "${libcutensorMg_static}" && test -f "${libcutensorMg_static}" \
29-
&& test -n "${libcutensorMg_static_link}" && test -L "${libcutensorMg_static_link}"; then
28+
if test -n "${libcutensorMg_static:+x}" && test -f "${libcutensorMg_static}" \
29+
&& test -n "${libcutensorMg_static_link:+x}" && test -L "${libcutensorMg_static_link}"; then
3030
(update-alternatives --remove-all libcutensorMg_static.a >/dev/null 2>&1 || true);
3131
update-alternatives --install "${libcutensorMg_static_link}" libcutensorMg_static.a "${libcutensorMg_static}" 0;
3232
update-alternatives --set libcutensorMg_static.a "${libcutensorMg_static}";
3333
fi
3434

35-
if test -n "${libcutensor_shared}" && test -f "${libcutensor_shared}" \
36-
&& test -n "${libcutensor_shared_link}" && test -L "${libcutensor_shared_link}"; then
35+
if test -n "${libcutensor_shared:+x}" && test -f "${libcutensor_shared}" \
36+
&& test -n "${libcutensor_shared_link:+x}" && test -L "${libcutensor_shared_link}"; then
3737
(update-alternatives --remove-all libcutensor.so.${libcutensor_ver} >/dev/null 2>&1 || true);
3838
update-alternatives --install "${libcutensor_shared_link}" libcutensor.so.${libcutensor_ver} "${libcutensor_shared}" 0;
3939
update-alternatives --set libcutensor.so.${libcutensor_ver} "${libcutensor_shared}";
4040
fi
4141

42-
if test -n "${libcutensor_static}" && test -f "${libcutensor_static}" \
43-
&& test -n "${libcutensor_static_link}" && test -L "${libcutensor_static_link}"; then
42+
if test -n "${libcutensor_static:+x}" && test -f "${libcutensor_static}" \
43+
&& test -n "${libcutensor_static_link:+x}" && test -L "${libcutensor_static_link}"; then
4444
(update-alternatives --remove-all libcutensor_static.a >/dev/null 2>&1 || true);
4545
update-alternatives --install "${libcutensor_static_link}" libcutensor_static.a "${libcutensor_static}" 0;
4646
update-alternatives --set libcutensor_static.a "${libcutensor_static}";

features/src/cuda/prune-static-libs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
if test -n "${libcutensorMg_static:-}" && test -f "${libcutensorMg_static}"; then
1+
if test -n "${libcutensorMg_static:+x}" && test -f "${libcutensorMg_static}"; then
22
rm -rf "${libcutensorMg_static}";
33
(update-alternatives --remove-all libcutensorMg_static.a >/dev/null 2>&1 || true);
44
fi
55

6-
if test -n "${libcutensor_static:-}" && test -f "${libcutensor_static}"; then
6+
if test -n "${libcutensor_static:+x}" && test -f "${libcutensor_static}"; then
77
rm -rf "${libcutensor_static}";
88
(update-alternatives --remove-all libcutensor_static.a >/dev/null 2>&1 || true);
99
fi

features/src/gitlab-cli/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "gitlab-cli",
3-
"version": "25.6.0",
3+
"version": "25.6.1",
44
"name": "GitLab CLI",
55
"documentationURL": "https://github.com/rapidsai/devcontainers/features/tree/main/src/gitlab-cli",
66
"description": "Installs the GitLab CLI. Auto-detects latest version and installs needed dependencies.",

features/src/gitlab-cli/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export DEBIAN_FRONTEND=noninteractive;
6565

6666
# Install curl, ca-certificates, apt-transport-https, and git (if missing)
6767
check_packages curl ca-certificates apt-transport-https;
68-
if ! type git >/dev/null 2>&1; then
68+
if ! command -v git >/dev/null 2>&1; then
6969
check_packages git;
7070
fi
7171

@@ -77,7 +77,7 @@ install_deb_using_gitlab;
7777
glab config set -g check_update false;
7878

7979
if dpkg -s bash-completion >/dev/null 2>&1; then
80-
if type glab >/dev/null 2>&1; then
80+
if command -v glab >/dev/null 2>&1; then
8181
glab completion -s bash | tee /etc/bash_completion.d/glab >/dev/null;
8282
fi
8383
fi

features/src/llvm/devcontainer-feature.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "LLVM compilers and tools",
33
"id": "llvm",
4-
"version": "25.6.0",
4+
"version": "25.6.1",
55
"description": "A feature to install LLVM compilers and tools",
66
"options": {
77
"version": {
@@ -39,7 +39,7 @@
3939
"updateContentCommand": [
4040
"/bin/bash",
4141
"-c",
42-
"mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml"
42+
"mkdir -m 0755 -p ~/.config/clangd && cp -u /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml"
4343
],
4444
"customizations": {
4545
"vscode": {

features/src/llvm/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fi
6161
# Remove existing, install, and set default clang/llvm alternatives
6262
for ((i=0; i < ${#bins[@]}; i+=1)); do
6363
x=${bins[$i]};
64-
if type "${x}-${LLVM_VERSION}" >/dev/null 2>&1; then
64+
if command -v "${x}-${LLVM_VERSION}" >/dev/null 2>&1; then
6565
(update-alternatives --install /usr/bin/"${x}" "${x}" "$(which "${x}-${LLVM_VERSION}")" 30);
6666
(update-alternatives --set "${x}" "$(which "${x}-${LLVM_VERSION}")");
6767
fi

features/src/mambaforge/.bashrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ unset nounseton;
1313

1414
if [ -n "${CONDA_EXE:-}" ]; then
1515
conda_bin_paths="$(dirname "$(dirname "${CONDA_EXE}")")/condabin";
16-
if test -n "${CONDA_PREFIX:-}"; then
16+
if test -n "${CONDA_PREFIX:+x}"; then
1717
conda_bin_paths="${conda_bin_paths} ${CONDA_PREFIX}/bin";
1818
fi
1919
for conda_bin_path in ${conda_bin_paths}; do

features/src/mambaforge/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Mambaforge",
33
"id": "mambaforge",
4-
"version": "25.6.0",
4+
"version": "25.6.1",
55
"description": "A feature to install mambaforge",
66
"options": {
77
"version": {

features/src/mambaforge/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ conda clean --force-pkgs-dirs --all --yes;
3636
# Activate conda in /etc/bash.bashrc
3737
append_to_etc_bashrc "$(cat<< EOF
3838
for x in "conda" "mamba"; do
39-
if ! type \$x 2>&1 | grep -q function; then . /opt/conda/etc/profile.d/\$x.sh; fi;
39+
if ! command -v \$x 2>&1 | grep -q function; then . /opt/conda/etc/profile.d/\$x.sh; fi;
4040
done
4141
$(cat .bashrc)
4242
EOF
4343
)";
4444
# Activate conda in ~/.bashrc
4545
append_to_all_bashrcs "$(cat<< EOF
4646
for x in "conda" "mamba"; do
47-
if ! type \$x 2>&1 | grep -q function; then . /opt/conda/etc/profile.d/\$x.sh; fi;
47+
if ! command -v \$x 2>&1 | grep -q function; then . /opt/conda/etc/profile.d/\$x.sh; fi;
4848
done
4949
$(cat .bashrc)
5050
EOF

features/src/nvhpc/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "NVHPC SDK",
33
"id": "nvhpc",
4-
"version": "25.6.0",
4+
"version": "25.6.1",
55
"description": "A feature to install the NVHPC SDK",
66
"options": {
77
"version": {

features/src/nvhpc/etc/profile.d/nvhpc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if ! type module 2>&1 | grep -q function; then
1+
if ! command -v module 2>&1 | grep -q function; then
22
. /etc/profile.d/lmod._sh;
33
fi
44

features/src/oneapi/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Intel oneapi toolchain",
33
"id": "oneapi",
4-
"version": "25.6.0",
4+
"version": "25.6.1",
55
"description": "A feature to install the Intel oneapi toolchain",
66
"options": {
77
"version": {

features/src/oneapi/etc/profile.d/oneapi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if ! type module 2>&1 | grep -q function; then
1+
if ! command -v module 2>&1 | grep -q function; then
22
. /etc/profile.d/lmod._sh;
33
fi
44

features/src/openmpi/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "OpenMPI",
33
"id": "openmpi",
4-
"version": "25.6.0",
4+
"version": "25.6.1",
55
"description": "A feature to install OpenMPI with optional CUDA and UCX support",
66
"options": {
77
"version": {

features/src/openmpi/install.sh

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,31 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";
1010
. ./common/install.sh;
1111

1212
read_cuda_version() {
13+
local -;
14+
set -euo pipefail;
15+
1316
local cuda="";
1417

1518
if test -n "${CUDA_VERSION:-${CUDA_VERSION_MAJOR:-}}"; then
16-
cuda=$(cut -d'.' -f1 <<< "${CUDA_VERSION:-${CUDA_VERSION_MAJOR:-}}");
19+
cuda="$(cut -d'.' -f1 <<< "${CUDA_VERSION:-${CUDA_VERSION_MAJOR:-}}")";
1720
elif test -f "${CUDA_HOME:-/usr/local/cuda}/include/cuda.h"; then
18-
cuda=$(grep "#define CUDA_VERSION" ${CUDA_HOME:-/usr/local/cuda}/include/cuda.h | cut -d' ' -f3);
19-
cuda=$((cuda / 1000));
21+
cuda="$(grep "#define CUDA_VERSION" ${CUDA_HOME:-/usr/local/cuda}/include/cuda.h | cut -d' ' -f3)";
22+
cuda="$((cuda / 1000))";
2023
fi
2124

22-
echo "${cuda}";
25+
if test -n "${cuda:+x}"; then
26+
echo "${cuda}";
27+
return 0
28+
else
29+
return 1
30+
fi
2331
}
2432

2533
ENABLE_UCX=;
2634
ENABLE_CUDA=;
2735

28-
if test -n "${UCX_VERSION:-}"; then ENABLE_UCX=1; fi
29-
if test -n "$(read_cuda_version)"; then ENABLE_CUDA=1; fi
36+
if test -n "${UCX_VERSION:+x}"; then ENABLE_UCX=1; fi
37+
if read_cuda_version >/dev/null 2>&1; then ENABLE_CUDA=1; fi
3038

3139
install_openmpi_deps() {
3240
local -r openmpi_lib="$(
@@ -72,7 +80,7 @@ build_and_install_openmpi() {
7280
fi
7381

7482
local -a cuda_args=();
75-
if test "${ENABLE_CUDA}" = 1; then
83+
if test "${ENABLE_CUDA:-}" = 1; then
7684
cuda_args+=(--with-cuda="${CUDA_HOME:-/usr/local/cuda}");
7785
cuda_args+=(--with-cuda-libdir="${CUDA_HOME:-/usr/local/cuda}/lib64/stubs}");
7886
fi
@@ -134,7 +142,7 @@ build_and_install_openmpi() {
134142
apt_get_update;
135143
check_packages bzip2 wget ca-certificates bash-completion gettext-base pkg-config;
136144

137-
if test -z "${OPENMPI_VERSION:-}" || [ "${OPENMPI_VERSION:-}" = "latest" ]; then
145+
if ! test -n "${OPENMPI_VERSION:+x}" || test "${OPENMPI_VERSION:-}" = latest; then
138146
find_version_from_git_tags OPENMPI_VERSION https://github.com/open-mpi/ompi;
139147
elif [ "${OPENMPI_VERSION:-}" = "system" ]; then
140148
OPENMPI_VERSION="$(apt-cache policy libopenmpi-dev | grep Candidate: | tr -d '[:blank:]' | cut -d: -f2 | cut -d- -f1)";
@@ -148,7 +156,7 @@ build_and_install_openmpi;
148156

149157
DEBIAN_FRONTEND=noninteractive apt-get -y autoremove;
150158

151-
if test "${ENABLE_CUDA}" = 1; then
159+
if test "${ENABLE_CUDA:-}" = 1; then
152160
cat <<EOF >> .bashrc
153161
OMPI_MCA_opal_cuda_support=true
154162
EOF

features/src/rapids-build-utils/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";
99

1010
PKGS=(bc jq pigz sudo wget gettext-base bash-completion ca-certificates);
1111

12-
if ! type /usr/bin/python3 >/dev/null 2>&1; then
12+
if ! command -v /usr/bin/python3 >/dev/null 2>&1; then
1313
PKGS+=(python3 python3-pip);
1414
elif ! /usr/bin/python3 -m pip >/dev/null 2>&1; then
1515
PKGS+=(python3-pip);
@@ -18,7 +18,7 @@ fi
1818
check_packages "${PKGS[@]}";
1919

2020
# Install yq if not installed
21-
if ! type yq >/dev/null 2>&1; then
21+
if ! command -v yq >/dev/null 2>&1; then
2222
YQ_BINARY="yq";
2323
YQ_BINARY+="_$(uname -s | tr '[:upper:]' '[:lower:]')";
2424
YQ_BINARY+="_${TARGETARCH:-$(dpkg --print-architecture | awk -F'-' '{print $NF}')}";
@@ -95,7 +95,7 @@ for cmd in "${commands[@]}"; do
9595
done
9696

9797
# Install bash_completion script
98-
if type devcontainer-utils-generate-bash-completion >/dev/null 2>&1; then
98+
if command -v devcontainer-utils-generate-bash-completion >/dev/null 2>&1; then
9999
devcontainer-utils-generate-bash-completion \
100100
--out-file /etc/bash_completion.d/rapids-build-utils-completions \
101101
${commands[@]/#/--command rapids-} \

features/src/rapids-build-utils/opt/rapids-build-utils/bin/generate-scripts.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generate_completions() {
1212
local -;
1313
set -euo pipefail;
1414

15-
if type devcontainer-utils-debug-output >/dev/null 2>&1; then
15+
if command -v devcontainer-utils-debug-output >/dev/null 2>&1; then
1616
# shellcheck disable=SC1091
1717
. devcontainer-utils-debug-output 'rapids_build_utils_debug' 'generate-scripts';
1818

@@ -30,7 +30,7 @@ clean_scripts_and_aliases() {
3030
local -;
3131
set -euo pipefail;
3232

33-
if type devcontainer-utils-debug-output >/dev/null 2>&1; then
33+
if command -v devcontainer-utils-debug-output >/dev/null 2>&1; then
3434
# shellcheck disable=SC1091
3535
. devcontainer-utils-debug-output 'rapids_build_utils_debug' 'generate-scripts';
3636
fi
@@ -43,7 +43,7 @@ clean_scripts_and_aliases() {
4343

4444
generate_script() {
4545
local bin="${1:-}";
46-
if test -n "${bin}"; then
46+
if test -n "${bin:+x}"; then
4747
(
4848
cat - \
4949
| envsubst '$HOME $NAME $SRC_PATH $PY_ENV $PY_SRC $PY_LIB $BIN_DIR $CPP_ENV $CPP_LIB $CPP_SRC $CPP_CMAKE_ARGS $CPP_CPACK_ARGS $CPP_DEPS $CPP_MAX_TOTAL_SYSTEM_MEMORY $CPP_MAX_DEVICE_OBJ_MEMORY_USAGE $CPP_MAX_DEVICE_OBJ_TO_COMPILE_IN_PARALLEL $GIT_TAG $GIT_SSH_URL $GIT_HTTPS_URL $GIT_REPO $GIT_HOST $GIT_UPSTREAM $PIP_WHEEL_ARGS $PIP_INSTALL_ARGS' \
@@ -64,7 +64,7 @@ generate_script() {
6464

6565
generate_all_script_impl() {
6666
local bin="${PREFIX:-${SCRIPT}}-${SUFFIX:-all}";
67-
if test -n "${bin}" && ! test -f "${TMP_SCRIPT_DIR}/${bin}"; then
67+
if test -n "${bin:+x}" && ! test -f "${TMP_SCRIPT_DIR}/${bin}"; then
6868
(
6969
cat - \
7070
| envsubst '$NAME $NAMES $SCRIPT' \
@@ -158,7 +158,7 @@ generate_scripts() {
158158

159159
eval "$(rapids-list-repos "$@")";
160160

161-
if type devcontainer-utils-debug-output >/dev/null 2>&1; then
161+
if command -v devcontainer-utils-debug-output >/dev/null 2>&1; then
162162
# shellcheck disable=SC1091
163163
. devcontainer-utils-debug-output 'rapids_build_utils_debug' 'generate-scripts';
164164
fi

0 commit comments

Comments
 (0)