Skip to content

Commit

Permalink
Merge branch 'branch-23.08' into feature/multigeometry-test-dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
thomcom committed Aug 2, 2023
2 parents 197d7e1 + 01a1078 commit 1c8e980
Show file tree
Hide file tree
Showing 65 changed files with 3,780 additions and 480 deletions.
19 changes: 9 additions & 10 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
# syntax=docker/dockerfile:1.5

ARG CUDA=11.8
ARG CUDA=12.0
ARG LLVM=16
ARG RAPIDS=23.06
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 ${REPO}:${RAPIDS}-cpp-mambaforge-${DISTRO} as conda-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}}"

ARG PYTHON_PACKAGE_MANAGER
ENV PYTHON_PACKAGE_MANAGER="${PYTHON_PACKAGE_MANAGER}"

USER coder

RUN /bin/bash -c 'mkdir -m 0755 -p ~/.{aws,cache,conda,config/pip,local}'

WORKDIR /home/coder/

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"
11 changes: 9 additions & 2 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `cuspatial` 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 `cuspatial` 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 `cuspatial`.

**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
Expand Down
63 changes: 0 additions & 63 deletions .devcontainer/conda/devcontainer.json

This file was deleted.

42 changes: 35 additions & 7 deletions .devcontainer/conda/isolated/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"context": "${localWorkspaceFolder}/.devcontainer",
"dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile",
"args": {
"CUDA": "11.8",
"CUDA": "12.0",
"LLVM": "16",
"PYTHON_PACKAGE_MANAGER": "conda"
}
Expand All @@ -15,7 +15,7 @@
},

"features": {
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.6": {}
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:23.8": {}
},

"overrideFeatureInstallOrder": [
Expand All @@ -27,10 +27,8 @@
],

"updateContentCommand": [
"/bin/bash", "-c", "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"
],
"postCreateCommand": ["rapids-make-vscode-workspace", "--update"],
"postAttachCommand": ["rapids-make-conda-env"],

"containerEnv": {
"DEFAULT_CONDA_ENV": "rapids"
Expand All @@ -42,23 +40,53 @@
"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": {
"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"
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion .devcontainer/conda/single/.devcontainer/devcontainer.json

This file was deleted.

95 changes: 95 additions & 0 deletions .devcontainer/conda/single/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
Loading

0 comments on commit 1c8e980

Please sign in to comment.