diff --git a/.devcontainer/cuda11.8-conda/devcontainer.json b/.devcontainer/cuda11.8-conda/devcontainer.json new file mode 100644 index 00000000..7869a01a --- /dev/null +++ b/.devcontainer/cuda11.8-conda/devcontainer.json @@ -0,0 +1,100 @@ +{ + "shutdownAction": "stopContainer", + + "build": { + "context": "${localWorkspaceFolder}/.devcontainer", + "dockerfile": "${localWorkspaceFolder}/.devcontainer/rapids.Dockerfile", + "args": { + "CUDA": "11.8", + "PYTHON_PACKAGE_MANAGER": "conda", + "BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-mambaforge-ubuntu22.04" + } + }, + "hostRequirements": { + "gpu": true + }, + + "features": { + "./features/rapids-build-utils": {} + }, + + "overrideFeatureInstallOrder": [ + "./features/rapids-build-utils" + ], + + "initializeCommand": [ + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/unified} ${localWorkspaceFolder}/../{rmm,kvikio,cudf,raft,cumlprims_mg,cuml,cugraph-ops,cugraph,cuspatial}" + ], + + "updateContentCommand": [ + "/bin/bash", + "-c", + "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" + ], + + "workspaceFolder": "/home/coder", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/devcontainers,type=bind,consistency=consistent", + "mounts": [ + "source=${localWorkspaceFolder}/../rmm,target=/home/coder/rmm,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../kvikio,target=/home/coder/kvikio,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../cudf,target=/home/coder/cudf,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../raft,target=/home/coder/raft,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../cumlprims_mg,target=/home/coder/cumlprims_mg,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../cuml,target=/home/coder/cuml,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../cugraph-ops,target=/home/coder/cugraph-ops,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../cugraph,target=/home/coder/cugraph,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../cuspatial,target=/home/coder/cuspatial,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../.aws,target=/home/coder/.aws,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../.config,target=/home/coder/.config,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../.conda/pkgs,target=/home/coder/.conda/pkgs,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../.conda/unified,target=/home/coder/.conda/envs,type=bind,consistency=consistent" + ], + + "customizations": { + "vscode": { + "extensions": [ + "llvm-vs-code-extensions.vscode-clangd", + "mutantdino.resourcemonitor", + "ms-vscode.cpptools", + "nvidia.nsight-vscode-edition", + "seaube.clangformat", + "tamasfe.even-better-toml" + ], + "settings": { + "C_Cpp.vcpkg.enabled": false, + "C_Cpp.formatting": "disabled", + "C_Cpp.autocomplete": "disabled", + "C_Cpp.errorSquiggles": "disabled", + "C_Cpp.intelliSenseEngine": "disabled", + "C_Cpp.configurationWarnings": "disabled", + "C_Cpp.autoAddFileAssociations": false, + "clang-format.fallbackStyle": "none", + "files.trimFinalNewlines": true, + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "files.associations": { + "*.cu": "cuda-cpp", + "*.cuh": "cuda-cpp", + "**/libcudacxx/include/**/*": "cpp", + "**/libcudacxx-src/include/**/*": "cpp" + }, + "files.watcherExclude": { + "**/build/**": true, + "**/_skbuild/**": true, + "**/target/**": true + }, + "python.linting.flake8Enabled": true, + "[c]": { + "editor.defaultFormatter": "seaube.clangformat" + }, + "[cpp]": { + "editor.defaultFormatter": "seaube.clangformat" + }, + "[cuda-cpp]": { + "editor.defaultFormatter": "seaube.clangformat" + } + } + } + } +} diff --git a/.devcontainer/conda/features b/.devcontainer/cuda11.8-conda/features similarity index 100% rename from .devcontainer/conda/features rename to .devcontainer/cuda11.8-conda/features diff --git a/.devcontainer/cuda11.8-pip/devcontainer.json b/.devcontainer/cuda11.8-pip/devcontainer.json new file mode 100644 index 00000000..35be4955 --- /dev/null +++ b/.devcontainer/cuda11.8-pip/devcontainer.json @@ -0,0 +1,99 @@ +{ + "shutdownAction": "stopContainer", + + "build": { + "context": "${localWorkspaceFolder}/.devcontainer", + "dockerfile": "${localWorkspaceFolder}/.devcontainer/rapids.Dockerfile", + "args": { + "CUDA": "11.8", + "PYTHON_PACKAGE_MANAGER": "pip", + "BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-ubuntu22.04" + } + }, + "hostRequirements": { + "gpu": true + }, + + "features": { + "./features/rapids-build-utils": {} + }, + + "overrideFeatureInstallOrder": [ + "./features/rapids-build-utils" + ], + + "initializeCommand": [ + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/unified} ${localWorkspaceFolder}/../{rmm,kvikio,cudf,raft,cumlprims_mg,cuml,cugraph-ops,cugraph,cuspatial}" + ], + + "updateContentCommand": [ + "/bin/bash", + "-c", + "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" + ], + + "workspaceFolder": "/home/coder", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/devcontainers,type=bind,consistency=consistent", + "mounts": [ + "source=${localWorkspaceFolder}/../rmm,target=/home/coder/rmm,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../kvikio,target=/home/coder/kvikio,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../cudf,target=/home/coder/cudf,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../raft,target=/home/coder/raft,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../cumlprims_mg,target=/home/coder/cumlprims_mg,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../cuml,target=/home/coder/cuml,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../cugraph-ops,target=/home/coder/cugraph-ops,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../cugraph,target=/home/coder/cugraph,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../cuspatial,target=/home/coder/cuspatial,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../.aws,target=/home/coder/.aws,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../.config,target=/home/coder/.config,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../.local/unified,target=/home/coder/.local,type=bind,consistency=consistent" + ], + + "customizations": { + "vscode": { + "extensions": [ + "llvm-vs-code-extensions.vscode-clangd", + "mutantdino.resourcemonitor", + "ms-vscode.cpptools", + "nvidia.nsight-vscode-edition", + "seaube.clangformat", + "tamasfe.even-better-toml" + ], + "settings": { + "C_Cpp.vcpkg.enabled": false, + "C_Cpp.formatting": "disabled", + "C_Cpp.autocomplete": "disabled", + "C_Cpp.errorSquiggles": "disabled", + "C_Cpp.intelliSenseEngine": "disabled", + "C_Cpp.configurationWarnings": "disabled", + "C_Cpp.autoAddFileAssociations": false, + "clang-format.fallbackStyle": "none", + "files.trimFinalNewlines": true, + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "files.associations": { + "*.cu": "cuda-cpp", + "*.cuh": "cuda-cpp", + "**/libcudacxx/include/**/*": "cpp", + "**/libcudacxx-src/include/**/*": "cpp" + }, + "files.watcherExclude": { + "**/build/**": true, + "**/_skbuild/**": true, + "**/target/**": true + }, + "python.linting.flake8Enabled": true, + "[c]": { + "editor.defaultFormatter": "seaube.clangformat" + }, + "[cpp]": { + "editor.defaultFormatter": "seaube.clangformat" + }, + "[cuda-cpp]": { + "editor.defaultFormatter": "seaube.clangformat" + } + } + } + } +} diff --git a/.devcontainer/pip/features b/.devcontainer/cuda11.8-pip/features similarity index 100% rename from .devcontainer/pip/features rename to .devcontainer/cuda11.8-pip/features diff --git a/.devcontainer/conda/devcontainer.json b/.devcontainer/cuda12.0-conda/devcontainer.json similarity index 95% rename from .devcontainer/conda/devcontainer.json rename to .devcontainer/cuda12.0-conda/devcontainer.json index 477e6e1a..c1207c3c 100644 --- a/.devcontainer/conda/devcontainer.json +++ b/.devcontainer/cuda12.0-conda/devcontainer.json @@ -6,8 +6,8 @@ "dockerfile": "${localWorkspaceFolder}/.devcontainer/rapids.Dockerfile", "args": { "CUDA": "12.0", - "LLVM": "16", - "PYTHON_PACKAGE_MANAGER": "conda" + "PYTHON_PACKAGE_MANAGER": "conda", + "BASE": "rapidsai/devcontainers:23.10-cpp-mambaforge-ubuntu22.04" } }, "hostRequirements": { @@ -32,12 +32,8 @@ "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" ], - "containerEnv": { - "DEFAULT_CONDA_ENV": "rapids" - }, - "workspaceFolder": "/home/coder", - "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/devcontainers,type=bind,consistency=consistent", "mounts": [ "source=${localWorkspaceFolder}/../rmm,target=/home/coder/rmm,type=bind,consistency=consistent", "source=${localWorkspaceFolder}/../kvikio,target=/home/coder/kvikio,type=bind,consistency=consistent", diff --git a/.devcontainer/cuda12.0-conda/features b/.devcontainer/cuda12.0-conda/features new file mode 120000 index 00000000..ea1b95e2 --- /dev/null +++ b/.devcontainer/cuda12.0-conda/features @@ -0,0 +1 @@ +../../features/src \ No newline at end of file diff --git a/.devcontainer/pip/devcontainer.json b/.devcontainer/cuda12.0-pip/devcontainer.json similarity index 95% rename from .devcontainer/pip/devcontainer.json rename to .devcontainer/cuda12.0-pip/devcontainer.json index d31c8a08..4361dd35 100644 --- a/.devcontainer/pip/devcontainer.json +++ b/.devcontainer/cuda12.0-pip/devcontainer.json @@ -6,8 +6,8 @@ "dockerfile": "${localWorkspaceFolder}/.devcontainer/rapids.Dockerfile", "args": { "CUDA": "12.0", - "LLVM": "16", - "PYTHON_PACKAGE_MANAGER": "pip" + "PYTHON_PACKAGE_MANAGER": "pip", + "BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda12.0-ubuntu22.04" } }, "hostRequirements": { @@ -32,12 +32,8 @@ "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" ], - "containerEnv": { - "DEFAULT_VIRTUAL_ENV": "rapids" - }, - "workspaceFolder": "/home/coder", - "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/devcontainers,type=bind,consistency=consistent", "mounts": [ "source=${localWorkspaceFolder}/../rmm,target=/home/coder/rmm,type=bind,consistency=consistent", "source=${localWorkspaceFolder}/../kvikio,target=/home/coder/kvikio,type=bind,consistency=consistent", diff --git a/.devcontainer/cuda12.0-pip/features b/.devcontainer/cuda12.0-pip/features new file mode 120000 index 00000000..ea1b95e2 --- /dev/null +++ b/.devcontainer/cuda12.0-pip/features @@ -0,0 +1 @@ +../../features/src \ No newline at end of file diff --git a/.devcontainer/rapids.Dockerfile b/.devcontainer/rapids.Dockerfile index cd8c98f6..9d35e3f9 100644 --- a/.devcontainer/rapids.Dockerfile +++ b/.devcontainer/rapids.Dockerfile @@ -1,18 +1,15 @@ # syntax=docker/dockerfile:1.5 -ARG CUDA=12.0 -ARG LLVM=16 -ARG RAPIDS=23.10 -ARG DISTRO=ubuntu22.04 -ARG REPO=rapidsai/devcontainers - +ARG BASE ARG PYTHON_PACKAGE_MANAGER=conda -FROM ${REPO}:${RAPIDS}-cpp-llvm${LLVM}-cuda${CUDA}-${DISTRO} as pip-base +FROM ${BASE} as pip-base + +ENV DEFAULT_VIRTUAL_ENV=rapids -FROM ${REPO}:${RAPIDS}-cpp-mambaforge-${DISTRO} as conda-base +FROM ${BASE} as conda-base -COPY --from=pip-base /etc/skel/.config/clangd/config.yaml /etc/skel/.config/clangd/config.yaml +ENV DEFAULT_CONDA_ENV=rapids FROM ${PYTHON_PACKAGE_MANAGER}-base diff --git a/.github/workflows/build-and-push-image.yml b/.github/workflows/build-and-push-image.yml index 38199b42..3a48d201 100644 --- a/.github/workflows/build-and-push-image.yml +++ b/.github/workflows/build-and-push-image.yml @@ -95,11 +95,9 @@ jobs: hashes=(); for arch in "amd64" "arm64"; do - # Load the linux/$arch and tag the loaded image with the final name - docker image tag \ - $(docker load --input "${{ runner.temp }}/${arch}.tar" | tail -n1 | cut -d' ' -f3) \ - ${name}; - # Push the local image to the registry to get its remote hash and save the remote hash for use below + # Load the arch-specific image with the final name + docker load --input "${{ runner.temp }}/${arch}.tar"; + # Push the local image to the registry and save the remote hash hashes+=("$(docker push ${name} | tail -n1 | cut -d' ' -f3)"); done diff --git a/features/src/llvm/.clangd b/features/common/etc/skel/.config/clangd/config.yaml similarity index 100% rename from features/src/llvm/.clangd rename to features/common/etc/skel/.config/clangd/config.yaml diff --git a/features/common/install.sh b/features/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/common/install.sh +++ b/features/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/cmake/common/etc/skel/.config/clangd/config.yaml b/features/src/cmake/common/etc/skel/.config/clangd/config.yaml new file mode 100644 index 00000000..7d11148a --- /dev/null +++ b/features/src/cmake/common/etc/skel/.config/clangd/config.yaml @@ -0,0 +1,61 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/features/src/cmake/common/install.sh b/features/src/cmake/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/src/cmake/common/install.sh +++ b/features/src/cmake/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/cmake/devcontainer-feature.json b/features/src/cmake/devcontainer-feature.json index 1c558826..68232be3 100644 --- a/features/src/cmake/devcontainer-feature.json +++ b/features/src/cmake/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "CMake", "id": "cmake", - "version": "23.10.0", + "version": "23.10.1", "description": "A feature to install CMake", "options": { "version": { diff --git a/features/src/cuda/common/etc/skel/.config/clangd/config.yaml b/features/src/cuda/common/etc/skel/.config/clangd/config.yaml new file mode 100644 index 00000000..7d11148a --- /dev/null +++ b/features/src/cuda/common/etc/skel/.config/clangd/config.yaml @@ -0,0 +1,61 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/features/src/cuda/common/install.sh b/features/src/cuda/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/src/cuda/common/install.sh +++ b/features/src/cuda/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/cuda/devcontainer-feature.json b/features/src/cuda/devcontainer-feature.json index 2422a9ec..d2f08f18 100644 --- a/features/src/cuda/devcontainer-feature.json +++ b/features/src/cuda/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "CUDA Toolkit", "id": "cuda", - "version": "23.10.0", + "version": "23.10.1", "description": "A feature to install the NVIDIA CUDA Toolkit", "options": { "version": { diff --git a/features/src/gcc/common/etc/skel/.config/clangd/config.yaml b/features/src/gcc/common/etc/skel/.config/clangd/config.yaml new file mode 100644 index 00000000..7d11148a --- /dev/null +++ b/features/src/gcc/common/etc/skel/.config/clangd/config.yaml @@ -0,0 +1,61 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/features/src/gcc/common/install.sh b/features/src/gcc/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/src/gcc/common/install.sh +++ b/features/src/gcc/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/gcc/devcontainer-feature.json b/features/src/gcc/devcontainer-feature.json index 988257ce..00f89297 100644 --- a/features/src/gcc/devcontainer-feature.json +++ b/features/src/gcc/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "GCC", "id": "gcc", - "version": "23.10.0", + "version": "23.10.1", "description": "A feature to install gcc", "options": { "version": { diff --git a/features/src/gitlab-cli/common/etc/skel/.config/clangd/config.yaml b/features/src/gitlab-cli/common/etc/skel/.config/clangd/config.yaml new file mode 100644 index 00000000..7d11148a --- /dev/null +++ b/features/src/gitlab-cli/common/etc/skel/.config/clangd/config.yaml @@ -0,0 +1,61 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/features/src/gitlab-cli/common/install.sh b/features/src/gitlab-cli/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/src/gitlab-cli/common/install.sh +++ b/features/src/gitlab-cli/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/gitlab-cli/devcontainer-feature.json b/features/src/gitlab-cli/devcontainer-feature.json index 7763624a..234ef1f5 100644 --- a/features/src/gitlab-cli/devcontainer-feature.json +++ b/features/src/gitlab-cli/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "gitlab-cli", - "version": "23.10.0", + "version": "23.10.1", "name": "GitLab CLI", "documentationURL": "https://github.com/rapidsai/devcontainers/features/tree/main/src/gitlab-cli", "description": "Installs the GitLab CLI. Auto-detects latest version and installs needed dependencies.", diff --git a/features/src/llvm/common/etc/skel/.config/clangd/config.yaml b/features/src/llvm/common/etc/skel/.config/clangd/config.yaml new file mode 100644 index 00000000..7d11148a --- /dev/null +++ b/features/src/llvm/common/etc/skel/.config/clangd/config.yaml @@ -0,0 +1,61 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/features/src/llvm/common/install.sh b/features/src/llvm/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/src/llvm/common/install.sh +++ b/features/src/llvm/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/llvm/devcontainer-feature.json b/features/src/llvm/devcontainer-feature.json index 992e42ae..7b583968 100644 --- a/features/src/llvm/devcontainer-feature.json +++ b/features/src/llvm/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "LLVM compilers and tools", "id": "llvm", - "version": "23.10.0", + "version": "23.10.1", "description": "A feature to install LLVM compilers and tools", "options": { "version": { diff --git a/features/src/llvm/install.sh b/features/src/llvm/install.sh index bc9737ff..7655d717 100755 --- a/features/src/llvm/install.sh +++ b/features/src/llvm/install.sh @@ -85,10 +85,6 @@ append_to_all_bashrcs "$(cat .bashrc | envsubst)"; # export envvars in /etc/profile.d add_etc_profile_d_script llvm "$(cat .bashrc | envsubst)"; -# Copy clangd config into etc/skel -mkdir -p -m 0755 /etc/skel/.config/clangd/; -cp .clangd /etc/skel/.config/clangd/config.yaml; - # Clean up # rm -rf /tmp/*; rm -rf /var/tmp/*; diff --git a/features/src/mambaforge/common/etc/skel/.config/clangd/config.yaml b/features/src/mambaforge/common/etc/skel/.config/clangd/config.yaml new file mode 100644 index 00000000..7d11148a --- /dev/null +++ b/features/src/mambaforge/common/etc/skel/.config/clangd/config.yaml @@ -0,0 +1,61 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/features/src/mambaforge/common/install.sh b/features/src/mambaforge/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/src/mambaforge/common/install.sh +++ b/features/src/mambaforge/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/mambaforge/devcontainer-feature.json b/features/src/mambaforge/devcontainer-feature.json index 0bfc113b..c72de744 100644 --- a/features/src/mambaforge/devcontainer-feature.json +++ b/features/src/mambaforge/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "Mambaforge", "id": "mambaforge", - "version": "23.10.0", + "version": "23.10.1", "description": "A feature to install mambaforge", "options": { "version": { diff --git a/features/src/ninja/common/etc/skel/.config/clangd/config.yaml b/features/src/ninja/common/etc/skel/.config/clangd/config.yaml new file mode 100644 index 00000000..7d11148a --- /dev/null +++ b/features/src/ninja/common/etc/skel/.config/clangd/config.yaml @@ -0,0 +1,61 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/features/src/ninja/common/install.sh b/features/src/ninja/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/src/ninja/common/install.sh +++ b/features/src/ninja/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/ninja/devcontainer-feature.json b/features/src/ninja/devcontainer-feature.json index dce7318a..435a2795 100644 --- a/features/src/ninja/devcontainer-feature.json +++ b/features/src/ninja/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "Ninja build", "id": "ninja", - "version": "23.10.0", + "version": "23.10.1", "description": "A feature to install ninja-build", "options": { "version": { diff --git a/features/src/nvhpc/common/etc/skel/.config/clangd/config.yaml b/features/src/nvhpc/common/etc/skel/.config/clangd/config.yaml new file mode 100644 index 00000000..7d11148a --- /dev/null +++ b/features/src/nvhpc/common/etc/skel/.config/clangd/config.yaml @@ -0,0 +1,61 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/features/src/nvhpc/common/install.sh b/features/src/nvhpc/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/src/nvhpc/common/install.sh +++ b/features/src/nvhpc/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/nvhpc/devcontainer-feature.json b/features/src/nvhpc/devcontainer-feature.json index 7ffb0175..4eafbf6c 100644 --- a/features/src/nvhpc/devcontainer-feature.json +++ b/features/src/nvhpc/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "NVHPC SDK", "id": "nvhpc", - "version": "23.10.0", + "version": "23.10.1", "description": "A feature to install the NVHPC SDK", "options": { "version": { diff --git a/features/src/oneapi/common/etc/skel/.config/clangd/config.yaml b/features/src/oneapi/common/etc/skel/.config/clangd/config.yaml new file mode 100644 index 00000000..7d11148a --- /dev/null +++ b/features/src/oneapi/common/etc/skel/.config/clangd/config.yaml @@ -0,0 +1,61 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/features/src/oneapi/common/install.sh b/features/src/oneapi/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/src/oneapi/common/install.sh +++ b/features/src/oneapi/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/oneapi/devcontainer-feature.json b/features/src/oneapi/devcontainer-feature.json index a8e7a849..65a14e33 100644 --- a/features/src/oneapi/devcontainer-feature.json +++ b/features/src/oneapi/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "Intel oneapi toolchain", "id": "oneapi", - "version": "23.10.0", + "version": "23.10.1", "description": "A feature to install the Intel oneapi toolchain", "options": { "version": { diff --git a/features/src/python-lit/common/etc/skel/.config/clangd/config.yaml b/features/src/python-lit/common/etc/skel/.config/clangd/config.yaml new file mode 100644 index 00000000..7d11148a --- /dev/null +++ b/features/src/python-lit/common/etc/skel/.config/clangd/config.yaml @@ -0,0 +1,61 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/features/src/python-lit/common/install.sh b/features/src/python-lit/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/src/python-lit/common/install.sh +++ b/features/src/python-lit/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/python-lit/devcontainer-feature.json b/features/src/python-lit/devcontainer-feature.json index 42d2c5e3..88038cd6 100644 --- a/features/src/python-lit/devcontainer-feature.json +++ b/features/src/python-lit/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "python-lit testing framework", "id": "python-lit", - "version": "23.10.0", + "version": "23.10.1", "description": "A feature to install python-lit", "options": { "version": { diff --git a/features/src/rapids-build-utils/common/etc/skel/.config/clangd/config.yaml b/features/src/rapids-build-utils/common/etc/skel/.config/clangd/config.yaml new file mode 100644 index 00000000..7d11148a --- /dev/null +++ b/features/src/rapids-build-utils/common/etc/skel/.config/clangd/config.yaml @@ -0,0 +1,61 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/features/src/rapids-build-utils/common/install.sh b/features/src/rapids-build-utils/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/src/rapids-build-utils/common/install.sh +++ b/features/src/rapids-build-utils/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/rapids-build-utils/devcontainer-feature.json b/features/src/rapids-build-utils/devcontainer-feature.json index fb07e14c..3e8268d7 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": "23.10.1", + "version": "23.10.2", "description": "A feature to install the RAPIDS devcontainer build utilities", "containerEnv": { "BASH_ENV": "/etc/bash.bash_env" diff --git a/features/src/rust/common/etc/skel/.config/clangd/config.yaml b/features/src/rust/common/etc/skel/.config/clangd/config.yaml new file mode 100644 index 00000000..7d11148a --- /dev/null +++ b/features/src/rust/common/etc/skel/.config/clangd/config.yaml @@ -0,0 +1,61 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/features/src/rust/common/install.sh b/features/src/rust/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/src/rust/common/install.sh +++ b/features/src/rust/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/rust/devcontainer-feature.json b/features/src/rust/devcontainer-feature.json index d4621fcc..b078d5bf 100644 --- a/features/src/rust/devcontainer-feature.json +++ b/features/src/rust/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "rust", - "version": "23.10.0", + "version": "23.10.1", "name": "Rust", "documentationURL": "https://github.com/rapidsai/devcontainers/features/tree/main/src/rust", "description": "Installs Rust, common Rust utilities, and their required dependencies", diff --git a/features/src/sccache/common/etc/skel/.config/clangd/config.yaml b/features/src/sccache/common/etc/skel/.config/clangd/config.yaml new file mode 100644 index 00000000..7d11148a --- /dev/null +++ b/features/src/sccache/common/etc/skel/.config/clangd/config.yaml @@ -0,0 +1,61 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/features/src/sccache/common/install.sh b/features/src/sccache/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/src/sccache/common/install.sh +++ b/features/src/sccache/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/sccache/devcontainer-feature.json b/features/src/sccache/devcontainer-feature.json index e122385d..1d464e97 100644 --- a/features/src/sccache/devcontainer-feature.json +++ b/features/src/sccache/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "sccache", "id": "sccache", - "version": "23.10.0", + "version": "23.10.1", "description": "A feature to install sccache", "options": { "version": { diff --git a/features/src/utils/common/etc/skel/.config/clangd/config.yaml b/features/src/utils/common/etc/skel/.config/clangd/config.yaml new file mode 100644 index 00000000..7d11148a --- /dev/null +++ b/features/src/utils/common/etc/skel/.config/clangd/config.yaml @@ -0,0 +1,61 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/features/src/utils/common/install.sh b/features/src/utils/common/install.sh index 217d4548..aadbfc32 100755 --- a/features/src/utils/common/install.sh +++ b/features/src/utils/common/install.sh @@ -11,6 +11,8 @@ src="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # export bash utility functions source "$src/utilities.sh"; +# install /etc/skel +cp -r "$src/etc/skel" /etc/; # install /etc/bash.bash_env cp "$src/etc/bash.bash_env" /etc/; chown root:root /etc/bash.bash_env; diff --git a/features/src/utils/devcontainer-feature.json b/features/src/utils/devcontainer-feature.json index 1d73136d..41481ba0 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": "23.10.1", + "version": "23.10.2", "description": "A feature to install RAPIDS devcontainer utility scripts", "containerEnv": { "BASH_ENV": "/etc/bash.bash_env" diff --git a/features/src/utils/opt/devcontainer/bin/github/cli/init.sh b/features/src/utils/opt/devcontainer/bin/github/cli/init.sh index fd9f65d0..935614c8 100755 --- a/features/src/utils/opt/devcontainer/bin/github/cli/init.sh +++ b/features/src/utils/opt/devcontainer/bin/github/cli/init.sh @@ -39,10 +39,10 @@ init_github_cli() { local needed_scopes="read:org"; - needed_scopes="$( \ - comm -23 \ - <(echo -n "${needed_scopes}" | xargs -r -n1 -d' ' echo | sort) \ - <(echo -n "${active_scopes}" | xargs -r -n1 -d' ' echo | sort) \ + needed_scopes="$( \ + comm -23 \ + <(echo -n "${needed_scopes}" | xargs -r -n1 -d' ' echo | sort -s) \ + <(echo -n "${active_scopes}" | xargs -r -n1 -d' ' echo | sort -s) \ )"; if [ -n "${needed_scopes}" ]; then diff --git a/features/src/utils/opt/devcontainer/bin/vault/auth/github.sh b/features/src/utils/opt/devcontainer/bin/vault/auth/github.sh index c07b2cda..dc62cfa0 100755 --- a/features/src/utils/opt/devcontainer/bin/vault/auth/github.sh +++ b/features/src/utils/opt/devcontainer/bin/vault/auth/github.sh @@ -8,19 +8,23 @@ get_vault_token() { local VAULT_HOST="$1"; local user_orgs="${@:2}"; local gh_token="$(gh auth token)"; - local org - local vault_token=null; + local org; for org in ${user_orgs}; do - vault_token="$( \ - curl -s \ - -X POST \ - -H "Content-Type: application/json" \ - -d "{\"token\": \"$gh_token\"}" \ - "$VAULT_HOST/v1/auth/github-${org}/login" \ - | jq -r '.auth.client_token' \ - )"; + for org in $(echo -e "${org}\n${org,,}\n${org^^}" | sort -su); do + vault_token="$( \ + curl -s \ + -X POST \ + -H "Content-Type: application/json" \ + -d "{\"token\": \"$gh_token\"}" \ + "$VAULT_HOST/v1/auth/github-${org}/login" \ + | jq -r '.auth.client_token' \ + )"; + if [[ "${vault_token:-null}" != null ]]; then + break; + fi + done if [[ "${vault_token:-null}" != null ]]; then break; fi @@ -29,4 +33,8 @@ get_vault_token() { echo "vault_token='$vault_token'"; } +if test -n "${devcontainer_utils_debug:-}"; then + PS4="+ ${BASH_SOURCE[0]}:\${LINENO} "; set -x; +fi + (get_vault_token "$@"); diff --git a/features/src/utils/opt/devcontainer/bin/vault/s3/creds/generate.sh b/features/src/utils/opt/devcontainer/bin/vault/s3/creds/generate.sh index 1907a123..0294c471 100755 --- a/features/src/utils/opt/devcontainer/bin/vault/s3/creds/generate.sh +++ b/features/src/utils/opt/devcontainer/bin/vault/s3/creds/generate.sh @@ -37,7 +37,7 @@ generate_s3_creds() { local user_orgs="$( \ gh api user/orgs --jq '.[].login' \ -H "Accept: application/vnd.github+json" \ - | grep --color=never -E "(${allowed_orgs})" \ + | grep --color=never -iE "(${allowed_orgs})" \ )"; if test -z "${user_orgs:-}"; then