From 9adc9a920fdcee362e408c4ddf8e9abcd499f88b Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 17 Jul 2023 10:11:17 -0700 Subject: [PATCH 01/43] add devcontainers --- .devcontainer/Dockerfile | 27 +++++ .devcontainer/README.md | 103 ++++++++++++++++++ .devcontainer/conda/devcontainer.json | 60 ++++++++++ .../isolated/.devcontainer/devcontainer.json | 63 +++++++++++ .../single/.devcontainer/devcontainer.json | 1 + .../unified/.devcontainer/devcontainer.json | 62 +++++++++++ .devcontainer/devcontainer.json | 60 ++++++++++ .devcontainer/launch.sh | 52 +++++++++ .devcontainer/pip/devcontainer.json | 61 +++++++++++ .../isolated/.devcontainer/devcontainer.json | 62 +++++++++++ .../single/.devcontainer/devcontainer.json | 1 + .../unified/.devcontainer/devcontainer.json | 61 +++++++++++ 12 files changed, 613 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/README.md create mode 100644 .devcontainer/conda/devcontainer.json create mode 100644 .devcontainer/conda/isolated/.devcontainer/devcontainer.json create mode 120000 .devcontainer/conda/single/.devcontainer/devcontainer.json create mode 100644 .devcontainer/conda/unified/.devcontainer/devcontainer.json create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/launch.sh create mode 100644 .devcontainer/pip/devcontainer.json create mode 100644 .devcontainer/pip/isolated/.devcontainer/devcontainer.json create mode 120000 .devcontainer/pip/single/.devcontainer/devcontainer.json create mode 100644 .devcontainer/pip/unified/.devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000..71e229a459 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,27 @@ +# syntax=docker/dockerfile:1.5 + +ARG CUDA=12.0 +ARG LLVM=16 +ARG RAPIDS=23.08 +ARG DISTRO=ubuntu22.04 +ARG REPO=rapidsai/devcontainers + +ARG PYTHON_PACKAGE_MANAGER=conda + +FROM ${REPO}:${RAPIDS}-cpp-llvm${LLVM}-cuda${CUDA}-${DISTRO} as pip-base + +FROM ${REPO}:${RAPIDS}-cpp-llvm${LLVM}-cuda${CUDA}-mambaforge-${DISTRO} as conda-base + +FROM ${PYTHON_PACKAGE_MANAGER}-base + +ARG PYTHON_PACKAGE_MANAGER +ENV PYTHON_PACKAGE_MANAGER="${PYTHON_PACKAGE_MANAGER}" + +ENV PYTHONSAFEPATH="1" +ENV PYTHONUNBUFFERED="1" +ENV PYTHONDONTWRITEBYTECODE="1" + +ENV SCCACHE_REGION="us-east-2" +ENV SCCACHE_BUCKET="rapids-sccache-devs" +ENV VAULT_HOST="https://vault.ops.k8s.rapids.ai" +ENV HISTFILE="/home/coder/.cache/._bash_history" diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 0000000000..7f7dc3e38a --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,103 @@ +# cuML Development Containers + +This directory contains [devcontainer configurations](https://containers.dev/implementors/json_reference/) for using VSCode to [develop in a container](https://code.visualstudio.com/docs/devcontainers/containers) via the `Remote Containers` [extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) or [GitHub Codespaces](https://github.com/codespaces). + +This container is a turnkey development environment for building and testing the cuML C++ and Python libraries. + +## Table of Contents + +* [Prerequisites](#prerequisites) +* [Host bind mounts](#host-bind-mounts) +* [Launch a Dev Container](#launch-a-dev-container) + * [via VSCode](#via-vscode) + * [via `launch.sh`](#via-launchsh) + * [Single mode](#single-mode) + * [Unified mode](#unified-mode) + * [Isolated mode](#isolated-mode) + +## Prerequisites + +* [VSCode](https://code.visualstudio.com/download) +* [VSCode Remote Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) + +## Host bind mounts + +By default, the following directories are bind-mounted into the devcontainer: + +* `${repo}:/home/coder/cuml` +* `${repo}/../.aws:/home/coder/.aws` +* `${repo}/../.local:/home/coder/.local` +* `${repo}/../.cache:/home/coder/.cache` +* `${repo}/../.conda:/home/coder/.conda` +* `${repo}/../.config:/home/coder/.config` + +This ensures caches, configurations, dependencies, and your commits are persisted on the host across container runs. + +## Launch a Dev Container + +A devcontainer can be launched directly by VSCode, or via a custom `launch.sh` shell script. + +### via VSCode + +To launch a devcontainer from VSCode, open the cuML repo and select the "Reopen in Container" button in the bottom right:
+ +Alternatively, open the VSCode command palette (typically `cmd/ctrl + shift + P`) and run the "Rebuild and Reopen in Container" command. + +### via `launch.sh` + +Use the `.devcontainer/launch.sh` script to start a new instance of the development container and launch a fresh VSCode window connected to it. + +VSCode extends its [single-window-per-folder](https://github.com/microsoft/vscode/issues/2686) process model to devcontainers. Opening the same devcontainer in separate windows doesn't create two separate containers -- instead you have two VSCode windows each connected to the same running container. + +`launch.sh` takes two arguments, a `mode` and a `package manager`. + +* The `mode` argument determines how the devcontainer interacts with the files on the host. +* The `package manager` argument can be either `conda`, or `pip`. This determines whether the devcontainer uses `conda` or `pip` to install the dependencies (the default is `conda`). `pip` is experimental/not working for normal dev, and is currently meant to aid in pip packaging work. + +#### Single mode + +`.devcontainer/launch.sh single` launches the devcontainer with the [default bind mounts](#host-bind-mounts). RMM and cuDF are installed via the package manager. + +Example: +```bash +# Launch a devcontainer that only mounts cuml and installs dependencies via conda +$ .devcontainer/launch.sh single conda + +# or installs dependencies via pip +$ .devcontainer/launch.sh single pip +``` + +#### Unified mode + +`.devcontainer/launch.sh unified` launches the devcontainer with the [default bind mounts](#host-bind-mounts), as well as additional `rmm` and `cudf` bind mounts (assumes RMM and cuDF are siblings to the cuml repository): + +* `${repo}/../.rmm:/home/coder/rmm` +* `${repo}/../.cudf:/home/coder/cudf` + +In this mode, RMM and cuDF will not be installed, but the devcontainer will install the dependencies necessary to build all three. + +Example: +```bash +# Launch a devcontainer that mounts rmm, cudf, and cuml from the host and installs dependencies via conda +$ .devcontainer/launch.sh unified conda + +# or installs dependencies via pip +$ .devcontainer/launch.sh unified pip +``` + +#### Isolated mode + +`.devcontainer/launch.sh isolated` launches the devcontainer without the deps/repo bind mounts, and instead contains a unique copy of the `cuml` source in the container's file system. + +Use this mode to launch multiple isolated development containers that can be checked out to separate branches of `cuml`. + +**Be sure to push any commits you want to persist. Once this container is removed, any unpushed changes will be lost!** + +Examples: +```bash +# Launch a devcontainer that is isolated from changes on the host and installs dependencies via conda +$ .devcontainer/launch.sh isolated conda + +# or installs dependencies via pip +$ .devcontainer/launch.sh isolated pip +``` diff --git a/.devcontainer/conda/devcontainer.json b/.devcontainer/conda/devcontainer.json new file mode 100644 index 0000000000..67fb669795 --- /dev/null +++ b/.devcontainer/conda/devcontainer.json @@ -0,0 +1,60 @@ +{ + "shutdownAction": "stopContainer", + + "build": { + "context": "${localWorkspaceFolder}/.devcontainer", + "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", + "args": { + "CUDA": "12.0", + "LLVM": "16", + "PYTHON_PACKAGE_MANAGER": "conda" + } + }, + "hostRequirements": { + "gpu": true + }, + + "features": { + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + }, + + "overrideFeatureInstallOrder": [ + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" + ], + + "initializeCommand": [ + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}/single}" + ], + + "containerEnv": { + "DEFAULT_CONDA_ENV": "rapids" + }, + + "workspaceFolder": "/home/coder", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "mounts": [ + "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/${localWorkspaceFolderBasename}/single,target=/home/coder/.conda/envs,type=bind,consistency=consistent" + ], + + "customizations": { + "vscode": { + "extensions": [ + "mutantdino.resourcemonitor", + "tamasfe.even-better-toml" + ], + "settings": { + "files.trimFinalNewlines": true, + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "files.watcherExclude": { + "**/target/**": true + }, + "python.linting.flake8Enabled": true + } + } + } +} diff --git a/.devcontainer/conda/isolated/.devcontainer/devcontainer.json b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..2f611de372 --- /dev/null +++ b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json @@ -0,0 +1,63 @@ +{ + "shutdownAction": "stopContainer", + + "build": { + "context": "${localWorkspaceFolder}/.devcontainer", + "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", + "args": { + "CUDA": "12.0", + "LLVM": "16", + "PYTHON_PACKAGE_MANAGER": "conda" + } + }, + "hostRequirements": { + "gpu": true + }, + + "features": { + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + }, + + "overrideFeatureInstallOrder": [ + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" + ], + + "initializeCommand": [ + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs}" + ], + + "updateContentCommand": [ + "/bin/bash", "-c", "cp -ar /workspaces/${localWorkspaceFolderBasename} /home/coder/${localWorkspaceFolderBasename} && rapids-make-vscode-workspace --update" + ], + + "containerEnv": { + "DEFAULT_CONDA_ENV": "rapids" + }, + + "workspaceFolder": "/home/coder", + "workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "mounts": [ + "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" + ], + + "customizations": { + "vscode": { + "extensions": [ + "mutantdino.resourcemonitor", + "tamasfe.even-better-toml" + ], + "settings": { + "files.trimFinalNewlines": true, + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "files.watcherExclude": { + "**/target/**": true + }, + "python.linting.flake8Enabled": true + } + } + } +} diff --git a/.devcontainer/conda/single/.devcontainer/devcontainer.json b/.devcontainer/conda/single/.devcontainer/devcontainer.json new file mode 120000 index 0000000000..cec0647b20 --- /dev/null +++ b/.devcontainer/conda/single/.devcontainer/devcontainer.json @@ -0,0 +1 @@ +../../devcontainer.json \ No newline at end of file diff --git a/.devcontainer/conda/unified/.devcontainer/devcontainer.json b/.devcontainer/conda/unified/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..3a4015fe6a --- /dev/null +++ b/.devcontainer/conda/unified/.devcontainer/devcontainer.json @@ -0,0 +1,62 @@ +{ + "shutdownAction": "stopContainer", + + "build": { + "context": "${localWorkspaceFolder}/.devcontainer", + "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", + "args": { + "CUDA": "12.0", + "LLVM": "16", + "PYTHON_PACKAGE_MANAGER": "conda" + } + }, + "hostRequirements": { + "gpu": true + }, + + "features": { + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + }, + + "overrideFeatureInstallOrder": [ + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" + ], + + "initializeCommand": [ + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}/unified}" + ], + + "containerEnv": { + "DEFAULT_CONDA_ENV": "rapids" + }, + + "workspaceFolder": "/home/coder", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "mounts": [ + "source=${localWorkspaceFolder}/../rmm,target=/home/coder/rmm,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../cudf,target=/home/coder/cudf,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/${localWorkspaceFolderBasename}/unified,target=/home/coder/.conda/envs,type=bind,consistency=consistent" + ], + + "customizations": { + "vscode": { + "extensions": [ + "mutantdino.resourcemonitor", + "tamasfe.even-better-toml" + ], + "settings": { + "files.trimFinalNewlines": true, + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "files.watcherExclude": { + "**/target/**": true + }, + "python.linting.flake8Enabled": true + } + } + } +} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..67fb669795 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,60 @@ +{ + "shutdownAction": "stopContainer", + + "build": { + "context": "${localWorkspaceFolder}/.devcontainer", + "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", + "args": { + "CUDA": "12.0", + "LLVM": "16", + "PYTHON_PACKAGE_MANAGER": "conda" + } + }, + "hostRequirements": { + "gpu": true + }, + + "features": { + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + }, + + "overrideFeatureInstallOrder": [ + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" + ], + + "initializeCommand": [ + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}/single}" + ], + + "containerEnv": { + "DEFAULT_CONDA_ENV": "rapids" + }, + + "workspaceFolder": "/home/coder", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "mounts": [ + "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/${localWorkspaceFolderBasename}/single,target=/home/coder/.conda/envs,type=bind,consistency=consistent" + ], + + "customizations": { + "vscode": { + "extensions": [ + "mutantdino.resourcemonitor", + "tamasfe.even-better-toml" + ], + "settings": { + "files.trimFinalNewlines": true, + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "files.watcherExclude": { + "**/target/**": true + }, + "python.linting.flake8Enabled": true + } + } + } +} diff --git a/.devcontainer/launch.sh b/.devcontainer/launch.sh new file mode 100755 index 0000000000..60bc3e38ad --- /dev/null +++ b/.devcontainer/launch.sh @@ -0,0 +1,52 @@ +#! /usr/bin/env bash + +launch_devcontainer() { + + # Ensure we're in the repo root + cd "$( cd "$( dirname "$(realpath -m "${BASH_SOURCE[0]}")" )" && pwd )/.."; + + local mode="${1:-single}"; + local pkgs="${2:-conda}"; + + case "${pkgs}" in + pip ) ;; + conda ) ;; + * ) pkgs="conda";; + esac + + case "${mode}" in + single ) ;; + unified ) ;; + isolated) ;; + * ) mode="single";; + esac + + local flavor="${pkgs}/${mode}"; + local workspace="$(basename "$(pwd)")"; + local tmpdir="$(mktemp -d)/${workspace}"; + local path="$(pwd)/.devcontainer/${flavor}"; + + mkdir -p "${tmpdir}"; + cp -arL "$path/.devcontainer" "${tmpdir}/"; + sed -i "s@\${localWorkspaceFolder}@$(pwd)@g" "${tmpdir}/.devcontainer/devcontainer.json"; + path="${tmpdir}"; + + local hash="$(echo -n "${path}" | xxd -pu - | tr -d '[:space:]')"; + local url="vscode://vscode-remote/dev-container+${hash}/home/coder"; + + echo "devcontainer URL: ${url}"; + + local launch=""; + if type open >/dev/null 2>&1; then + launch="open"; + elif type xdg-open >/dev/null 2>&1; then + launch="xdg-open"; + fi + + if [ -n "${launch}" ]; then + code --new-window "${tmpdir}"; + exec "${launch}" "${url}" >/dev/null 2>&1; + fi +} + +launch_devcontainer "$@"; diff --git a/.devcontainer/pip/devcontainer.json b/.devcontainer/pip/devcontainer.json new file mode 100644 index 0000000000..b90c425a11 --- /dev/null +++ b/.devcontainer/pip/devcontainer.json @@ -0,0 +1,61 @@ +{ + "shutdownAction": "stopContainer", + + "build": { + "context": "${localWorkspaceFolder}/.devcontainer", + "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", + "args": { + "CUDA": "12.0", + "LLVM": "16", + "PYTHON_PACKAGE_MANAGER": "pip" + } + }, + "hostRequirements": { + "gpu": true + }, + + "features": { + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + }, + + "overrideFeatureInstallOrder": [ + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" + ], + + "initializeCommand": [ + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/${localWorkspaceFolderBasename}/single}" + ], + + "containerEnv": { + "PYTHONSAFEPATH": "true", + "PYTHONUNBUFFERED": "true", + "DEFAULT_VIRTUAL_ENV": "rapids" + }, + + "workspaceFolder": "/home/coder", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "mounts": [ + "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/${localWorkspaceFolderBasename}/single,target=/home/coder/.local,type=bind,consistency=consistent" + ], + + "customizations": { + "vscode": { + "extensions": [ + "mutantdino.resourcemonitor", + "tamasfe.even-better-toml" + ], + "settings": { + "files.trimFinalNewlines": true, + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "files.watcherExclude": { + "**/target/**": true + }, + "python.linting.flake8Enabled": true + } + } + } +} diff --git a/.devcontainer/pip/isolated/.devcontainer/devcontainer.json b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..b65eb44876 --- /dev/null +++ b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json @@ -0,0 +1,62 @@ +{ + "shutdownAction": "stopContainer", + + "build": { + "context": "${localWorkspaceFolder}/.devcontainer", + "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", + "args": { + "CUDA": "12.0", + "LLVM": "16", + "PYTHON_PACKAGE_MANAGER": "pip" + } + }, + "hostRequirements": { + "gpu": true + }, + + "features": { + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + }, + + "overrideFeatureInstallOrder": [ + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" + ], + + "initializeCommand": [ + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip}" + ], + + "updateContentCommand": [ + "/bin/bash", "-c", "cp -ar /workspaces/${localWorkspaceFolderBasename} /home/coder/${localWorkspaceFolderBasename} && rapids-make-vscode-workspace --update" + ], + + "containerEnv": { + "DEFAULT_VIRTUAL_ENV": "rapids" + }, + + "workspaceFolder": "/home/coder", + "workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "mounts": [ + "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" + ], + + "customizations": { + "vscode": { + "extensions": [ + "mutantdino.resourcemonitor", + "tamasfe.even-better-toml" + ], + "settings": { + "files.trimFinalNewlines": true, + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "files.watcherExclude": { + "**/target/**": true + }, + "python.linting.flake8Enabled": true + } + } + } +} diff --git a/.devcontainer/pip/single/.devcontainer/devcontainer.json b/.devcontainer/pip/single/.devcontainer/devcontainer.json new file mode 120000 index 0000000000..cec0647b20 --- /dev/null +++ b/.devcontainer/pip/single/.devcontainer/devcontainer.json @@ -0,0 +1 @@ +../../devcontainer.json \ No newline at end of file diff --git a/.devcontainer/pip/unified/.devcontainer/devcontainer.json b/.devcontainer/pip/unified/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..c19f599ca1 --- /dev/null +++ b/.devcontainer/pip/unified/.devcontainer/devcontainer.json @@ -0,0 +1,61 @@ +{ + "shutdownAction": "stopContainer", + + "build": { + "context": "${localWorkspaceFolder}/.devcontainer", + "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", + "args": { + "CUDA": "12.0", + "LLVM": "16", + "PYTHON_PACKAGE_MANAGER": "pip" + } + }, + "hostRequirements": { + "gpu": true + }, + + "features": { + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + }, + + "overrideFeatureInstallOrder": [ + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" + ], + + "initializeCommand": [ + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/${localWorkspaceFolderBasename}/unified}" + ], + + "containerEnv": { + "DEFAULT_VIRTUAL_ENV": "rapids" + }, + + "workspaceFolder": "/home/coder", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "mounts": [ + "source=${localWorkspaceFolder}/../rmm,target=/home/coder/rmm,type=bind,consistency=consistent", + "source=${localWorkspaceFolder}/../cudf,target=/home/coder/cudf,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/${localWorkspaceFolderBasename}/unified,target=/home/coder/.local,type=bind,consistency=consistent" + ], + + "customizations": { + "vscode": { + "extensions": [ + "mutantdino.resourcemonitor", + "tamasfe.even-better-toml" + ], + "settings": { + "files.trimFinalNewlines": true, + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "files.watcherExclude": { + "**/target/**": true + }, + "python.linting.flake8Enabled": true + } + } + } +} From b40e352e6ac5ed5b9572d3dae7a167b08751c9a9 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 17 Jul 2023 11:15:54 -0700 Subject: [PATCH 02/43] fix tag for CUDA 12.0 --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 71e229a459..cb6e0a4452 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -10,7 +10,7 @@ ARG PYTHON_PACKAGE_MANAGER=conda FROM ${REPO}:${RAPIDS}-cpp-llvm${LLVM}-cuda${CUDA}-${DISTRO} as pip-base -FROM ${REPO}:${RAPIDS}-cpp-llvm${LLVM}-cuda${CUDA}-mambaforge-${DISTRO} as conda-base +FROM ${REPO}:${RAPIDS}-cpp-llvm${LLVM}-mambaforge-${DISTRO} as conda-base FROM ${PYTHON_PACKAGE_MANAGER}-base From dde04770836abba1eae22dca9f427d642edb1377 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 17 Jul 2023 11:23:43 -0700 Subject: [PATCH 03/43] use CUDA 11.8 for now --- .devcontainer/Dockerfile | 4 ++-- .devcontainer/conda/devcontainer.json | 2 +- .devcontainer/conda/isolated/.devcontainer/devcontainer.json | 2 +- .devcontainer/conda/unified/.devcontainer/devcontainer.json | 2 +- .devcontainer/devcontainer.json | 2 +- .devcontainer/pip/devcontainer.json | 2 +- .devcontainer/pip/isolated/.devcontainer/devcontainer.json | 2 +- .devcontainer/pip/unified/.devcontainer/devcontainer.json | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index cb6e0a4452..d076bd40f7 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1.5 -ARG CUDA=12.0 +ARG CUDA=11.8 ARG LLVM=16 ARG RAPIDS=23.08 ARG DISTRO=ubuntu22.04 @@ -10,7 +10,7 @@ ARG PYTHON_PACKAGE_MANAGER=conda FROM ${REPO}:${RAPIDS}-cpp-llvm${LLVM}-cuda${CUDA}-${DISTRO} as pip-base -FROM ${REPO}:${RAPIDS}-cpp-llvm${LLVM}-mambaforge-${DISTRO} as conda-base +FROM ${REPO}:${RAPIDS}-cpp-llvm${LLVM}-cuda${CUDA}-mambaforge-${DISTRO} as conda-base FROM ${PYTHON_PACKAGE_MANAGER}-base diff --git a/.devcontainer/conda/devcontainer.json b/.devcontainer/conda/devcontainer.json index 67fb669795..5cec680116 100644 --- a/.devcontainer/conda/devcontainer.json +++ b/.devcontainer/conda/devcontainer.json @@ -5,7 +5,7 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "12.0", + "CUDA": "11.8", "LLVM": "16", "PYTHON_PACKAGE_MANAGER": "conda" } diff --git a/.devcontainer/conda/isolated/.devcontainer/devcontainer.json b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json index 2f611de372..2815e63ddb 100644 --- a/.devcontainer/conda/isolated/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "12.0", + "CUDA": "11.8", "LLVM": "16", "PYTHON_PACKAGE_MANAGER": "conda" } diff --git a/.devcontainer/conda/unified/.devcontainer/devcontainer.json b/.devcontainer/conda/unified/.devcontainer/devcontainer.json index 3a4015fe6a..53029104a7 100644 --- a/.devcontainer/conda/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/unified/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "12.0", + "CUDA": "11.8", "LLVM": "16", "PYTHON_PACKAGE_MANAGER": "conda" } diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 67fb669795..5cec680116 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "12.0", + "CUDA": "11.8", "LLVM": "16", "PYTHON_PACKAGE_MANAGER": "conda" } diff --git a/.devcontainer/pip/devcontainer.json b/.devcontainer/pip/devcontainer.json index b90c425a11..c0607526c4 100644 --- a/.devcontainer/pip/devcontainer.json +++ b/.devcontainer/pip/devcontainer.json @@ -5,7 +5,7 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "12.0", + "CUDA": "11.8", "LLVM": "16", "PYTHON_PACKAGE_MANAGER": "pip" } diff --git a/.devcontainer/pip/isolated/.devcontainer/devcontainer.json b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json index b65eb44876..015c932313 100644 --- a/.devcontainer/pip/isolated/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "12.0", + "CUDA": "11.8", "LLVM": "16", "PYTHON_PACKAGE_MANAGER": "pip" } diff --git a/.devcontainer/pip/unified/.devcontainer/devcontainer.json b/.devcontainer/pip/unified/.devcontainer/devcontainer.json index c19f599ca1..e8d9953e60 100644 --- a/.devcontainer/pip/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/unified/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "12.0", + "CUDA": "11.8", "LLVM": "16", "PYTHON_PACKAGE_MANAGER": "pip" } From 450a75fe82a91b266f5fc99bf7891c8a5c979bbb Mon Sep 17 00:00:00 2001 From: ptaylor Date: Tue, 18 Jul 2023 09:53:01 -0700 Subject: [PATCH 04/43] default to CUDA 12.0 --- .devcontainer/Dockerfile | 7 +++++-- .devcontainer/conda/devcontainer.json | 2 +- .../conda/isolated/.devcontainer/devcontainer.json | 2 +- .../conda/unified/.devcontainer/devcontainer.json | 2 +- .devcontainer/devcontainer.json | 2 +- .devcontainer/pip/devcontainer.json | 2 +- .devcontainer/pip/isolated/.devcontainer/devcontainer.json | 2 +- .devcontainer/pip/unified/.devcontainer/devcontainer.json | 2 +- 8 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d076bd40f7..f890c67066 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1.5 -ARG CUDA=11.8 +ARG CUDA=12.0 ARG LLVM=16 ARG RAPIDS=23.08 ARG DISTRO=ubuntu22.04 @@ -10,10 +10,13 @@ ARG PYTHON_PACKAGE_MANAGER=conda FROM ${REPO}:${RAPIDS}-cpp-llvm${LLVM}-cuda${CUDA}-${DISTRO} as pip-base -FROM ${REPO}:${RAPIDS}-cpp-llvm${LLVM}-cuda${CUDA}-mambaforge-${DISTRO} as conda-base +FROM ${REPO}:${RAPIDS}-cpp-mambaforge-${DISTRO} as conda-base FROM ${PYTHON_PACKAGE_MANAGER}-base +ARG CUDA +ENV CUDA_VERSION="${CUDA_VERSION:-${CUDA}}" + ARG PYTHON_PACKAGE_MANAGER ENV PYTHON_PACKAGE_MANAGER="${PYTHON_PACKAGE_MANAGER}" diff --git a/.devcontainer/conda/devcontainer.json b/.devcontainer/conda/devcontainer.json index 5cec680116..67fb669795 100644 --- a/.devcontainer/conda/devcontainer.json +++ b/.devcontainer/conda/devcontainer.json @@ -5,7 +5,7 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "11.8", + "CUDA": "12.0", "LLVM": "16", "PYTHON_PACKAGE_MANAGER": "conda" } diff --git a/.devcontainer/conda/isolated/.devcontainer/devcontainer.json b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json index 2815e63ddb..2f611de372 100644 --- a/.devcontainer/conda/isolated/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "11.8", + "CUDA": "12.0", "LLVM": "16", "PYTHON_PACKAGE_MANAGER": "conda" } diff --git a/.devcontainer/conda/unified/.devcontainer/devcontainer.json b/.devcontainer/conda/unified/.devcontainer/devcontainer.json index 53029104a7..3a4015fe6a 100644 --- a/.devcontainer/conda/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/unified/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "11.8", + "CUDA": "12.0", "LLVM": "16", "PYTHON_PACKAGE_MANAGER": "conda" } diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5cec680116..67fb669795 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "11.8", + "CUDA": "12.0", "LLVM": "16", "PYTHON_PACKAGE_MANAGER": "conda" } diff --git a/.devcontainer/pip/devcontainer.json b/.devcontainer/pip/devcontainer.json index c0607526c4..b90c425a11 100644 --- a/.devcontainer/pip/devcontainer.json +++ b/.devcontainer/pip/devcontainer.json @@ -5,7 +5,7 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "11.8", + "CUDA": "12.0", "LLVM": "16", "PYTHON_PACKAGE_MANAGER": "pip" } diff --git a/.devcontainer/pip/isolated/.devcontainer/devcontainer.json b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json index 015c932313..b65eb44876 100644 --- a/.devcontainer/pip/isolated/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "11.8", + "CUDA": "12.0", "LLVM": "16", "PYTHON_PACKAGE_MANAGER": "pip" } diff --git a/.devcontainer/pip/unified/.devcontainer/devcontainer.json b/.devcontainer/pip/unified/.devcontainer/devcontainer.json index e8d9953e60..c19f599ca1 100644 --- a/.devcontainer/pip/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/unified/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { - "CUDA": "11.8", + "CUDA": "12.0", "LLVM": "16", "PYTHON_PACKAGE_MANAGER": "pip" } From 9d5240378f55ebb12916aab4110292d980152fa0 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 20 Jul 2023 16:08:21 -0700 Subject: [PATCH 05/43] build all RAPIDS archs to take maximum advantage of sccache --- .devcontainer/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index f890c67066..354fe1cf89 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -15,6 +15,7 @@ FROM ${REPO}:${RAPIDS}-cpp-mambaforge-${DISTRO} as conda-base FROM ${PYTHON_PACKAGE_MANAGER}-base ARG CUDA +ENV CUDAARCHS="RAPIDS" ENV CUDA_VERSION="${CUDA_VERSION:-${CUDA}}" ARG PYTHON_PACKAGE_MANAGER From e21ed821d5c599c7cf49def71bee975e7d6ce768 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 20 Jul 2023 16:56:22 -0700 Subject: [PATCH 06/43] add compile_commands.json to gitignore --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 56188bfad4..95d1fd7c59 100644 --- a/.gitignore +++ b/.gitignore @@ -63,4 +63,7 @@ doxygen_check/ ## Doxygen cpp/html -cpp/Doxyfile \ No newline at end of file +cpp/Doxyfile + +# clang tooling +compile_commands.json From aa247359f945dbe485e9f5cc40d83458c4945a90 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 20 Jul 2023 16:58:44 -0700 Subject: [PATCH 07/43] default DISABLE_DEPRECATION_WARNINGS to ON so they don't fail the build --- cpp/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 354d66d59c..e0993280bd 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -56,7 +56,7 @@ option(BUILD_CUML_MPI_COMMS "Build the MPI+NCCL Communicator (used for testing)" option(CUDA_ENABLE_KERNEL_INFO "Enable kernel resource usage info" OFF) option(CUDA_ENABLE_LINE_INFO "Enable lineinfo in nvcc" OFF) option(DETECT_CONDA_ENV "Enable detection of conda environment for dependencies" ON) -option(DISABLE_DEPRECATION_WARNINGS "Disable deprecation warnings " OFF) +option(DISABLE_DEPRECATION_WARNINGS "Disable deprecation warnings " ON) option(DISABLE_OPENMP "Disable OpenMP" OFF) option(ENABLE_CUMLPRIMS_MG "Enable algorithms that use libcumlprims_mg" ON) option(NVTX "Enable nvtx markers" OFF) From 7a8231eb8af9485a21a970528f726fa39b3aa528 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Fri, 21 Jul 2023 00:51:37 +0000 Subject: [PATCH 08/43] build and install custom patched libcudacxx --- cpp/CMakeLists.txt | 1 + cpp/cmake/thirdparty/get_libcudacxx.cmake | 37 +++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 cpp/cmake/thirdparty/get_libcudacxx.cmake diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index e0993280bd..a2e953cc29 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -220,6 +220,7 @@ if(BUILD_CUML_TESTS OR BUILD_PRIMS_TESTS) find_package(Threads) endif() +include(cmake/thirdparty/get_libcudacxx.cmake) include(cmake/thirdparty/get_raft.cmake) if(LINK_TREELITE) diff --git a/cpp/cmake/thirdparty/get_libcudacxx.cmake b/cpp/cmake/thirdparty/get_libcudacxx.cmake new file mode 100644 index 0000000000..204a5abe9b --- /dev/null +++ b/cpp/cmake/thirdparty/get_libcudacxx.cmake @@ -0,0 +1,37 @@ +# ============================================================================= +# Copyright (c) 2023, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under +# the License. +# ============================================================================= + +# This function finds thrust and sets any additional necessary environment variables. +function(find_and_configure_libcudacxx) + # Make sure we install libcudacxx beside our patched version of thrust + include(GNUInstallDirs) + set(CMAKE_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/libcuml") + set(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_INCLUDEDIR}/lib") + + include(${rapids-cmake-dir}/cpm/libcudacxx.cmake) + rapids_cpm_libcudacxx(BUILD_EXPORT_SET cuml-exports INSTALL_EXPORT_SET cuml-exports) + + if(libcudacxx_SOURCE_DIR) + # Store where CMake can find our custom Thrust install + include("${rapids-cmake-dir}/export/find_package_root.cmake") + rapids_export_find_package_root( + INSTALL + libcudacxx + [=[${CMAKE_CURRENT_LIST_DIR}/../../../include/libcuml/lib/rapids/cmake/libcudacxx]=] + cuml-exports + ) + endif() +endfunction() + +find_and_configure_libcudacxx() From 4e357caabc37df452dc017bb85f3f2474480486d Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 20 Jul 2023 18:08:26 -0700 Subject: [PATCH 09/43] add clangd and nsight vscode customizations --- .devcontainer/conda/devcontainer.json | 31 ++++++++++++++++++- .../isolated/.devcontainer/devcontainer.json | 31 ++++++++++++++++++- .../unified/.devcontainer/devcontainer.json | 31 ++++++++++++++++++- .devcontainer/devcontainer.json | 31 ++++++++++++++++++- .devcontainer/pip/devcontainer.json | 31 ++++++++++++++++++- .../isolated/.devcontainer/devcontainer.json | 31 ++++++++++++++++++- .../unified/.devcontainer/devcontainer.json | 31 ++++++++++++++++++- 7 files changed, 210 insertions(+), 7 deletions(-) diff --git a/.devcontainer/conda/devcontainer.json b/.devcontainer/conda/devcontainer.json index 67fb669795..841df8838b 100644 --- a/.devcontainer/conda/devcontainer.json +++ b/.devcontainer/conda/devcontainer.json @@ -43,17 +43,46 @@ "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 + "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/isolated/.devcontainer/devcontainer.json b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json index 2f611de372..fd46e0a73b 100644 --- a/.devcontainer/conda/isolated/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json @@ -46,17 +46,46 @@ "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 + "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/unified/.devcontainer/devcontainer.json b/.devcontainer/conda/unified/.devcontainer/devcontainer.json index 3a4015fe6a..530e0324e4 100644 --- a/.devcontainer/conda/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/unified/.devcontainer/devcontainer.json @@ -45,17 +45,46 @@ "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 + "python.linting.flake8Enabled": true, + "[c]": { + "editor.defaultFormatter": "seaube.clangformat" + }, + "[cpp]": { + "editor.defaultFormatter": "seaube.clangformat" + }, + "[cuda-cpp]": { + "editor.defaultFormatter": "seaube.clangformat" + } } } } diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 67fb669795..841df8838b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -43,17 +43,46 @@ "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 + "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/devcontainer.json b/.devcontainer/pip/devcontainer.json index b90c425a11..0246cbcb03 100644 --- a/.devcontainer/pip/devcontainer.json +++ b/.devcontainer/pip/devcontainer.json @@ -44,17 +44,46 @@ "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 + "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/isolated/.devcontainer/devcontainer.json b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json index b65eb44876..2254496bca 100644 --- a/.devcontainer/pip/isolated/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json @@ -45,17 +45,46 @@ "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 + "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/unified/.devcontainer/devcontainer.json b/.devcontainer/pip/unified/.devcontainer/devcontainer.json index c19f599ca1..0b93a62e7a 100644 --- a/.devcontainer/pip/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/unified/.devcontainer/devcontainer.json @@ -44,17 +44,46 @@ "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 + "python.linting.flake8Enabled": true, + "[c]": { + "editor.defaultFormatter": "seaube.clangformat" + }, + "[cpp]": { + "editor.defaultFormatter": "seaube.clangformat" + }, + "[cuda-cpp]": { + "editor.defaultFormatter": "seaube.clangformat" + } } } } From 6dfeca81145df38ea619b4bf61305d9e13bc304f Mon Sep 17 00:00:00 2001 From: ptaylor Date: Fri, 21 Jul 2023 10:33:18 -0700 Subject: [PATCH 10/43] copy in default clangd config --- .devcontainer/Dockerfile | 2 ++ .devcontainer/conda/devcontainer.json | 6 ++++++ .../conda/isolated/.devcontainer/devcontainer.json | 2 +- .devcontainer/conda/unified/.devcontainer/devcontainer.json | 6 ++++++ .devcontainer/pip/devcontainer.json | 6 ++++++ .devcontainer/pip/isolated/.devcontainer/devcontainer.json | 2 +- .devcontainer/pip/unified/.devcontainer/devcontainer.json | 6 ++++++ 7 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 354fe1cf89..29ba39052b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -14,6 +14,8 @@ FROM ${REPO}:${RAPIDS}-cpp-mambaforge-${DISTRO} as conda-base FROM ${PYTHON_PACKAGE_MANAGER}-base +COPY --from=pip-base /etc/skel/.config/clangd/config.yaml /etc/skel/.config/clangd/config.yaml + ARG CUDA ENV CUDAARCHS="RAPIDS" ENV CUDA_VERSION="${CUDA_VERSION:-${CUDA}}" diff --git a/.devcontainer/conda/devcontainer.json b/.devcontainer/conda/devcontainer.json index 841df8838b..7b0865cf1a 100644 --- a/.devcontainer/conda/devcontainer.json +++ b/.devcontainer/conda/devcontainer.json @@ -26,6 +26,12 @@ "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}/single}" ], + "updateContentCommand": [ + "/bin/bash", + "-c", + "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" + ], + "containerEnv": { "DEFAULT_CONDA_ENV": "rapids" }, diff --git a/.devcontainer/conda/isolated/.devcontainer/devcontainer.json b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json index fd46e0a73b..4a153cf7c1 100644 --- a/.devcontainer/conda/isolated/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json @@ -27,7 +27,7 @@ ], "updateContentCommand": [ - "/bin/bash", "-c", "cp -ar /workspaces/${localWorkspaceFolderBasename} /home/coder/${localWorkspaceFolderBasename} && rapids-make-vscode-workspace --update" + "/bin/bash", "-c", "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml && cp -ar /workspaces/${localWorkspaceFolderBasename} /home/coder/${localWorkspaceFolderBasename} && rapids-make-vscode-workspace --update" ], "containerEnv": { diff --git a/.devcontainer/conda/unified/.devcontainer/devcontainer.json b/.devcontainer/conda/unified/.devcontainer/devcontainer.json index 530e0324e4..8a7d839b2b 100644 --- a/.devcontainer/conda/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/unified/.devcontainer/devcontainer.json @@ -26,6 +26,12 @@ "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}/unified}" ], + "updateContentCommand": [ + "/bin/bash", + "-c", + "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" + ], + "containerEnv": { "DEFAULT_CONDA_ENV": "rapids" }, diff --git a/.devcontainer/pip/devcontainer.json b/.devcontainer/pip/devcontainer.json index 0246cbcb03..a93626950b 100644 --- a/.devcontainer/pip/devcontainer.json +++ b/.devcontainer/pip/devcontainer.json @@ -26,6 +26,12 @@ "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/${localWorkspaceFolderBasename}/single}" ], + "updateContentCommand": [ + "/bin/bash", + "-c", + "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" + ], + "containerEnv": { "PYTHONSAFEPATH": "true", "PYTHONUNBUFFERED": "true", diff --git a/.devcontainer/pip/isolated/.devcontainer/devcontainer.json b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json index 2254496bca..aaddf35590 100644 --- a/.devcontainer/pip/isolated/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json @@ -27,7 +27,7 @@ ], "updateContentCommand": [ - "/bin/bash", "-c", "cp -ar /workspaces/${localWorkspaceFolderBasename} /home/coder/${localWorkspaceFolderBasename} && rapids-make-vscode-workspace --update" + "/bin/bash", "-c", "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml && cp -ar /workspaces/${localWorkspaceFolderBasename} /home/coder/${localWorkspaceFolderBasename} && rapids-make-vscode-workspace --update" ], "containerEnv": { diff --git a/.devcontainer/pip/unified/.devcontainer/devcontainer.json b/.devcontainer/pip/unified/.devcontainer/devcontainer.json index 0b93a62e7a..9b9299ce7f 100644 --- a/.devcontainer/pip/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/unified/.devcontainer/devcontainer.json @@ -26,6 +26,12 @@ "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/${localWorkspaceFolderBasename}/unified}" ], + "updateContentCommand": [ + "/bin/bash", + "-c", + "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" + ], + "containerEnv": { "DEFAULT_VIRTUAL_ENV": "rapids" }, From 5d80735a0e778c143081b8244e873ba51171dee3 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Fri, 21 Jul 2023 10:46:06 -0700 Subject: [PATCH 11/43] remove options for pip vs. conda unless using the launch script --- .devcontainer/Dockerfile | 4 +- .devcontainer/conda/devcontainer.json | 95 ------------------ .../single/.devcontainer/devcontainer.json | 96 +++++++++++++++++- .devcontainer/pip/devcontainer.json | 96 ------------------ .../single/.devcontainer/devcontainer.json | 97 ++++++++++++++++++- 5 files changed, 193 insertions(+), 195 deletions(-) delete mode 100644 .devcontainer/conda/devcontainer.json mode change 120000 => 100644 .devcontainer/conda/single/.devcontainer/devcontainer.json delete mode 100644 .devcontainer/pip/devcontainer.json mode change 120000 => 100644 .devcontainer/pip/single/.devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 29ba39052b..68194d0f95 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -12,10 +12,10 @@ FROM ${REPO}:${RAPIDS}-cpp-llvm${LLVM}-cuda${CUDA}-${DISTRO} as pip-base FROM ${REPO}:${RAPIDS}-cpp-mambaforge-${DISTRO} as conda-base -FROM ${PYTHON_PACKAGE_MANAGER}-base - COPY --from=pip-base /etc/skel/.config/clangd/config.yaml /etc/skel/.config/clangd/config.yaml +FROM ${PYTHON_PACKAGE_MANAGER}-base + ARG CUDA ENV CUDAARCHS="RAPIDS" ENV CUDA_VERSION="${CUDA_VERSION:-${CUDA}}" diff --git a/.devcontainer/conda/devcontainer.json b/.devcontainer/conda/devcontainer.json deleted file mode 100644 index 7b0865cf1a..0000000000 --- a/.devcontainer/conda/devcontainer.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "shutdownAction": "stopContainer", - - "build": { - "context": "${localWorkspaceFolder}/.devcontainer", - "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", - "args": { - "CUDA": "12.0", - "LLVM": "16", - "PYTHON_PACKAGE_MANAGER": "conda" - } - }, - "hostRequirements": { - "gpu": true - }, - - "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} - }, - - "overrideFeatureInstallOrder": [ - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" - ], - - "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}/single}" - ], - - "updateContentCommand": [ - "/bin/bash", - "-c", - "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", - "mounts": [ - "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/${localWorkspaceFolderBasename}/single,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/single/.devcontainer/devcontainer.json b/.devcontainer/conda/single/.devcontainer/devcontainer.json deleted file mode 120000 index cec0647b20..0000000000 --- a/.devcontainer/conda/single/.devcontainer/devcontainer.json +++ /dev/null @@ -1 +0,0 @@ -../../devcontainer.json \ No newline at end of file diff --git a/.devcontainer/conda/single/.devcontainer/devcontainer.json b/.devcontainer/conda/single/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..7b0865cf1a --- /dev/null +++ b/.devcontainer/conda/single/.devcontainer/devcontainer.json @@ -0,0 +1,95 @@ +{ + "shutdownAction": "stopContainer", + + "build": { + "context": "${localWorkspaceFolder}/.devcontainer", + "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", + "args": { + "CUDA": "12.0", + "LLVM": "16", + "PYTHON_PACKAGE_MANAGER": "conda" + } + }, + "hostRequirements": { + "gpu": true + }, + + "features": { + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + }, + + "overrideFeatureInstallOrder": [ + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" + ], + + "initializeCommand": [ + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}/single}" + ], + + "updateContentCommand": [ + "/bin/bash", + "-c", + "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", + "mounts": [ + "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/${localWorkspaceFolderBasename}/single,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/pip/devcontainer.json b/.devcontainer/pip/devcontainer.json deleted file mode 100644 index a93626950b..0000000000 --- a/.devcontainer/pip/devcontainer.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "shutdownAction": "stopContainer", - - "build": { - "context": "${localWorkspaceFolder}/.devcontainer", - "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", - "args": { - "CUDA": "12.0", - "LLVM": "16", - "PYTHON_PACKAGE_MANAGER": "pip" - } - }, - "hostRequirements": { - "gpu": true - }, - - "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} - }, - - "overrideFeatureInstallOrder": [ - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" - ], - - "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/${localWorkspaceFolderBasename}/single}" - ], - - "updateContentCommand": [ - "/bin/bash", - "-c", - "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" - ], - - "containerEnv": { - "PYTHONSAFEPATH": "true", - "PYTHONUNBUFFERED": "true", - "DEFAULT_VIRTUAL_ENV": "rapids" - }, - - "workspaceFolder": "/home/coder", - "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", - "mounts": [ - "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/${localWorkspaceFolderBasename}/single,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/single/.devcontainer/devcontainer.json b/.devcontainer/pip/single/.devcontainer/devcontainer.json deleted file mode 120000 index cec0647b20..0000000000 --- a/.devcontainer/pip/single/.devcontainer/devcontainer.json +++ /dev/null @@ -1 +0,0 @@ -../../devcontainer.json \ No newline at end of file diff --git a/.devcontainer/pip/single/.devcontainer/devcontainer.json b/.devcontainer/pip/single/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..a93626950b --- /dev/null +++ b/.devcontainer/pip/single/.devcontainer/devcontainer.json @@ -0,0 +1,96 @@ +{ + "shutdownAction": "stopContainer", + + "build": { + "context": "${localWorkspaceFolder}/.devcontainer", + "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", + "args": { + "CUDA": "12.0", + "LLVM": "16", + "PYTHON_PACKAGE_MANAGER": "pip" + } + }, + "hostRequirements": { + "gpu": true + }, + + "features": { + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + }, + + "overrideFeatureInstallOrder": [ + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" + ], + + "initializeCommand": [ + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/${localWorkspaceFolderBasename}/single}" + ], + + "updateContentCommand": [ + "/bin/bash", + "-c", + "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" + ], + + "containerEnv": { + "PYTHONSAFEPATH": "true", + "PYTHONUNBUFFERED": "true", + "DEFAULT_VIRTUAL_ENV": "rapids" + }, + + "workspaceFolder": "/home/coder", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "mounts": [ + "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/${localWorkspaceFolderBasename}/single,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" + } + } + } + } +} From e2015b07be7d1ea32abc06e9ccdaf9030873b6dd Mon Sep 17 00:00:00 2001 From: ptaylor Date: Fri, 21 Jul 2023 11:03:05 -0700 Subject: [PATCH 12/43] fix unified mounts --- .../conda/unified/.devcontainer/devcontainer.json | 9 +++++++-- .../pip/unified/.devcontainer/devcontainer.json | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.devcontainer/conda/unified/.devcontainer/devcontainer.json b/.devcontainer/conda/unified/.devcontainer/devcontainer.json index 8a7d839b2b..8f2a8b6f04 100644 --- a/.devcontainer/conda/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/unified/.devcontainer/devcontainer.json @@ -23,7 +23,7 @@ ], "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}/unified}" + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/unified}" ], "updateContentCommand": [ @@ -41,11 +41,16 @@ "mounts": [ "source=${localWorkspaceFolder}/../rmm,target=/home/coder/rmm,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}/../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/${localWorkspaceFolderBasename}/unified,target=/home/coder/.conda/envs,type=bind,consistency=consistent" + "source=${localWorkspaceFolder}/../.conda/unified,target=/home/coder/.conda/envs,type=bind,consistency=consistent" ], "customizations": { diff --git a/.devcontainer/pip/unified/.devcontainer/devcontainer.json b/.devcontainer/pip/unified/.devcontainer/devcontainer.json index 9b9299ce7f..b1aa8c7a4e 100644 --- a/.devcontainer/pip/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/unified/.devcontainer/devcontainer.json @@ -23,7 +23,7 @@ ], "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/${localWorkspaceFolderBasename}/unified}" + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/unified}" ], "updateContentCommand": [ @@ -41,10 +41,15 @@ "mounts": [ "source=${localWorkspaceFolder}/../rmm,target=/home/coder/rmm,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}/../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/${localWorkspaceFolderBasename}/unified,target=/home/coder/.local,type=bind,consistency=consistent" + "source=${localWorkspaceFolder}/../.local/unified,target=/home/coder/.local,type=bind,consistency=consistent" ], "customizations": { From c14fb996a638423c4cb30040611681544d19c8bb Mon Sep 17 00:00:00 2001 From: ptaylor Date: Fri, 21 Jul 2023 16:44:26 -0700 Subject: [PATCH 13/43] ensure dirs exist before mounting --- .devcontainer/conda/unified/.devcontainer/devcontainer.json | 2 +- .devcontainer/pip/unified/.devcontainer/devcontainer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/conda/unified/.devcontainer/devcontainer.json b/.devcontainer/conda/unified/.devcontainer/devcontainer.json index 8f2a8b6f04..bf50329c81 100644 --- a/.devcontainer/conda/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/unified/.devcontainer/devcontainer.json @@ -23,7 +23,7 @@ ], "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/unified}" + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/unified} ${localWorkspaceFolder}/../{rmm,cudf,raft,cumlprims_mg,cuml,cugraph-ops,cugraph,cuspatial}" ], "updateContentCommand": [ diff --git a/.devcontainer/pip/unified/.devcontainer/devcontainer.json b/.devcontainer/pip/unified/.devcontainer/devcontainer.json index b1aa8c7a4e..a623ad11bd 100644 --- a/.devcontainer/pip/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/unified/.devcontainer/devcontainer.json @@ -23,7 +23,7 @@ ], "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/unified}" + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/unified} ${localWorkspaceFolder}/../{rmm,cudf,raft,cumlprims_mg,cuml,cugraph-ops,cugraph,cuspatial}" ], "updateContentCommand": [ From bed082727f917c34676e67101f599707fdff2183 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Tue, 25 Jul 2023 18:33:10 -0700 Subject: [PATCH 14/43] add kvikio --- .devcontainer/conda/unified/.devcontainer/devcontainer.json | 3 ++- .devcontainer/pip/unified/.devcontainer/devcontainer.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.devcontainer/conda/unified/.devcontainer/devcontainer.json b/.devcontainer/conda/unified/.devcontainer/devcontainer.json index bf50329c81..2d2a8c83fa 100644 --- a/.devcontainer/conda/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/unified/.devcontainer/devcontainer.json @@ -23,7 +23,7 @@ ], "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/unified} ${localWorkspaceFolder}/../{rmm,cudf,raft,cumlprims_mg,cuml,cugraph-ops,cugraph,cuspatial}" + "/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": [ @@ -40,6 +40,7 @@ "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},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", diff --git a/.devcontainer/pip/unified/.devcontainer/devcontainer.json b/.devcontainer/pip/unified/.devcontainer/devcontainer.json index a623ad11bd..07d9ae8686 100644 --- a/.devcontainer/pip/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/unified/.devcontainer/devcontainer.json @@ -23,7 +23,7 @@ ], "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/unified} ${localWorkspaceFolder}/../{rmm,cudf,raft,cumlprims_mg,cuml,cugraph-ops,cugraph,cuspatial}" + "/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": [ @@ -40,6 +40,7 @@ "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},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", From 8b865abf41910ce6d4de9e9d1969f9f8717f384b Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 31 Jul 2023 14:41:10 -0700 Subject: [PATCH 15/43] use volumes for isolated devcontainer source dirs --- .devcontainer/conda/isolated/.devcontainer/devcontainer.json | 5 +++-- .devcontainer/pip/isolated/.devcontainer/devcontainer.json | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.devcontainer/conda/isolated/.devcontainer/devcontainer.json b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json index 4a153cf7c1..e55b955e49 100644 --- a/.devcontainer/conda/isolated/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json @@ -27,7 +27,7 @@ ], "updateContentCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml && cp -ar /workspaces/${localWorkspaceFolderBasename} /home/coder/${localWorkspaceFolderBasename} && rapids-make-vscode-workspace --update" + "/bin/bash", "-c", "sudo chown -R $(id -u):$(id -g) /home/coder/${localWorkspaceFolderBasename} && mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml && cp -ar /workspaces/${localWorkspaceFolderBasename} /home/coder/ && rapids-make-vscode-workspace --update" ], "containerEnv": { @@ -40,7 +40,8 @@ "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/pkgs,target=/home/coder/.conda/pkgs,type=bind,consistency=consistent", + "source=${localWorkspaceFolderBasename}-conda-isolated-${devcontainerId},target=/home/coder/${localWorkspaceFolderBasename},type=volume" ], "customizations": { diff --git a/.devcontainer/pip/isolated/.devcontainer/devcontainer.json b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json index aaddf35590..f1b0e9d6a3 100644 --- a/.devcontainer/pip/isolated/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json @@ -27,7 +27,7 @@ ], "updateContentCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml && cp -ar /workspaces/${localWorkspaceFolderBasename} /home/coder/${localWorkspaceFolderBasename} && rapids-make-vscode-workspace --update" + "/bin/bash", "-c", "sudo chown -R $(id -u):$(id -g) /home/coder/${localWorkspaceFolderBasename} && mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml && cp -ar /workspaces/${localWorkspaceFolderBasename} /home/coder/ && rapids-make-vscode-workspace --update" ], "containerEnv": { @@ -39,7 +39,8 @@ "mounts": [ "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}/../.config,target=/home/coder/.config,type=bind,consistency=consistent", + "source=${localWorkspaceFolderBasename}-pip-isolated-${devcontainerId},target=/home/coder/${localWorkspaceFolderBasename},type=volume" ], "customizations": { From 138b8914188b656de1a64a679b4f49759f21f178 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 31 Jul 2023 14:57:31 -0700 Subject: [PATCH 16/43] update README.md --- .devcontainer/README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.devcontainer/README.md b/.devcontainer/README.md index 7f7dc3e38a..05a63585c7 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -87,11 +87,18 @@ $ .devcontainer/launch.sh unified pip #### Isolated mode -`.devcontainer/launch.sh isolated` launches the devcontainer without the deps/repo bind mounts, and instead contains a unique copy of the `cuml` source in the container's file system. +`.devcontainer/launch.sh isolated` launches the devcontainer without the deps/repo bind mounts, and instead contains a unique copy of the `cuml` source in a Docker [volume](https://docs.docker.com/storage/volumes/). Use this mode to launch multiple isolated development containers that can be checked out to separate branches of `cuml`. -**Be sure to push any commits you want to persist. Once this container is removed, any unpushed changes will be lost!** +The Docker volume persists after the devcontainer is removed, ensuring you don't pending lose work by accidentally removing the devcontainer. + +However, you will need to manually remove the volume once you've committed and pushed your changes: + +* Use the [`docker volume ls`](https://docs.docker.com/engine/reference/commandline/volume_ls/) command to list all volumes +* Use [`docker volume rm`](https://docs.docker.com/engine/reference/commandline/volume_rm/) or [`docker volume prune`](https://docs.docker.com/engine/reference/commandline/volume_prune/) to clean up unused volumes + +Alternatively, use the "Dev Volumes" tab of the VSCode Dev Containers extension to view and remove unused volumes. Examples: ```bash From 137407a61716ae02505028c54ea9e36a88edf9b7 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 2 Aug 2023 09:23:53 -0700 Subject: [PATCH 17/43] update to rapidsai/devcontainers 23.10 --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 68194d0f95..cd8c98f60d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -2,7 +2,7 @@ ARG CUDA=12.0 ARG LLVM=16 -ARG RAPIDS=23.08 +ARG RAPIDS=23.10 ARG DISTRO=ubuntu22.04 ARG REPO=rapidsai/devcontainers From 8fd2a656fab440700d874c78ba15722ad3a248d2 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 2 Aug 2023 15:18:27 -0700 Subject: [PATCH 18/43] update rapids-build-utils version to 23.10 --- .devcontainer/conda/isolated/.devcontainer/devcontainer.json | 2 +- .devcontainer/conda/single/.devcontainer/devcontainer.json | 2 +- .devcontainer/conda/unified/.devcontainer/devcontainer.json | 2 +- .devcontainer/devcontainer.json | 2 +- .devcontainer/pip/isolated/.devcontainer/devcontainer.json | 2 +- .devcontainer/pip/single/.devcontainer/devcontainer.json | 2 +- .devcontainer/pip/unified/.devcontainer/devcontainer.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.devcontainer/conda/isolated/.devcontainer/devcontainer.json b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json index e55b955e49..ff79fd7c8b 100644 --- a/.devcontainer/conda/isolated/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json @@ -15,7 +15,7 @@ }, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} }, "overrideFeatureInstallOrder": [ diff --git a/.devcontainer/conda/single/.devcontainer/devcontainer.json b/.devcontainer/conda/single/.devcontainer/devcontainer.json index 7b0865cf1a..e6f25406f6 100644 --- a/.devcontainer/conda/single/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/single/.devcontainer/devcontainer.json @@ -15,7 +15,7 @@ }, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} }, "overrideFeatureInstallOrder": [ diff --git a/.devcontainer/conda/unified/.devcontainer/devcontainer.json b/.devcontainer/conda/unified/.devcontainer/devcontainer.json index 2d2a8c83fa..40ae843ee7 100644 --- a/.devcontainer/conda/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/conda/unified/.devcontainer/devcontainer.json @@ -15,7 +15,7 @@ }, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} }, "overrideFeatureInstallOrder": [ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 841df8838b..f47a40c835 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,7 @@ }, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} }, "overrideFeatureInstallOrder": [ diff --git a/.devcontainer/pip/isolated/.devcontainer/devcontainer.json b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json index f1b0e9d6a3..92c62c6396 100644 --- a/.devcontainer/pip/isolated/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json @@ -15,7 +15,7 @@ }, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} }, "overrideFeatureInstallOrder": [ diff --git a/.devcontainer/pip/single/.devcontainer/devcontainer.json b/.devcontainer/pip/single/.devcontainer/devcontainer.json index a93626950b..1947da0c3c 100644 --- a/.devcontainer/pip/single/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/single/.devcontainer/devcontainer.json @@ -15,7 +15,7 @@ }, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} }, "overrideFeatureInstallOrder": [ diff --git a/.devcontainer/pip/unified/.devcontainer/devcontainer.json b/.devcontainer/pip/unified/.devcontainer/devcontainer.json index 07d9ae8686..8fef9c6567 100644 --- a/.devcontainer/pip/unified/.devcontainer/devcontainer.json +++ b/.devcontainer/pip/unified/.devcontainer/devcontainer.json @@ -15,7 +15,7 @@ }, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} }, "overrideFeatureInstallOrder": [ From c385ec87d0100b0dc52ea81539ed90f2ec130aaf Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 3 Aug 2023 17:19:04 +0000 Subject: [PATCH 19/43] add .clangd config file --- .gitignore | 1 + cpp/.clangd | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 cpp/.clangd diff --git a/.gitignore b/.gitignore index 95d1fd7c59..dc0b98d735 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,4 @@ cpp/Doxyfile # clang tooling compile_commands.json +.clangd/ diff --git a/cpp/.clangd b/cpp/.clangd new file mode 100644 index 0000000000..7c4fe036dd --- /dev/null +++ b/cpp/.clangd @@ -0,0 +1,65 @@ +# 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" +Diagnostics: + Suppress: + - "variadic_device_fn" + - "attributes_not_allowed" + +--- + +# 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" From 61c591120a45b95ac7e5c86042ecbd59c4cd733e Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 3 Aug 2023 17:32:12 +0000 Subject: [PATCH 20/43] update RAPIDS versions in devcontainer files --- ci/release/update-version.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 1652a2278d..863a56f5ed 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -96,3 +96,7 @@ for FILE in .github/workflows/*.yaml; do sed_runner "/shared-action-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}" done sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh + +# .devcontainer files +sed_runner "s/ARG RAPIDS=${CURRENT_SHORT_TAG}/ARG RAPIDS=${NEXT_SHORT_TAG}/g" .devcontainer/Dockerfile +find .devcontainer/ -type f -name devcontainer.json -exec sed -i "s/${CURRENT_SHORT_TAG}/${NEXT_SHORT_TAG}/g" {} \; From 9f942f761c1af228024385f33c42d9b9b00a2da0 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 14 Aug 2023 11:49:20 -0700 Subject: [PATCH 21/43] remove isolated and unified devcontainers, make single the default --- .devcontainer/README.md | 75 ------------- .../.devcontainer => }/devcontainer.json | 0 .../isolated/.devcontainer/devcontainer.json | 93 ---------------- .../unified/.devcontainer/devcontainer.json | 103 ------------------ .devcontainer/devcontainer.json | 89 --------------- .devcontainer/launch.sh | 52 --------- .../.devcontainer => }/devcontainer.json | 0 .../isolated/.devcontainer/devcontainer.json | 92 ---------------- .../unified/.devcontainer/devcontainer.json | 102 ----------------- 9 files changed, 606 deletions(-) rename .devcontainer/conda/{single/.devcontainer => }/devcontainer.json (100%) delete mode 100644 .devcontainer/conda/isolated/.devcontainer/devcontainer.json delete mode 100644 .devcontainer/conda/unified/.devcontainer/devcontainer.json delete mode 100644 .devcontainer/devcontainer.json delete mode 100755 .devcontainer/launch.sh rename .devcontainer/pip/{single/.devcontainer => }/devcontainer.json (100%) delete mode 100644 .devcontainer/pip/isolated/.devcontainer/devcontainer.json delete mode 100644 .devcontainer/pip/unified/.devcontainer/devcontainer.json diff --git a/.devcontainer/README.md b/.devcontainer/README.md index 05a63585c7..b748bbb3bf 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -9,11 +9,6 @@ This container is a turnkey development environment for building and testing the * [Prerequisites](#prerequisites) * [Host bind mounts](#host-bind-mounts) * [Launch a Dev Container](#launch-a-dev-container) - * [via VSCode](#via-vscode) - * [via `launch.sh`](#via-launchsh) - * [Single mode](#single-mode) - * [Unified mode](#unified-mode) - * [Isolated mode](#isolated-mode) ## Prerequisites @@ -35,76 +30,6 @@ This ensures caches, configurations, dependencies, and your commits are persiste ## Launch a Dev Container -A devcontainer can be launched directly by VSCode, or via a custom `launch.sh` shell script. - -### via VSCode - To launch a devcontainer from VSCode, open the cuML repo and select the "Reopen in Container" button in the bottom right:
Alternatively, open the VSCode command palette (typically `cmd/ctrl + shift + P`) and run the "Rebuild and Reopen in Container" command. - -### via `launch.sh` - -Use the `.devcontainer/launch.sh` script to start a new instance of the development container and launch a fresh VSCode window connected to it. - -VSCode extends its [single-window-per-folder](https://github.com/microsoft/vscode/issues/2686) process model to devcontainers. Opening the same devcontainer in separate windows doesn't create two separate containers -- instead you have two VSCode windows each connected to the same running container. - -`launch.sh` takes two arguments, a `mode` and a `package manager`. - -* The `mode` argument determines how the devcontainer interacts with the files on the host. -* The `package manager` argument can be either `conda`, or `pip`. This determines whether the devcontainer uses `conda` or `pip` to install the dependencies (the default is `conda`). `pip` is experimental/not working for normal dev, and is currently meant to aid in pip packaging work. - -#### Single mode - -`.devcontainer/launch.sh single` launches the devcontainer with the [default bind mounts](#host-bind-mounts). RMM and cuDF are installed via the package manager. - -Example: -```bash -# Launch a devcontainer that only mounts cuml and installs dependencies via conda -$ .devcontainer/launch.sh single conda - -# or installs dependencies via pip -$ .devcontainer/launch.sh single pip -``` - -#### Unified mode - -`.devcontainer/launch.sh unified` launches the devcontainer with the [default bind mounts](#host-bind-mounts), as well as additional `rmm` and `cudf` bind mounts (assumes RMM and cuDF are siblings to the cuml repository): - -* `${repo}/../.rmm:/home/coder/rmm` -* `${repo}/../.cudf:/home/coder/cudf` - -In this mode, RMM and cuDF will not be installed, but the devcontainer will install the dependencies necessary to build all three. - -Example: -```bash -# Launch a devcontainer that mounts rmm, cudf, and cuml from the host and installs dependencies via conda -$ .devcontainer/launch.sh unified conda - -# or installs dependencies via pip -$ .devcontainer/launch.sh unified pip -``` - -#### Isolated mode - -`.devcontainer/launch.sh isolated` launches the devcontainer without the deps/repo bind mounts, and instead contains a unique copy of the `cuml` source in a Docker [volume](https://docs.docker.com/storage/volumes/). - -Use this mode to launch multiple isolated development containers that can be checked out to separate branches of `cuml`. - -The Docker volume persists after the devcontainer is removed, ensuring you don't pending lose work by accidentally removing the devcontainer. - -However, you will need to manually remove the volume once you've committed and pushed your changes: - -* Use the [`docker volume ls`](https://docs.docker.com/engine/reference/commandline/volume_ls/) command to list all volumes -* Use [`docker volume rm`](https://docs.docker.com/engine/reference/commandline/volume_rm/) or [`docker volume prune`](https://docs.docker.com/engine/reference/commandline/volume_prune/) to clean up unused volumes - -Alternatively, use the "Dev Volumes" tab of the VSCode Dev Containers extension to view and remove unused volumes. - -Examples: -```bash -# Launch a devcontainer that is isolated from changes on the host and installs dependencies via conda -$ .devcontainer/launch.sh isolated conda - -# or installs dependencies via pip -$ .devcontainer/launch.sh isolated pip -``` diff --git a/.devcontainer/conda/single/.devcontainer/devcontainer.json b/.devcontainer/conda/devcontainer.json similarity index 100% rename from .devcontainer/conda/single/.devcontainer/devcontainer.json rename to .devcontainer/conda/devcontainer.json diff --git a/.devcontainer/conda/isolated/.devcontainer/devcontainer.json b/.devcontainer/conda/isolated/.devcontainer/devcontainer.json deleted file mode 100644 index ff79fd7c8b..0000000000 --- a/.devcontainer/conda/isolated/.devcontainer/devcontainer.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "shutdownAction": "stopContainer", - - "build": { - "context": "${localWorkspaceFolder}/.devcontainer", - "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", - "args": { - "CUDA": "12.0", - "LLVM": "16", - "PYTHON_PACKAGE_MANAGER": "conda" - } - }, - "hostRequirements": { - "gpu": true - }, - - "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} - }, - - "overrideFeatureInstallOrder": [ - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" - ], - - "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs}" - ], - - "updateContentCommand": [ - "/bin/bash", "-c", "sudo chown -R $(id -u):$(id -g) /home/coder/${localWorkspaceFolderBasename} && mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml && cp -ar /workspaces/${localWorkspaceFolderBasename} /home/coder/ && rapids-make-vscode-workspace --update" - ], - - "containerEnv": { - "DEFAULT_CONDA_ENV": "rapids" - }, - - "workspaceFolder": "/home/coder", - "workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/${localWorkspaceFolderBasename},type=bind,consistency=consistent", - "mounts": [ - "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=${localWorkspaceFolderBasename}-conda-isolated-${devcontainerId},target=/home/coder/${localWorkspaceFolderBasename},type=volume" - ], - - "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/unified/.devcontainer/devcontainer.json b/.devcontainer/conda/unified/.devcontainer/devcontainer.json deleted file mode 100644 index 40ae843ee7..0000000000 --- a/.devcontainer/conda/unified/.devcontainer/devcontainer.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "shutdownAction": "stopContainer", - - "build": { - "context": "${localWorkspaceFolder}/.devcontainer", - "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", - "args": { - "CUDA": "12.0", - "LLVM": "16", - "PYTHON_PACKAGE_MANAGER": "conda" - } - }, - "hostRequirements": { - "gpu": true - }, - - "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} - }, - - "overrideFeatureInstallOrder": [ - "ghcr.io/rapidsai/devcontainers/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" - ], - - "containerEnv": { - "DEFAULT_CONDA_ENV": "rapids" - }, - - "workspaceFolder": "/home/coder", - "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},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}/../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/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index f47a40c835..0000000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "shutdownAction": "stopContainer", - - "build": { - "context": "${localWorkspaceFolder}/.devcontainer", - "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", - "args": { - "CUDA": "12.0", - "LLVM": "16", - "PYTHON_PACKAGE_MANAGER": "conda" - } - }, - "hostRequirements": { - "gpu": true - }, - - "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} - }, - - "overrideFeatureInstallOrder": [ - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" - ], - - "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}/single}" - ], - - "containerEnv": { - "DEFAULT_CONDA_ENV": "rapids" - }, - - "workspaceFolder": "/home/coder", - "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", - "mounts": [ - "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/${localWorkspaceFolderBasename}/single,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/launch.sh b/.devcontainer/launch.sh deleted file mode 100755 index 60bc3e38ad..0000000000 --- a/.devcontainer/launch.sh +++ /dev/null @@ -1,52 +0,0 @@ -#! /usr/bin/env bash - -launch_devcontainer() { - - # Ensure we're in the repo root - cd "$( cd "$( dirname "$(realpath -m "${BASH_SOURCE[0]}")" )" && pwd )/.."; - - local mode="${1:-single}"; - local pkgs="${2:-conda}"; - - case "${pkgs}" in - pip ) ;; - conda ) ;; - * ) pkgs="conda";; - esac - - case "${mode}" in - single ) ;; - unified ) ;; - isolated) ;; - * ) mode="single";; - esac - - local flavor="${pkgs}/${mode}"; - local workspace="$(basename "$(pwd)")"; - local tmpdir="$(mktemp -d)/${workspace}"; - local path="$(pwd)/.devcontainer/${flavor}"; - - mkdir -p "${tmpdir}"; - cp -arL "$path/.devcontainer" "${tmpdir}/"; - sed -i "s@\${localWorkspaceFolder}@$(pwd)@g" "${tmpdir}/.devcontainer/devcontainer.json"; - path="${tmpdir}"; - - local hash="$(echo -n "${path}" | xxd -pu - | tr -d '[:space:]')"; - local url="vscode://vscode-remote/dev-container+${hash}/home/coder"; - - echo "devcontainer URL: ${url}"; - - local launch=""; - if type open >/dev/null 2>&1; then - launch="open"; - elif type xdg-open >/dev/null 2>&1; then - launch="xdg-open"; - fi - - if [ -n "${launch}" ]; then - code --new-window "${tmpdir}"; - exec "${launch}" "${url}" >/dev/null 2>&1; - fi -} - -launch_devcontainer "$@"; diff --git a/.devcontainer/pip/single/.devcontainer/devcontainer.json b/.devcontainer/pip/devcontainer.json similarity index 100% rename from .devcontainer/pip/single/.devcontainer/devcontainer.json rename to .devcontainer/pip/devcontainer.json diff --git a/.devcontainer/pip/isolated/.devcontainer/devcontainer.json b/.devcontainer/pip/isolated/.devcontainer/devcontainer.json deleted file mode 100644 index 92c62c6396..0000000000 --- a/.devcontainer/pip/isolated/.devcontainer/devcontainer.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "shutdownAction": "stopContainer", - - "build": { - "context": "${localWorkspaceFolder}/.devcontainer", - "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", - "args": { - "CUDA": "12.0", - "LLVM": "16", - "PYTHON_PACKAGE_MANAGER": "pip" - } - }, - "hostRequirements": { - "gpu": true - }, - - "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} - }, - - "overrideFeatureInstallOrder": [ - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" - ], - - "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip}" - ], - - "updateContentCommand": [ - "/bin/bash", "-c", "sudo chown -R $(id -u):$(id -g) /home/coder/${localWorkspaceFolderBasename} && mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml && cp -ar /workspaces/${localWorkspaceFolderBasename} /home/coder/ && rapids-make-vscode-workspace --update" - ], - - "containerEnv": { - "DEFAULT_VIRTUAL_ENV": "rapids" - }, - - "workspaceFolder": "/home/coder", - "workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/${localWorkspaceFolderBasename},type=bind,consistency=consistent", - "mounts": [ - "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=${localWorkspaceFolderBasename}-pip-isolated-${devcontainerId},target=/home/coder/${localWorkspaceFolderBasename},type=volume" - ], - - "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/unified/.devcontainer/devcontainer.json b/.devcontainer/pip/unified/.devcontainer/devcontainer.json deleted file mode 100644 index 8fef9c6567..0000000000 --- a/.devcontainer/pip/unified/.devcontainer/devcontainer.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "shutdownAction": "stopContainer", - - "build": { - "context": "${localWorkspaceFolder}/.devcontainer", - "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", - "args": { - "CUDA": "12.0", - "LLVM": "16", - "PYTHON_PACKAGE_MANAGER": "pip" - } - }, - "hostRequirements": { - "gpu": true - }, - - "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} - }, - - "overrideFeatureInstallOrder": [ - "ghcr.io/rapidsai/devcontainers/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" - ], - - "containerEnv": { - "DEFAULT_VIRTUAL_ENV": "rapids" - }, - - "workspaceFolder": "/home/coder", - "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},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}/../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" - } - } - } - } -} From 976e9205f422df5b4579a41ff76c74fc50a68e50 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 14 Aug 2023 14:00:12 -0700 Subject: [PATCH 22/43] separate CUDA 11.8 and 12.0 devcontainers --- .devcontainer/Dockerfile | 11 +-- .../cuda11.8-conda/devcontainer.json | 96 ++++++++++++++++++ .devcontainer/cuda11.8-pip/devcontainer.json | 97 +++++++++++++++++++ .../devcontainer.json | 5 +- .../{pip => cuda12.0-pip}/devcontainer.json | 5 +- 5 files changed, 203 insertions(+), 11 deletions(-) create mode 100644 .devcontainer/cuda11.8-conda/devcontainer.json create mode 100644 .devcontainer/cuda11.8-pip/devcontainer.json rename .devcontainer/{conda => cuda12.0-conda}/devcontainer.json (93%) rename .devcontainer/{pip => cuda12.0-pip}/devcontainer.json (93%) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index cd8c98f60d..2e00fb6b7d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,16 +1,13 @@ # 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 PIP_BASE +ARG CONDA_BASE ARG PYTHON_PACKAGE_MANAGER=conda -FROM ${REPO}:${RAPIDS}-cpp-llvm${LLVM}-cuda${CUDA}-${DISTRO} as pip-base +FROM ${PIP_BASE} as pip-base -FROM ${REPO}:${RAPIDS}-cpp-mambaforge-${DISTRO} as conda-base +FROM ${CONDA_BASE} as conda-base COPY --from=pip-base /etc/skel/.config/clangd/config.yaml /etc/skel/.config/clangd/config.yaml diff --git a/.devcontainer/cuda11.8-conda/devcontainer.json b/.devcontainer/cuda11.8-conda/devcontainer.json new file mode 100644 index 0000000000..ebae609759 --- /dev/null +++ b/.devcontainer/cuda11.8-conda/devcontainer.json @@ -0,0 +1,96 @@ +{ + "shutdownAction": "stopContainer", + + "build": { + "context": "${localWorkspaceFolder}/.devcontainer", + "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", + "args": { + "CUDA": "11.8", + "PYTHON_PACKAGE_MANAGER": "conda", + "CONDA_BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-mambaforge-ubuntu22.04", + "PIP_BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-ubuntu22.04" + } + }, + "hostRequirements": { + "gpu": true + }, + + "features": { + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} + }, + + "overrideFeatureInstallOrder": [ + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" + ], + + "initializeCommand": [ + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}/single}" + ], + + "updateContentCommand": [ + "/bin/bash", + "-c", + "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", + "mounts": [ + "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/${localWorkspaceFolderBasename}/single,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/cuda11.8-pip/devcontainer.json b/.devcontainer/cuda11.8-pip/devcontainer.json new file mode 100644 index 0000000000..9c4a097e07 --- /dev/null +++ b/.devcontainer/cuda11.8-pip/devcontainer.json @@ -0,0 +1,97 @@ +{ + "shutdownAction": "stopContainer", + + "build": { + "context": "${localWorkspaceFolder}/.devcontainer", + "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", + "args": { + "CUDA": "11.8", + "PYTHON_PACKAGE_MANAGER": "pip", + "CONDA_BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-mambaforge-ubuntu22.04", + "PIP_BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-ubuntu22.04" + } + }, + "hostRequirements": { + "gpu": true + }, + + "features": { + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} + }, + + "overrideFeatureInstallOrder": [ + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" + ], + + "initializeCommand": [ + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/${localWorkspaceFolderBasename}/single}" + ], + + "updateContentCommand": [ + "/bin/bash", + "-c", + "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" + ], + + "containerEnv": { + "PYTHONSAFEPATH": "true", + "PYTHONUNBUFFERED": "true", + "DEFAULT_VIRTUAL_ENV": "rapids" + }, + + "workspaceFolder": "/home/coder", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "mounts": [ + "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/${localWorkspaceFolderBasename}/single,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/conda/devcontainer.json b/.devcontainer/cuda12.0-conda/devcontainer.json similarity index 93% rename from .devcontainer/conda/devcontainer.json rename to .devcontainer/cuda12.0-conda/devcontainer.json index e6f25406f6..f0a41fe2e8 100644 --- a/.devcontainer/conda/devcontainer.json +++ b/.devcontainer/cuda12.0-conda/devcontainer.json @@ -6,8 +6,9 @@ "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { "CUDA": "12.0", - "LLVM": "16", - "PYTHON_PACKAGE_MANAGER": "conda" + "PYTHON_PACKAGE_MANAGER": "conda", + "CONDA_BASE": "rapidsai/devcontainers:23.10-cpp-mambaforge-ubuntu22.04", + "PIP_BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda12.0-ubuntu22.04" } }, "hostRequirements": { diff --git a/.devcontainer/pip/devcontainer.json b/.devcontainer/cuda12.0-pip/devcontainer.json similarity index 93% rename from .devcontainer/pip/devcontainer.json rename to .devcontainer/cuda12.0-pip/devcontainer.json index 1947da0c3c..c9f7e41f4a 100644 --- a/.devcontainer/pip/devcontainer.json +++ b/.devcontainer/cuda12.0-pip/devcontainer.json @@ -6,8 +6,9 @@ "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", "args": { "CUDA": "12.0", - "LLVM": "16", - "PYTHON_PACKAGE_MANAGER": "pip" + "PYTHON_PACKAGE_MANAGER": "pip", + "CONDA_BASE": "rapidsai/devcontainers:23.10-cpp-mambaforge-ubuntu22.04", + "PIP_BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda12.0-ubuntu22.04" } }, "hostRequirements": { From 97b8f8e7cced9957beb499abbc6321ed1a85af81 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 14 Aug 2023 21:48:38 +0000 Subject: [PATCH 23/43] separate CUDA 11 and 12 packages for requirements output type --- dependencies.yaml | 77 ++++++++++++++++++++++++++++++++++++------- python/pyproject.toml | 2 ++ 2 files changed, 67 insertions(+), 12 deletions(-) diff --git a/dependencies.yaml b/dependencies.yaml index 659743a1e5..c635d5c734 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -153,9 +153,16 @@ dependencies: - scikit-build>=0.13.1 - cython>=3.0.0 - &treelite treelite==3.2.0 - - pylibraft==23.10.* - - rmm==23.10.* - - output_types: pyproject + - output_types: conda + packages: + - &pylibraft_conda pylibraft==23.10.* + - &rmm_conda rmm==23.10.* + - output_types: requirements + packages: + # pip recognizes the index as a global option for the requirements.txt file + # This index is needed for cudf and rmm. + - --extra-index-url=https://pypi.nvidia.com + - output_types: [pyproject, requirements] packages: - wheel - setuptools @@ -170,14 +177,27 @@ dependencies: - matrix: # All CUDA 11 versions packages: - &cuda_python11 cuda-python>=11.7.1,<12.0a0 + - output_types: [requirements, pyproject] + matrices: + - matrix: {cuda: "12.0"} + packages: + - pylibraft-cu12==23.10.* + - rmm-cu12==23.10.* + - matrix: {cuda: "11.8"} + packages: &py_build_packages_cu11 + - &pylibraft_cu11 pylibraft-cu11==23.10.* + - &rmm_cu11 rmm-cu11==23.10.* + - {matrix: {cuda: "11.5"}, packages: *py_build_packages_cu11} + - {matrix: {cuda: "11.4"}, packages: *py_build_packages_cu11} + - {matrix: {cuda: "11.2"}, packages: *py_build_packages_cu11} + - {matrix: null, packages: [*pylibraft_conda, *rmm_conda] } + py_run: common: - output_types: [conda, requirements, pyproject] packages: - - cudf==23.10.* - dask==2023.7.1 - dask-cuda==23.10.* - - dask-cudf==23.10.* - distributed==2023.7.1 - joblib>=0.11 - numba>=0.57 @@ -185,15 +205,20 @@ dependencies: # we make it optional (i.e. an extra for pip # installation/run_constrained for conda)? - scipy>=1.8.0 - - raft-dask==23.10.* - *treelite - - output_types: [conda, requirements] - packages: - - cupy>=12.0.0 - output_types: conda packages: + - &cudf_conda cudf==23.10.* + - cupy>=12.0.0 - dask-core==2023.7.1 - - output_types: pyproject + - &dask_cudf_conda dask-cudf==23.10.* + - &raft_dask_conda raft-dask==23.10.* + - output_types: requirements + packages: + # pip recognizes the index as a global option for the requirements.txt file + # This index is needed for cudf and rmm. + - --extra-index-url=https://pypi.nvidia.com + - output_types: [pyproject, requirements] packages: - *treelite_runtime - cupy-cuda11x>=12.0.0 @@ -203,11 +228,40 @@ dependencies: - matrix: arch: x86_64 packages: - - cupy-cuda115>=12.0.0 + - cupy-cuda11x>=12.0.0 - matrix: arch: aarch64 packages: - cupy-cuda11x -f https://pip.cupy.dev/aarch64 # TODO: Verify that this works. + - output_types: [requirements, pyproject] + matrices: + - matrix: {cuda: "12.0"} + packages: + - cudf-cu12==23.10.* + - dask-cudf-cu12==23.10.* + - pylibraft-cu12==23.10.* + - raft-dask-cu12==23.10.* + - rmm-cu12==23.10.* + - matrix: # All CUDA 11 versions + packages: + - matrix: {cuda: "11.8"} + packages: &py_run_packages_cu11 + - &cudf_cu11 cudf-cu11==23.10.* + - &dask_cudf_cu11 dask-cudf-cu11==23.10.* + - *pylibraft_cu11 + - &raft_dask_cu11 raft-dask-cu11==23.10.* + - *rmm_cu11 + - {matrix: {cuda: "11.5"}, packages: *py_run_packages_cu11} + - {matrix: {cuda: "11.4"}, packages: *py_run_packages_cu11} + - {matrix: {cuda: "11.2"}, packages: *py_run_packages_cu11} + - matrix: null + packages: + - *cudf_conda + - *dask_cudf_conda + - *pylibraft_conda + - *raft_dask_conda + - *pylibraft_conda + - *rmm_conda cudatoolkit: specific: - output_types: conda @@ -367,4 +421,3 @@ dependencies: - pandas - *scikit_learn - seaborn - diff --git a/python/pyproject.toml b/python/pyproject.toml index 869196d27f..520ace22b9 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -65,7 +65,9 @@ dependencies = [ "distributed==2023.7.1", "joblib>=0.11", "numba>=0.57", + "pylibraft==23.10.*", "raft-dask==23.10.*", + "rmm==23.10.*", "scipy>=1.8.0", "treelite==3.2.0", "treelite_runtime==3.2.0", From 262b3d3092e9cfd275cce64c1dc1e18b491cb0a3 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 17 Aug 2023 02:44:33 -0700 Subject: [PATCH 24/43] clean up envvars, mounts, and build args, add codespaces post-attach command workaround --- .devcontainer/Dockerfile | 12 ++++++------ .devcontainer/cuda11.8-conda/devcontainer.json | 17 +++++++++-------- .devcontainer/cuda11.8-pip/devcontainer.json | 15 +++++++-------- .devcontainer/cuda12.0-conda/devcontainer.json | 17 +++++++++-------- .devcontainer/cuda12.0-pip/devcontainer.json | 15 +++++++-------- 5 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 2e00fb6b7d..9d35e3f97f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,15 +1,15 @@ # syntax=docker/dockerfile:1.5 -ARG PIP_BASE -ARG CONDA_BASE - +ARG BASE ARG PYTHON_PACKAGE_MANAGER=conda -FROM ${PIP_BASE} as pip-base +FROM ${BASE} as pip-base + +ENV DEFAULT_VIRTUAL_ENV=rapids -FROM ${CONDA_BASE} 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/.devcontainer/cuda11.8-conda/devcontainer.json b/.devcontainer/cuda11.8-conda/devcontainer.json index ebae609759..98a9431ebf 100644 --- a/.devcontainer/cuda11.8-conda/devcontainer.json +++ b/.devcontainer/cuda11.8-conda/devcontainer.json @@ -7,8 +7,7 @@ "args": { "CUDA": "11.8", "PYTHON_PACKAGE_MANAGER": "conda", - "CONDA_BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-mambaforge-ubuntu22.04", - "PIP_BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-ubuntu22.04" + "BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-mambaforge-ubuntu22.04" } }, "hostRequirements": { @@ -24,7 +23,7 @@ ], "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}/single}" + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}}" ], "updateContentCommand": [ @@ -33,18 +32,20 @@ "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" ], - "containerEnv": { - "DEFAULT_CONDA_ENV": "rapids" - }, + "postAttachCommand": [ + "/bin/bash", + "-c", + "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi" + ], "workspaceFolder": "/home/coder", - "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/cuml,type=bind,consistency=consistent", "mounts": [ "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/${localWorkspaceFolderBasename}/single,target=/home/coder/.conda/envs,type=bind,consistency=consistent" + "source=${localWorkspaceFolder}/../.conda/${localWorkspaceFolderBasename},target=/home/coder/.conda/envs,type=bind,consistency=consistent" ], "customizations": { diff --git a/.devcontainer/cuda11.8-pip/devcontainer.json b/.devcontainer/cuda11.8-pip/devcontainer.json index 9c4a097e07..b4d6c2bc91 100644 --- a/.devcontainer/cuda11.8-pip/devcontainer.json +++ b/.devcontainer/cuda11.8-pip/devcontainer.json @@ -7,8 +7,7 @@ "args": { "CUDA": "11.8", "PYTHON_PACKAGE_MANAGER": "pip", - "CONDA_BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-mambaforge-ubuntu22.04", - "PIP_BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-ubuntu22.04" + "BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-ubuntu22.04" } }, "hostRequirements": { @@ -33,14 +32,14 @@ "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" ], - "containerEnv": { - "PYTHONSAFEPATH": "true", - "PYTHONUNBUFFERED": "true", - "DEFAULT_VIRTUAL_ENV": "rapids" - }, + "postAttachCommand": [ + "/bin/bash", + "-c", + "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi" + ], "workspaceFolder": "/home/coder", - "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/cuml,type=bind,consistency=consistent", "mounts": [ "source=${localWorkspaceFolder}/../.aws,target=/home/coder/.aws,type=bind,consistency=consistent", "source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent", diff --git a/.devcontainer/cuda12.0-conda/devcontainer.json b/.devcontainer/cuda12.0-conda/devcontainer.json index f0a41fe2e8..424cd55887 100644 --- a/.devcontainer/cuda12.0-conda/devcontainer.json +++ b/.devcontainer/cuda12.0-conda/devcontainer.json @@ -7,8 +7,7 @@ "args": { "CUDA": "12.0", "PYTHON_PACKAGE_MANAGER": "conda", - "CONDA_BASE": "rapidsai/devcontainers:23.10-cpp-mambaforge-ubuntu22.04", - "PIP_BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda12.0-ubuntu22.04" + "BASE": "rapidsai/devcontainers:23.10-cpp-mambaforge-ubuntu22.04" } }, "hostRequirements": { @@ -24,7 +23,7 @@ ], "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}/single}" + "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}}" ], "updateContentCommand": [ @@ -33,18 +32,20 @@ "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" ], - "containerEnv": { - "DEFAULT_CONDA_ENV": "rapids" - }, + "postAttachCommand": [ + "/bin/bash", + "-c", + "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi" + ], "workspaceFolder": "/home/coder", - "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/cuml,type=bind,consistency=consistent", "mounts": [ "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/${localWorkspaceFolderBasename}/single,target=/home/coder/.conda/envs,type=bind,consistency=consistent" + "source=${localWorkspaceFolder}/../.conda/${localWorkspaceFolderBasename},target=/home/coder/.conda/envs,type=bind,consistency=consistent" ], "customizations": { diff --git a/.devcontainer/cuda12.0-pip/devcontainer.json b/.devcontainer/cuda12.0-pip/devcontainer.json index c9f7e41f4a..54b7d06967 100644 --- a/.devcontainer/cuda12.0-pip/devcontainer.json +++ b/.devcontainer/cuda12.0-pip/devcontainer.json @@ -7,8 +7,7 @@ "args": { "CUDA": "12.0", "PYTHON_PACKAGE_MANAGER": "pip", - "CONDA_BASE": "rapidsai/devcontainers:23.10-cpp-mambaforge-ubuntu22.04", - "PIP_BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda12.0-ubuntu22.04" + "BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda12.0-ubuntu22.04" } }, "hostRequirements": { @@ -33,14 +32,14 @@ "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" ], - "containerEnv": { - "PYTHONSAFEPATH": "true", - "PYTHONUNBUFFERED": "true", - "DEFAULT_VIRTUAL_ENV": "rapids" - }, + "postAttachCommand": [ + "/bin/bash", + "-c", + "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi" + ], "workspaceFolder": "/home/coder", - "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/${localWorkspaceFolderBasename},type=bind,consistency=consistent", + "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/cuml,type=bind,consistency=consistent", "mounts": [ "source=${localWorkspaceFolder}/../.aws,target=/home/coder/.aws,type=bind,consistency=consistent", "source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent", From cf50730594d0c5d231d5c4e7c6220f5691a1e389 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 17 Aug 2023 08:54:31 -0700 Subject: [PATCH 25/43] consolidate common vscode customizations --- .../cuda11.8-conda/devcontainer.json | 44 ++----------------- .devcontainer/cuda11.8-pip/devcontainer.json | 44 ++----------------- .../cuda12.0-conda/devcontainer.json | 44 ++----------------- .devcontainer/cuda12.0-pip/devcontainer.json | 44 ++----------------- 4 files changed, 12 insertions(+), 164 deletions(-) diff --git a/.devcontainer/cuda11.8-conda/devcontainer.json b/.devcontainer/cuda11.8-conda/devcontainer.json index 98a9431ebf..489b73f431 100644 --- a/.devcontainer/cuda11.8-conda/devcontainer.json +++ b/.devcontainer/cuda11.8-conda/devcontainer.json @@ -51,47 +51,9 @@ "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" - } - } + "ms-python.flake8", + "nvidia.nsight-vscode-edition" + ] } } } diff --git a/.devcontainer/cuda11.8-pip/devcontainer.json b/.devcontainer/cuda11.8-pip/devcontainer.json index b4d6c2bc91..831dba71e3 100644 --- a/.devcontainer/cuda11.8-pip/devcontainer.json +++ b/.devcontainer/cuda11.8-pip/devcontainer.json @@ -50,47 +50,9 @@ "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" - } - } + "ms-python.flake8", + "nvidia.nsight-vscode-edition" + ] } } } diff --git a/.devcontainer/cuda12.0-conda/devcontainer.json b/.devcontainer/cuda12.0-conda/devcontainer.json index 424cd55887..469eaf094f 100644 --- a/.devcontainer/cuda12.0-conda/devcontainer.json +++ b/.devcontainer/cuda12.0-conda/devcontainer.json @@ -51,47 +51,9 @@ "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" - } - } + "ms-python.flake8", + "nvidia.nsight-vscode-edition" + ] } } } diff --git a/.devcontainer/cuda12.0-pip/devcontainer.json b/.devcontainer/cuda12.0-pip/devcontainer.json index 54b7d06967..e48afb1c4e 100644 --- a/.devcontainer/cuda12.0-pip/devcontainer.json +++ b/.devcontainer/cuda12.0-pip/devcontainer.json @@ -50,47 +50,9 @@ "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" - } - } + "ms-python.flake8", + "nvidia.nsight-vscode-edition" + ] } } } From 040741a65a793d3ce090473f458f3a7a29a7ce66 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 23 Aug 2023 12:01:18 -0700 Subject: [PATCH 26/43] separate devcontainer mounts by CUDA version --- .../cuda11.8-conda/devcontainer.json | 30 +++---------------- .devcontainer/cuda11.8-pip/devcontainer.json | 30 +++---------------- .../cuda12.0-conda/devcontainer.json | 30 +++---------------- .devcontainer/cuda12.0-pip/devcontainer.json | 28 ++--------------- 4 files changed, 15 insertions(+), 103 deletions(-) diff --git a/.devcontainer/cuda11.8-conda/devcontainer.json b/.devcontainer/cuda11.8-conda/devcontainer.json index 489b73f431..aa1ab121b6 100644 --- a/.devcontainer/cuda11.8-conda/devcontainer.json +++ b/.devcontainer/cuda11.8-conda/devcontainer.json @@ -1,6 +1,4 @@ { - "shutdownAction": "stopContainer", - "build": { "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", @@ -10,34 +8,15 @@ "BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-mambaforge-ubuntu22.04" } }, - "hostRequirements": { - "gpu": true - }, - + "hostRequirements": {"gpu": "optional"}, "features": { "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} }, - "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" ], - - "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}}" - ], - - "updateContentCommand": [ - "/bin/bash", - "-c", - "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" - ], - - "postAttachCommand": [ - "/bin/bash", - "-c", - "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi" - ], - + "initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda11.8-envs}"], + "postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"], "workspaceFolder": "/home/coder", "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/cuml,type=bind,consistency=consistent", "mounts": [ @@ -45,9 +24,8 @@ "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/${localWorkspaceFolderBasename},target=/home/coder/.conda/envs,type=bind,consistency=consistent" + "source=${localWorkspaceFolder}/../.conda/${localWorkspaceFolderBasename}-cuda11.8-envs,target=/home/coder/.conda/envs,type=bind,consistency=consistent" ], - "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/cuda11.8-pip/devcontainer.json b/.devcontainer/cuda11.8-pip/devcontainer.json index 831dba71e3..2b530a3fc1 100644 --- a/.devcontainer/cuda11.8-pip/devcontainer.json +++ b/.devcontainer/cuda11.8-pip/devcontainer.json @@ -1,6 +1,4 @@ { - "shutdownAction": "stopContainer", - "build": { "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", @@ -10,43 +8,23 @@ "BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-ubuntu22.04" } }, - "hostRequirements": { - "gpu": true - }, - + "hostRequirements": {"gpu": "optional"}, "features": { "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} }, - "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" ], - - "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/${localWorkspaceFolderBasename}/single}" - ], - - "updateContentCommand": [ - "/bin/bash", - "-c", - "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" - ], - - "postAttachCommand": [ - "/bin/bash", - "-c", - "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi" - ], - + "initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda11.8-venvs}"], + "postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"], "workspaceFolder": "/home/coder", "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/cuml,type=bind,consistency=consistent", "mounts": [ "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/${localWorkspaceFolderBasename}/single,target=/home/coder/.local,type=bind,consistency=consistent" + "source=${localWorkspaceFolder}/../.local/share/${localWorkspaceFolderBasename}-cuda11.8-venvs,target=/home/coder/.local/share/venvs,type=bind,consistency=consistent" ], - "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/cuda12.0-conda/devcontainer.json b/.devcontainer/cuda12.0-conda/devcontainer.json index 469eaf094f..d3746ae45c 100644 --- a/.devcontainer/cuda12.0-conda/devcontainer.json +++ b/.devcontainer/cuda12.0-conda/devcontainer.json @@ -1,6 +1,4 @@ { - "shutdownAction": "stopContainer", - "build": { "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", @@ -10,34 +8,15 @@ "BASE": "rapidsai/devcontainers:23.10-cpp-mambaforge-ubuntu22.04" } }, - "hostRequirements": { - "gpu": true - }, - + "hostRequirements": {"gpu": "optional"}, "features": { "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} }, - "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" ], - - "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}}" - ], - - "updateContentCommand": [ - "/bin/bash", - "-c", - "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" - ], - - "postAttachCommand": [ - "/bin/bash", - "-c", - "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi" - ], - + "initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda12.0-envs}"], + "postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"], "workspaceFolder": "/home/coder", "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/cuml,type=bind,consistency=consistent", "mounts": [ @@ -45,9 +24,8 @@ "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/${localWorkspaceFolderBasename},target=/home/coder/.conda/envs,type=bind,consistency=consistent" + "source=${localWorkspaceFolder}/../.conda/${localWorkspaceFolderBasename}-cuda12.0-envs,target=/home/coder/.conda/envs,type=bind,consistency=consistent" ], - "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/cuda12.0-pip/devcontainer.json b/.devcontainer/cuda12.0-pip/devcontainer.json index e48afb1c4e..2702b11ad0 100644 --- a/.devcontainer/cuda12.0-pip/devcontainer.json +++ b/.devcontainer/cuda12.0-pip/devcontainer.json @@ -1,6 +1,4 @@ { - "shutdownAction": "stopContainer", - "build": { "context": "${localWorkspaceFolder}/.devcontainer", "dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", @@ -10,34 +8,15 @@ "BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda12.0-ubuntu22.04" } }, - "hostRequirements": { - "gpu": true - }, - + "hostRequirements": {"gpu": "optional"}, "features": { "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} }, - "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" ], - - "initializeCommand": [ - "/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/${localWorkspaceFolderBasename}/single}" - ], - - "updateContentCommand": [ - "/bin/bash", - "-c", - "mkdir -m 0755 -p ~/.config/clangd && cp -n /etc/skel/.config/clangd/config.yaml ~/.config/clangd/config.yaml" - ], - - "postAttachCommand": [ - "/bin/bash", - "-c", - "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi" - ], - + "initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda12.0-venvs}"], + "postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"], "workspaceFolder": "/home/coder", "workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/cuml,type=bind,consistency=consistent", "mounts": [ @@ -46,7 +25,6 @@ "source=${localWorkspaceFolder}/../.config,target=/home/coder/.config,type=bind,consistency=consistent", "source=${localWorkspaceFolder}/../.local/${localWorkspaceFolderBasename}/single,target=/home/coder/.local,type=bind,consistency=consistent" ], - "customizations": { "vscode": { "extensions": [ From cd76e314a8fa7d1643ed4529bcb503f338aeb242 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Wed, 23 Aug 2023 12:13:20 -0700 Subject: [PATCH 27/43] add devcontainer build jobs to PR workflow --- .github/workflows/pr.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index b589dc8b84..d6de15e3ec 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -30,6 +30,7 @@ jobs: uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.10 with: enable_check_generated_files: false + enable_check_pr_job_dependencies: false clang-tidy: needs: checks secrets: inherit @@ -109,3 +110,9 @@ jobs: with: build_type: pull-request script: ci/test_wheel.sh + devcontainer: + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/build-in-devcontainer.yaml@fea/devcontainers + with: + build_command: | + build-cuml; From 577026c62ef174e6bb5c6f33e645631bce365820 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 24 Aug 2023 02:11:10 +0000 Subject: [PATCH 28/43] find cuml package before treelite so we get fmt from RMM and not treelite --- python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 120968dc1a..65e450f7fa 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -66,8 +66,8 @@ if(FIND_CUML_CPP) include(rapids-cpm) include(rapids-export) rapids_cpm_init() - include(../cpp/cmake/thirdparty/get_treelite.cmake) find_package(cuml ${CUML_VERSION} REQUIRED) + include(../cpp/cmake/thirdparty/get_treelite.cmake) else() set(cuml_FOUND OFF) endif() From 5d58d6f23425e9854ef95c031fab67ef8c776700 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 31 Aug 2023 09:16:38 -0700 Subject: [PATCH 29/43] fix venvs mount path --- .devcontainer/cuda12.0-pip/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/cuda12.0-pip/devcontainer.json b/.devcontainer/cuda12.0-pip/devcontainer.json index 2702b11ad0..00d8369daf 100644 --- a/.devcontainer/cuda12.0-pip/devcontainer.json +++ b/.devcontainer/cuda12.0-pip/devcontainer.json @@ -23,7 +23,7 @@ "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/${localWorkspaceFolderBasename}/single,target=/home/coder/.local,type=bind,consistency=consistent" + "source=${localWorkspaceFolder}/../.local/share/${localWorkspaceFolderBasename}-cuda12.0-venvs,target=/home/coder/.local/share/venvs,type=bind,consistency=consistent" ], "customizations": { "vscode": { From f86b3593c7ba245337c519e577aa7992b6940c09 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 31 Aug 2023 18:16:20 +0000 Subject: [PATCH 30/43] comment out other jobs for now, print git and ssh configs --- .github/workflows/pr.yaml | 187 ++++++++++++++++++++------------------ 1 file changed, 97 insertions(+), 90 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index d6de15e3ec..cee245e8de 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -13,16 +13,17 @@ jobs: pr-builder: needs: - checks - - clang-tidy - - conda-cpp-build - - conda-cpp-tests - - conda-python-build - - conda-python-tests-singlegpu - - conda-python-tests-dask - - conda-notebook-tests - - docs-build - - wheel-build-cuml - - wheel-tests-cuml + # - clang-tidy + # - conda-cpp-build + # - conda-cpp-tests + # - conda-python-build + # - conda-python-tests-singlegpu + # - conda-python-tests-dask + # - conda-notebook-tests + # - docs-build + # - wheel-build-cuml + # - wheel-tests-cuml + - devcontainer secrets: inherit uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.10 checks: @@ -30,89 +31,95 @@ jobs: uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.10 with: enable_check_generated_files: false - enable_check_pr_job_dependencies: false - clang-tidy: - needs: checks - secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 - with: - build_type: pull-request - node_type: "cpu8" - arch: "amd64" - container_image: "rapidsai/ci:latest" - run_script: "ci/run_clang_tidy.sh" - conda-cpp-build: - needs: checks - secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.10 - with: - build_type: pull-request - conda-cpp-tests: - needs: conda-cpp-build - secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.10 - with: - build_type: pull-request - conda-python-build: - needs: conda-cpp-build - secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.10 - with: - build_type: pull-request - conda-python-tests-singlegpu: - needs: conda-python-build - secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10 - with: - build_type: pull-request - test_script: "ci/test_python_singlegpu.sh" - conda-python-tests-dask: - needs: conda-python-build - secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10 - with: - build_type: pull-request - test_script: "ci/test_python_dask.sh" - conda-notebook-tests: - needs: conda-python-build - secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 - with: - build_type: pull-request - node_type: "gpu-v100-latest-1" - arch: "amd64" - container_image: "rapidsai/ci:latest" - run_script: "ci/test_notebooks.sh" - docs-build: - needs: conda-python-build - secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 - with: - build_type: pull-request - node_type: "gpu-v100-latest-1" - arch: "amd64" - container_image: "rapidsai/ci:latest" - run_script: "ci/build_docs.sh" - wheel-build-cuml: - needs: checks - secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.10 - with: - build_type: pull-request - script: ci/build_wheel.sh - extra-repo: rapidsai/cumlprims_mg - extra-repo-sha: branch-23.02 - extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY - wheel-tests-cuml: - needs: wheel-build-cuml - secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.10 - with: - build_type: pull-request - script: ci/test_wheel.sh + # enable_check_pr_job_dependencies: false + # clang-tidy: + # needs: checks + # secrets: inherit + # uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 + # with: + # build_type: pull-request + # node_type: "cpu8" + # arch: "amd64" + # container_image: "rapidsai/ci:latest" + # run_script: "ci/run_clang_tidy.sh" + # conda-cpp-build: + # needs: checks + # secrets: inherit + # uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.10 + # with: + # build_type: pull-request + # conda-cpp-tests: + # needs: conda-cpp-build + # secrets: inherit + # uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.10 + # with: + # build_type: pull-request + # conda-python-build: + # needs: conda-cpp-build + # secrets: inherit + # uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.10 + # with: + # build_type: pull-request + # conda-python-tests-singlegpu: + # needs: conda-python-build + # secrets: inherit + # uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10 + # with: + # build_type: pull-request + # test_script: "ci/test_python_singlegpu.sh" + # conda-python-tests-dask: + # needs: conda-python-build + # secrets: inherit + # uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10 + # with: + # build_type: pull-request + # test_script: "ci/test_python_dask.sh" + # conda-notebook-tests: + # needs: conda-python-build + # secrets: inherit + # uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 + # with: + # build_type: pull-request + # node_type: "gpu-v100-latest-1" + # arch: "amd64" + # container_image: "rapidsai/ci:latest" + # run_script: "ci/test_notebooks.sh" + # docs-build: + # needs: conda-python-build + # secrets: inherit + # uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 + # with: + # build_type: pull-request + # node_type: "gpu-v100-latest-1" + # arch: "amd64" + # container_image: "rapidsai/ci:latest" + # run_script: "ci/build_docs.sh" + # wheel-build-cuml: + # needs: checks + # secrets: inherit + # uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.10 + # with: + # build_type: pull-request + # script: ci/build_wheel.sh + # extra-repo: rapidsai/cumlprims_mg + # extra-repo-sha: branch-23.02 + # extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY + # wheel-tests-cuml: + # needs: wheel-build-cuml + # secrets: inherit + # uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.10 + # with: + # build_type: pull-request + # script: ci/test_wheel.sh devcontainer: secrets: inherit uses: rapidsai/shared-action-workflows/.github/workflows/build-in-devcontainer.yaml@fea/devcontainers with: build_command: | + echo ".gitconfig:" + cat ~/.gitconfig; + echo "ssh_config:" + cat ~/.ssh/config; + echo "ssh_known_hosts:" + cat ~/.ssh/known_hosts; build-cuml; From 6b9192c6d7a05ac2fc6a0e9e024000bf50f18d8a Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 31 Aug 2023 18:32:39 +0000 Subject: [PATCH 31/43] let the devcontainer action print the configs --- .github/workflows/pr.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index cee245e8de..99650feac8 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -116,10 +116,4 @@ jobs: uses: rapidsai/shared-action-workflows/.github/workflows/build-in-devcontainer.yaml@fea/devcontainers with: build_command: | - echo ".gitconfig:" - cat ~/.gitconfig; - echo "ssh_config:" - cat ~/.ssh/config; - echo "ssh_known_hosts:" - cat ~/.ssh/known_hosts; build-cuml; From 0f28d8a3cf37964e6a60122e68835a34062d5251 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 31 Aug 2023 21:44:50 +0000 Subject: [PATCH 32/43] pass the deploy key as an input --- .github/workflows/pr.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 99650feac8..25d1870b37 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -115,5 +115,6 @@ jobs: secrets: inherit uses: rapidsai/shared-action-workflows/.github/workflows/build-in-devcontainer.yaml@fea/devcontainers with: + ssh-deploy-keys: "${{ secrets.CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY }}" build_command: | build-cuml; From 81f8e80c88ecc759a01cf70fd2bd6d3e7dbf734e Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 31 Aug 2023 21:48:42 +0000 Subject: [PATCH 33/43] pass in extra repo key instead of the actual secret --- .github/workflows/pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 25d1870b37..ca36e22d6b 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -115,6 +115,6 @@ jobs: secrets: inherit uses: rapidsai/shared-action-workflows/.github/workflows/build-in-devcontainer.yaml@fea/devcontainers with: - ssh-deploy-keys: "${{ secrets.CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY }}" + extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY build_command: | build-cuml; From 258913eae086479c4c306fa26a4428436ed7b84a Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 31 Aug 2023 23:59:10 +0000 Subject: [PATCH 34/43] uncomment rest of PR jobs --- .github/workflows/pr.yaml | 183 +++++++++++++++++++------------------- 1 file changed, 92 insertions(+), 91 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index ca36e22d6b..494e7eb133 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -13,17 +13,16 @@ jobs: pr-builder: needs: - checks - # - clang-tidy - # - conda-cpp-build - # - conda-cpp-tests - # - conda-python-build - # - conda-python-tests-singlegpu - # - conda-python-tests-dask - # - conda-notebook-tests - # - docs-build - # - wheel-build-cuml - # - wheel-tests-cuml - - devcontainer + - clang-tidy + - conda-cpp-build + - conda-cpp-tests + - conda-python-build + - conda-python-tests-singlegpu + - conda-python-tests-dask + - conda-notebook-tests + - docs-build + - wheel-build-cuml + - wheel-tests-cuml secrets: inherit uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.10 checks: @@ -31,90 +30,92 @@ jobs: uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.10 with: enable_check_generated_files: false - # enable_check_pr_job_dependencies: false - # clang-tidy: - # needs: checks - # secrets: inherit - # uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 - # with: - # build_type: pull-request - # node_type: "cpu8" - # arch: "amd64" - # container_image: "rapidsai/ci:latest" - # run_script: "ci/run_clang_tidy.sh" - # conda-cpp-build: - # needs: checks - # secrets: inherit - # uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.10 - # with: - # build_type: pull-request - # conda-cpp-tests: - # needs: conda-cpp-build - # secrets: inherit - # uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.10 - # with: - # build_type: pull-request - # conda-python-build: - # needs: conda-cpp-build - # secrets: inherit - # uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.10 - # with: - # build_type: pull-request - # conda-python-tests-singlegpu: - # needs: conda-python-build - # secrets: inherit - # uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10 - # with: - # build_type: pull-request - # test_script: "ci/test_python_singlegpu.sh" - # conda-python-tests-dask: - # needs: conda-python-build - # secrets: inherit - # uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10 - # with: - # build_type: pull-request - # test_script: "ci/test_python_dask.sh" - # conda-notebook-tests: - # needs: conda-python-build - # secrets: inherit - # uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 - # with: - # build_type: pull-request - # node_type: "gpu-v100-latest-1" - # arch: "amd64" - # container_image: "rapidsai/ci:latest" - # run_script: "ci/test_notebooks.sh" - # docs-build: - # needs: conda-python-build - # secrets: inherit - # uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 - # with: - # build_type: pull-request - # node_type: "gpu-v100-latest-1" - # arch: "amd64" - # container_image: "rapidsai/ci:latest" - # run_script: "ci/build_docs.sh" - # wheel-build-cuml: - # needs: checks - # secrets: inherit - # uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.10 - # with: - # build_type: pull-request - # script: ci/build_wheel.sh - # extra-repo: rapidsai/cumlprims_mg - # extra-repo-sha: branch-23.02 - # extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY - # wheel-tests-cuml: - # needs: wheel-build-cuml - # secrets: inherit - # uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.10 - # with: - # build_type: pull-request - # script: ci/test_wheel.sh + enable_check_pr_job_dependencies: false + clang-tidy: + needs: checks + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 + with: + build_type: pull-request + node_type: "cpu8" + arch: "amd64" + container_image: "rapidsai/ci:latest" + run_script: "ci/run_clang_tidy.sh" + conda-cpp-build: + needs: checks + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.10 + with: + build_type: pull-request + conda-cpp-tests: + needs: conda-cpp-build + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.10 + with: + build_type: pull-request + conda-python-build: + needs: conda-cpp-build + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.10 + with: + build_type: pull-request + conda-python-tests-singlegpu: + needs: conda-python-build + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10 + with: + build_type: pull-request + test_script: "ci/test_python_singlegpu.sh" + conda-python-tests-dask: + needs: conda-python-build + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10 + with: + build_type: pull-request + test_script: "ci/test_python_dask.sh" + conda-notebook-tests: + needs: conda-python-build + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 + with: + build_type: pull-request + node_type: "gpu-v100-latest-1" + arch: "amd64" + container_image: "rapidsai/ci:latest" + run_script: "ci/test_notebooks.sh" + docs-build: + needs: conda-python-build + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10 + with: + build_type: pull-request + node_type: "gpu-v100-latest-1" + arch: "amd64" + container_image: "rapidsai/ci:latest" + run_script: "ci/build_docs.sh" + wheel-build-cuml: + needs: checks + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.10 + with: + build_type: pull-request + script: ci/build_wheel.sh + extra-repo: rapidsai/cumlprims_mg + extra-repo-sha: branch-23.02 + extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY + wheel-tests-cuml: + needs: wheel-build-cuml + secrets: inherit + uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.10 + with: + build_type: pull-request + script: ci/test_wheel.sh devcontainer: secrets: inherit uses: rapidsai/shared-action-workflows/.github/workflows/build-in-devcontainer.yaml@fea/devcontainers with: extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY build_command: | + sccache -s; build-cuml; + sccache -s; From e8a4cb43744d98222c0116585d5329cdeb870284 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Tue, 12 Sep 2023 15:46:52 -0700 Subject: [PATCH 35/43] add ucx feature to pip devcontainers --- .devcontainer/cuda11.8-pip/devcontainer.json | 1 + .devcontainer/cuda12.0-pip/devcontainer.json | 1 + 2 files changed, 2 insertions(+) diff --git a/.devcontainer/cuda11.8-pip/devcontainer.json b/.devcontainer/cuda11.8-pip/devcontainer.json index 2b530a3fc1..bea6719c40 100644 --- a/.devcontainer/cuda11.8-pip/devcontainer.json +++ b/.devcontainer/cuda11.8-pip/devcontainer.json @@ -10,6 +10,7 @@ }, "hostRequirements": {"gpu": "optional"}, "features": { + "ghcr.io/rapidsai/devcontainers/features/ucx:23.10": {"version": "1.14.1"}, "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} }, "overrideFeatureInstallOrder": [ diff --git a/.devcontainer/cuda12.0-pip/devcontainer.json b/.devcontainer/cuda12.0-pip/devcontainer.json index 00d8369daf..79818b0109 100644 --- a/.devcontainer/cuda12.0-pip/devcontainer.json +++ b/.devcontainer/cuda12.0-pip/devcontainer.json @@ -10,6 +10,7 @@ }, "hostRequirements": {"gpu": "optional"}, "features": { + "ghcr.io/rapidsai/devcontainers/features/ucx:23.10": {"version": "1.14.1"}, "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} }, "overrideFeatureInstallOrder": [ From a35d4fdd6e89cbc7850e4b865367016bfe78c81e Mon Sep 17 00:00:00 2001 From: ptaylor Date: Tue, 12 Sep 2023 15:47:39 -0700 Subject: [PATCH 36/43] be more explicit in update-versions.sh, make devcontainer build required in pr jobs --- .github/workflows/pr.yaml | 8 ++++---- ci/release/update-version.sh | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 494e7eb133..4dc06f5d15 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -23,6 +23,7 @@ jobs: - docs-build - wheel-build-cuml - wheel-tests-cuml + - build-in-devcontainer secrets: inherit uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.10 checks: @@ -30,7 +31,6 @@ jobs: uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.10 with: enable_check_generated_files: false - enable_check_pr_job_dependencies: false clang-tidy: needs: checks secrets: inherit @@ -110,12 +110,12 @@ jobs: with: build_type: pull-request script: ci/test_wheel.sh - devcontainer: + build-in-devcontainer: secrets: inherit uses: rapidsai/shared-action-workflows/.github/workflows/build-in-devcontainer.yaml@fea/devcontainers with: extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY build_command: | - sccache -s; - build-cuml; + sccache -z; + build-all; sccache -s; diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 863a56f5ed..942336e5f4 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -98,5 +98,8 @@ done sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh # .devcontainer files -sed_runner "s/ARG RAPIDS=${CURRENT_SHORT_TAG}/ARG RAPIDS=${NEXT_SHORT_TAG}/g" .devcontainer/Dockerfile -find .devcontainer/ -type f -name devcontainer.json -exec sed -i "s/${CURRENT_SHORT_TAG}/${NEXT_SHORT_TAG}/g" {} \; +find .devcontainer/ -type f -name devcontainer.json -print0 | while IFS= read -r -d '' filename; do + sed_runner "s@rapidsai/devcontainers:[0-9.]*@rapidsai/devcontainers:${NEXT_FULL_TAG}@g" "${filename}" + sed_runner "s@rapidsai/devcontainers/features/ucx:[0-9.]*@rapidsai/devcontainers/features/ucx:${NEXT_SHORT_TAG_PEP440}@" + sed_runner "s@rapidsai/devcontainers/features/rapids-build-utils:[0-9.]*@rapidsai/devcontainers/features/rapids-build-utils:${NEXT_SHORT_TAG_PEP440}@" +done From 2b45e281b429dc0ea24a8fcaf6590e3532f4891f Mon Sep 17 00:00:00 2001 From: ptaylor Date: Tue, 12 Sep 2023 17:10:58 -0700 Subject: [PATCH 37/43] revert rename devcontainer job --- .github/workflows/pr.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 4dc06f5d15..47cffd19c7 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -23,7 +23,7 @@ jobs: - docs-build - wheel-build-cuml - wheel-tests-cuml - - build-in-devcontainer + - devcontainer secrets: inherit uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.10 checks: @@ -110,7 +110,7 @@ jobs: with: build_type: pull-request script: ci/test_wheel.sh - build-in-devcontainer: + devcontainer: secrets: inherit uses: rapidsai/shared-action-workflows/.github/workflows/build-in-devcontainer.yaml@fea/devcontainers with: From 8cf2b150afdffcf0bcf058900c639211310365de Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 21 Sep 2023 11:12:20 -0700 Subject: [PATCH 38/43] build with --verbose --- .github/workflows/pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index ddc07e25ff..9337d9e232 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -117,5 +117,5 @@ jobs: extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY build_command: | sccache -z; - build-all; + build-all --verbose; sccache -s; From f8a71bd538d7469f1357a6235757066ce5136446 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 21 Sep 2023 12:54:21 -0700 Subject: [PATCH 39/43] switch workflow to branch-23.10 --- .github/workflows/pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 9337d9e232..80c04b0ea4 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -112,7 +112,7 @@ jobs: script: ci/test_wheel.sh devcontainer: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/build-in-devcontainer.yaml@fea/devcontainers + uses: rapidsai/shared-action-workflows/.github/workflows/build-in-devcontainer.yaml@branch-23.10 with: extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY build_command: | From 371f99ea3e6d414958dcc8fab2dbcae8b37f696c Mon Sep 17 00:00:00 2001 From: ptaylor Date: Tue, 26 Sep 2023 10:09:58 -0700 Subject: [PATCH 40/43] fix update-version.sh --- ci/release/update-version.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 942336e5f4..b2ef6fefac 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -99,7 +99,7 @@ sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TA # .devcontainer files find .devcontainer/ -type f -name devcontainer.json -print0 | while IFS= read -r -d '' filename; do - sed_runner "s@rapidsai/devcontainers:[0-9.]*@rapidsai/devcontainers:${NEXT_FULL_TAG}@g" "${filename}" - sed_runner "s@rapidsai/devcontainers/features/ucx:[0-9.]*@rapidsai/devcontainers/features/ucx:${NEXT_SHORT_TAG_PEP440}@" - sed_runner "s@rapidsai/devcontainers/features/rapids-build-utils:[0-9.]*@rapidsai/devcontainers/features/rapids-build-utils:${NEXT_SHORT_TAG_PEP440}@" + sed_runner "s@rapidsai/devcontainers:[0-9.]*@rapidsai/devcontainers:${NEXT_SHORT_TAG}@g" "${filename}" + sed_runner "s@rapidsai/devcontainers/features/ucx:[0-9.]*@rapidsai/devcontainers/features/ucx:${NEXT_SHORT_TAG_PEP440}@" "${filename}" + sed_runner "s@rapidsai/devcontainers/features/rapids-build-utils:[0-9.]*@rapidsai/devcontainers/features/rapids-build-utils:${NEXT_SHORT_TAG_PEP440}@" "${filename}" done From 34d2d58573befbde3a64cab95eb15a0162f86af7 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 20 Nov 2023 08:51:11 -0800 Subject: [PATCH 41/43] Update versions. --- .devcontainer/cuda11.8-conda/devcontainer.json | 4 ++-- .devcontainer/cuda11.8-pip/devcontainer.json | 6 +++--- .devcontainer/cuda12.0-conda/devcontainer.json | 4 ++-- .devcontainer/cuda12.0-pip/devcontainer.json | 6 +++--- .github/workflows/pr.yaml | 4 ++-- ci/release/update-version.sh | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.devcontainer/cuda11.8-conda/devcontainer.json b/.devcontainer/cuda11.8-conda/devcontainer.json index aa1ab121b6..b2783add05 100644 --- a/.devcontainer/cuda11.8-conda/devcontainer.json +++ b/.devcontainer/cuda11.8-conda/devcontainer.json @@ -5,12 +5,12 @@ "args": { "CUDA": "11.8", "PYTHON_PACKAGE_MANAGER": "conda", - "BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-mambaforge-ubuntu22.04" + "BASE": "rapidsai/devcontainers:24.02-cpp-llvm16-cuda11.8-mambaforge-ubuntu22.04" } }, "hostRequirements": {"gpu": "optional"}, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.2": {} }, "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" diff --git a/.devcontainer/cuda11.8-pip/devcontainer.json b/.devcontainer/cuda11.8-pip/devcontainer.json index bea6719c40..f208ea86a5 100644 --- a/.devcontainer/cuda11.8-pip/devcontainer.json +++ b/.devcontainer/cuda11.8-pip/devcontainer.json @@ -5,13 +5,13 @@ "args": { "CUDA": "11.8", "PYTHON_PACKAGE_MANAGER": "pip", - "BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda11.8-ubuntu22.04" + "BASE": "rapidsai/devcontainers:24.02-cpp-llvm16-cuda11.8-ubuntu22.04" } }, "hostRequirements": {"gpu": "optional"}, "features": { - "ghcr.io/rapidsai/devcontainers/features/ucx:23.10": {"version": "1.14.1"}, - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} + "ghcr.io/rapidsai/devcontainers/features/ucx:24.2": {"version": "1.14.1"}, + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.2": {} }, "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" diff --git a/.devcontainer/cuda12.0-conda/devcontainer.json b/.devcontainer/cuda12.0-conda/devcontainer.json index d3746ae45c..7445963cfd 100644 --- a/.devcontainer/cuda12.0-conda/devcontainer.json +++ b/.devcontainer/cuda12.0-conda/devcontainer.json @@ -5,12 +5,12 @@ "args": { "CUDA": "12.0", "PYTHON_PACKAGE_MANAGER": "conda", - "BASE": "rapidsai/devcontainers:23.10-cpp-mambaforge-ubuntu22.04" + "BASE": "rapidsai/devcontainers:24.02-cpp-mambaforge-ubuntu22.04" } }, "hostRequirements": {"gpu": "optional"}, "features": { - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.2": {} }, "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" diff --git a/.devcontainer/cuda12.0-pip/devcontainer.json b/.devcontainer/cuda12.0-pip/devcontainer.json index 79818b0109..284ee66fa2 100644 --- a/.devcontainer/cuda12.0-pip/devcontainer.json +++ b/.devcontainer/cuda12.0-pip/devcontainer.json @@ -5,13 +5,13 @@ "args": { "CUDA": "12.0", "PYTHON_PACKAGE_MANAGER": "pip", - "BASE": "rapidsai/devcontainers:23.10-cpp-llvm16-cuda12.0-ubuntu22.04" + "BASE": "rapidsai/devcontainers:24.02-cpp-llvm16-cuda12.0-ubuntu22.04" } }, "hostRequirements": {"gpu": "optional"}, "features": { - "ghcr.io/rapidsai/devcontainers/features/ucx:23.10": {"version": "1.14.1"}, - "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.10": {} + "ghcr.io/rapidsai/devcontainers/features/ucx:24.2": {"version": "1.14.1"}, + "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.2": {} }, "overrideFeatureInstallOrder": [ "ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index ff7b3ba516..e4006a7ac2 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -101,7 +101,7 @@ jobs: build_type: pull-request script: ci/build_wheel.sh extra-repo: rapidsai/cumlprims_mg - extra-repo-sha: branch-23.02 + extra-repo-sha: branch-24.02 extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY wheel-tests-cuml: needs: wheel-build-cuml @@ -112,7 +112,7 @@ jobs: script: ci/test_wheel.sh devcontainer: secrets: inherit - uses: rapidsai/shared-action-workflows/.github/workflows/build-in-devcontainer.yaml@branch-23.10 + uses: rapidsai/shared-action-workflows/.github/workflows/build-in-devcontainer.yaml@branch-24.02 with: extra-repo-deploy-key: CUMLPRIMS_SSH_PRIVATE_DEPLOY_KEY build_command: | diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 2f41ef29c9..b895f8a2f8 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -85,12 +85,12 @@ done sed_runner "s|/branch-[^/]*/|/branch-${NEXT_SHORT_TAG}/|g" README.md sed_runner "s|/branch-[^/]*/|/branch-${NEXT_SHORT_TAG}/|g" python/README.md -# Wheel builds clone cumlprims_mg, update its branch -sed_runner "s/extra-repo-sha: branch-.*/extra-repo-sha: branch-${NEXT_SHORT_TAG}/g" .github/workflows/*.yaml # CI files for FILE in .github/workflows/*.yaml; do sed_runner "/shared-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}" + # Wheel builds clone cumlprims_mg, update its branch + sed_runner "s/extra-repo-sha: branch-.*/extra-repo-sha: branch-${NEXT_SHORT_TAG}/g" "${FILE}" done sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh From 251550d388301c1c2b5a2a30b50b041ca9b161c8 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Fri, 8 Dec 2023 05:58:03 -0800 Subject: [PATCH 42/43] Apply suggestions from code review --- dependencies.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dependencies.yaml b/dependencies.yaml index 0b6389c6bd..dc579d48fa 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -163,6 +163,7 @@ dependencies: # pip recognizes the index as a global option for the requirements.txt file # This index is needed for cudf and rmm. - --extra-index-url=https://pypi.nvidia.com + - --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple - output_types: [pyproject, requirements] packages: - wheel @@ -217,6 +218,7 @@ dependencies: # pip recognizes the index as a global option for the requirements.txt file # This index is needed for cudf and rmm. - --extra-index-url=https://pypi.nvidia.com + - --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple - output_types: [pyproject, requirements] packages: - *treelite_runtime From bc4c99769c3937069d78cb58ed8f22018cd42feb Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Fri, 8 Dec 2023 08:38:23 -0600 Subject: [PATCH 43/43] Update get_libcudacxx.cmake to define EXPORT_SET and use CONDITION. --- cpp/cmake/thirdparty/get_libcudacxx.cmake | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/cpp/cmake/thirdparty/get_libcudacxx.cmake b/cpp/cmake/thirdparty/get_libcudacxx.cmake index 204a5abe9b..54184ced34 100644 --- a/cpp/cmake/thirdparty/get_libcudacxx.cmake +++ b/cpp/cmake/thirdparty/get_libcudacxx.cmake @@ -22,16 +22,14 @@ function(find_and_configure_libcudacxx) include(${rapids-cmake-dir}/cpm/libcudacxx.cmake) rapids_cpm_libcudacxx(BUILD_EXPORT_SET cuml-exports INSTALL_EXPORT_SET cuml-exports) - if(libcudacxx_SOURCE_DIR) - # Store where CMake can find our custom Thrust install - include("${rapids-cmake-dir}/export/find_package_root.cmake") - rapids_export_find_package_root( - INSTALL - libcudacxx - [=[${CMAKE_CURRENT_LIST_DIR}/../../../include/libcuml/lib/rapids/cmake/libcudacxx]=] - cuml-exports - ) - endif() + # Store where CMake can find our custom Thrust install + include("${rapids-cmake-dir}/export/find_package_root.cmake") + rapids_export_find_package_root( + INSTALL libcudacxx + [=[${CMAKE_CURRENT_LIST_DIR}/../../../include/libcuml/lib/rapids/cmake/libcudacxx]=] + EXPORT_SET cuml-exports + CONDITION libcudacxx_SOURCE_DIR + ) endfunction() find_and_configure_libcudacxx()