Skip to content

Commit

Permalink
Merge branch 'branch-24.02' of github.com:rapidsai/devcontainers into…
Browse files Browse the repository at this point in the history
… fix/llvm-alternatives
  • Loading branch information
trxcllnt committed Jan 3, 2024
2 parents b4045f5 + 5d3fa1d commit 2179b60
Show file tree
Hide file tree
Showing 29 changed files with 72 additions and 34 deletions.
2 changes: 1 addition & 1 deletion features/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
2 changes: 1 addition & 1 deletion features/src/cccl-dev/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
12 changes: 9 additions & 3 deletions features/src/cccl-dev/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ fi

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

CC=gcc CXX=g++ python -m pip install --upgrade pip
CC=gcc CXX=g++ python -m pip install wheel setuptools;
CC=gcc CXX=g++ python -m pip install psutil $LIT_VERSION_TO_INSTALL;
source /etc/lsb-release;

if [[ ! "23.04" > "${DISTRIB_RELEASE}" ]]; then
BREAK_PACKAGES="--break-system-packages"
fi

CC=gcc CXX=g++ python -m pip install $BREAK_PACKAGES --upgrade pip
CC=gcc CXX=g++ python -m pip install $BREAK_PACKAGES wheel setuptools;
CC=gcc CXX=g++ python -m pip install $BREAK_PACKAGES psutil $LIT_VERSION_TO_INSTALL;

export LIT_VERSION="$(lit --version | grep -o -e '[0-9].*')";

Expand Down
2 changes: 1 addition & 1 deletion features/src/cmake/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
2 changes: 1 addition & 1 deletion features/src/cuda/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
2 changes: 1 addition & 1 deletion features/src/cuda/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "CUDA Toolkit",
"id": "cuda",
"version": "24.2.1",
"version": "24.2.2",
"description": "A feature to install the NVIDIA CUDA Toolkit",
"options": {
"version": {
Expand Down
12 changes: 11 additions & 1 deletion features/src/cuda/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ check_packages \
echo "Downloading CUDA keyring...";

export NVARCH="$(uname -p)";
export OSNAME="$(. /etc/os-release; echo "$ID${VERSION_ID/./}")";
export OSNAME="$(
. /etc/os-release;
major="$(cut -d'.' -f1 <<< "${VERSION_ID}")";
minor="$(cut -d'.' -f2 <<< "${VERSION_ID}")";
echo "$ID$((major - (major % 2)))${minor}";
)";

VERSION="${CUDA_VERSION:-${VERSION:-12.2.0}}";

if [[ "$NVARCH" == aarch64 ]]; then
Expand All @@ -36,6 +42,10 @@ get_cuda_deb() {
| grep -P "^Filename: \./${2}(.*)\.deb$" \
| sort -Vr | head -n1 | cut -d' ' -f2 \
)";
if [ -z "$deb" ]; then
echo "Error: No matching .deb found for '${1}' and '${2}'" >&2
return 1
fi
wget --no-hsts -q -O "/tmp/${deb#./}" "${1}/${deb#./}";
echo -n "/tmp/${deb#./}";
}
Expand Down
2 changes: 1 addition & 1 deletion features/src/gcc/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
2 changes: 1 addition & 1 deletion features/src/gcc/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "GCC",
"id": "gcc",
"version": "24.2.0",
"version": "24.2.1",
"description": "A feature to install gcc",
"options": {
"version": {
Expand Down
1 change: 1 addition & 0 deletions features/src/gcc/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ GCC_VERSION="${VERSION:-${GCC_VERSION_DEFAULT}}";

if [[ "${GCC_VERSION}" != "${GCC_VERSION_DEFAULT}" ]]; then
apt-add-repository -y ppa:ubuntu-toolchain-r/test;
apt-add-repository -y ppa:ubuntu-toolchain-r/ppa;
# Install gcc-${GCC_VERSION}
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion features/src/gitlab-cli/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
2 changes: 1 addition & 1 deletion features/src/llvm/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
2 changes: 1 addition & 1 deletion features/src/mambaforge/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
2 changes: 1 addition & 1 deletion features/src/ninja/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
2 changes: 1 addition & 1 deletion features/src/nvhpc/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
2 changes: 1 addition & 1 deletion features/src/oneapi/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
2 changes: 1 addition & 1 deletion features/src/rapids-build-utils/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
2 changes: 1 addition & 1 deletion features/src/rust/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
2 changes: 1 addition & 1 deletion features/src/sccache/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
2 changes: 1 addition & 1 deletion features/src/ucx/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
Expand Down
2 changes: 1 addition & 1 deletion features/src/utils/common/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ find_non_root_user() {
USERNAME="${USERNAME:-"${_REMOTE_USER:-"auto"}"}";
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
POSSIBLE_USERS=("vscode" "node" "codespace" "coder" "$(awk -v val=1001 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
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": "24.2.1",
"version": "24.2.2",
"description": "A feature to install RAPIDS devcontainer utility scripts",
"containerEnv": {
"BASH_ENV": "/etc/bash.bash_env"
Expand Down
8 changes: 7 additions & 1 deletion features/src/utils/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@ check_packages \
bash-completion \
ca-certificates ;

source /etc/lsb-release;

if [[ ! "23.04" > "${DISTRIB_RELEASE}" ]]; then
BREAK_PACKAGES="--break-system-packages"
fi

# upgrade pip
if type python >/dev/null 2>&1; then
python -m pip install -U pip;
python -m pip install $BREAK_PACKAGES -U pip;
fi

# Install yq if not installed
Expand Down
4 changes: 2 additions & 2 deletions features/test/_global/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"image": "ubuntu:22.04",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"uid": "1000",
"gid": "1000",
"uid": "1001",
"gid": "1001",
"username": "coder",
"installZsh": "true",
"upgradePackages": "true"
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions features/test/oneapi/scenarios.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"oneapi_2023_2_0": {
"image": "ubuntu:22.04",
"features": {
"oneapi": {
"version": "2023.2.0"
}
}
}
}
12 changes: 6 additions & 6 deletions features/test/utils/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"uid": "1000",
"gid": "1000",
"uid": "1001",
"gid": "1001",
"username": "coder",
"installZsh": "true",
"upgradePackages": "true"
Expand Down Expand Up @@ -59,8 +59,8 @@
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"uid": "1000",
"gid": "1000",
"uid": "1001",
"gid": "1001",
"username": "coder",
"installZsh": "true",
"upgradePackages": "true"
Expand Down Expand Up @@ -105,8 +105,8 @@
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"uid": "1000",
"gid": "1000",
"uid": "1001",
"gid": "1001",
"username": "coder",
"installZsh": "true",
"upgradePackages": "true"
Expand Down
4 changes: 2 additions & 2 deletions image/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"workspaceFolder": "/home/coder",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"userUid": "1000",
"userGid": "1000",
"userUid": "1001",
"userGid": "1001",
"username": "coder",
"installZsh": "true",
"upgradePackages": "true"
Expand Down
5 changes: 5 additions & 0 deletions matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ include:
# llvm-cuda-nvhpc (needed by stdexec devcontainers)
- {features: [*llvm_curr, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *nvhpc_curr, *python]}

# Hack for getting gcc-13.2
- os: "ubuntu:23.04"
images:
- {features: [*gcc_13, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *gcc_env}

- os: "windows"
images:
# lowest CUDA version
Expand Down

0 comments on commit 2179b60

Please sign in to comment.