Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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/ucx/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "UCX",
"id": "ucx",
"version": "26.4.0",
"version": "26.4.1",
"description": "A feature to install UCX",
"options": {
"version": {
Expand Down
18 changes: 13 additions & 5 deletions features/src/ucx/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,17 @@ install_ucx_release() {
mkdir /tmp/ucx;
tar -C /tmp/ucx -xvjf /tmp/ucx.tar.bz2;
apt_get_update;
DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends /tmp/ucx/*.deb || true;
DEBIAN_FRONTEND=noninteractive apt-get -y --fix-broken install;
DEBIAN_FRONTEND=noninteractive apt-get -y autoremove;
# Remove `libnvidia-compute` from ucx-cuda dependencies
local ucx_cuda_deb="$(find /tmp/ucx/ -type f -name 'ucx-cuda*.deb' -print -quit)";
if test -n "${ucx_cuda_deb:+x}"; then
dpkg-deb -R "$ucx_cuda_deb" /tmp/ucx/ucx-cuda;
sed -i 's/libnvidia-compute | libnvidia-ml1.*, //g' /tmp/ucx/ucx-cuda/DEBIAN/control;
dpkg-deb -b /tmp/ucx/ucx-cuda "$ucx_cuda_deb"; # Rebuild
dpkg-deb -I "$ucx_cuda_deb";
fi
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends /tmp/ucx/*.deb || true;
DEBIAN_FRONTEND=noninteractive apt install -y --fix-broken;
DEBIAN_FRONTEND=noninteractive apt autoremove -y;
}

build_and_install_ucx() {
Expand Down Expand Up @@ -91,8 +99,8 @@ build_and_install_ucx() {
)

if test ${#PKG_TO_REMOVE[@]} -gt 0; then
DEBIAN_FRONTEND=noninteractive apt-get -y remove "${PKG_TO_REMOVE[@]}";
DEBIAN_FRONTEND=noninteractive apt-get -y autoremove;
DEBIAN_FRONTEND=noninteractive apt remove -y "${PKG_TO_REMOVE[@]}";
DEBIAN_FRONTEND=noninteractive apt autoremove -y;
fi
}

Expand Down
62 changes: 58 additions & 4 deletions features/test/ucx/scenarios.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
{
"ucx_v1.14.1_cuda": {
"ucx_v1.14.1_cuda_12.9": {
"image": "ubuntu:22.04",
"features": {
"cuda": {
"version": "12.9"
"version": "12.9",
"installCompilers": true,
"installProfilers": false,
"installCTKLibraries": false,
"installDevPackages": false,
"installNCCL": false,
"installCUDARuntime": true
},
"ucx": {
"version": "1.14.1"
Expand All @@ -14,11 +20,17 @@
"./ucx"
]
},
"ucx_v1.15.0-rc3_cuda": {
"ucx_v1.15.0-rc3_cuda_12.9": {
"image": "ubuntu:22.04",
"features": {
"cuda": {
"version": "12.9"
"version": "12.9",
"installCompilers": true,
"installProfilers": false,
"installCTKLibraries": false,
"installDevPackages": false,
"installNCCL": false,
"installCUDARuntime": true
},
"ucx": {
"version": "1.15.0-rc3"
Expand All @@ -28,5 +40,47 @@
"./cuda",
"./ucx"
]
},
"ucx_v1.19.0_cuda_12.9": {
"image": "ubuntu:22.04",
"features": {
"cuda": {
"version": "12.9",
"installCompilers": true,
"installProfilers": false,
"installCTKLibraries": false,
"installDevPackages": false,
"installNCCL": false,
"installCUDARuntime": true
},
"ucx": {
"version": "1.19.0"
}
},
"overrideFeatureInstallOrder": [
"./cuda",
"./ucx"
]
},
"ucx_v1.19.0_cuda_13.1": {
"image": "ubuntu:22.04",
"features": {
"cuda": {
"version": "13.1",
"installCompilers": true,
"installProfilers": false,
"installCTKLibraries": false,
"installDevPackages": false,
"installNCCL": false,
"installCUDARuntime": true
},
"ucx": {
"version": "1.19.0"
}
},
"overrideFeatureInstallOrder": [
"./cuda",
"./ucx"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ ucx_info -v;

check "ucx version" bash -c "echo '$UCX_VERSION' | grep '$(ucx_info -v | head -n1 | cut -d' ' -f4)'";

check "libnvidia-compute is not installed" bash -c "! dpkg -s libnvidia-compute";

# Report result
# If any of the checks above exited with a non-zero exit code, the test will fail.
reportResults
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ ucx_info -v;

check "ucx version" bash -c "echo '$UCX_VERSION' | grep '$(ucx_info -v | head -n1 | cut -d' ' -f4)'";

check "libnvidia-compute is not installed" bash -c "! dpkg -s libnvidia-compute";

# Report result
# If any of the checks above exited with a non-zero exit code, the test will fail.
reportResults
31 changes: 31 additions & 0 deletions features/test/ucx/ucx_v1.19.0_cuda_12.9.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#! /usr/bin/env bash

# This test can be run with the following command (from the root of this repo)
# ```
# npx --package=@devcontainers/cli -c 'devcontainer features test \
# --features cuda \
# --base-image ubuntu:22.04 .'
# ```

set -ex

# Optional: Import test library bundled with the devcontainer CLI
source dev-container-features-test-lib

>&2 echo "PATH=$PATH"
>&2 echo "BASH_ENV=$BASH_ENV"

# Feature-specific tests
# The 'check' command comes from the dev-container-features-test-lib.
check "ucx_info exists and is on path" which ucx_info

echo "UCX_VERSION: $UCX_VERSION";
ucx_info -v;

check "ucx version" bash -c "echo '$UCX_VERSION' | grep '$(ucx_info -v | head -n1 | cut -d' ' -f4)'";

check "libnvidia-compute is not installed" bash -c "! dpkg -s libnvidia-compute";

# Report result
# If any of the checks above exited with a non-zero exit code, the test will fail.
reportResults
31 changes: 31 additions & 0 deletions features/test/ucx/ucx_v1.19.0_cuda_13.1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#! /usr/bin/env bash

# This test can be run with the following command (from the root of this repo)
# ```
# npx --package=@devcontainers/cli -c 'devcontainer features test \
# --features cuda \
# --base-image ubuntu:22.04 .'
# ```

set -ex

# Optional: Import test library bundled with the devcontainer CLI
source dev-container-features-test-lib

>&2 echo "PATH=$PATH"
>&2 echo "BASH_ENV=$BASH_ENV"

# Feature-specific tests
# The 'check' command comes from the dev-container-features-test-lib.
check "ucx_info exists and is on path" which ucx_info

echo "UCX_VERSION: $UCX_VERSION";
ucx_info -v;

check "ucx version" bash -c "echo '$UCX_VERSION' | grep '$(ucx_info -v | head -n1 | cut -d' ' -f4)'";

check "libnvidia-compute is not installed" bash -c "! dpkg -s libnvidia-compute";

# Report result
# If any of the checks above exited with a non-zero exit code, the test will fail.
reportResults
Loading