-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follow-up to these PRs: * rapidsai/devcontainers#417 * #68 Proposes adding devcontainers and a devcontainers CI job to the repo. ## Notes for Reviewers ### Benefits of these changes * faster and easier local development * reduced risk of changes here breaking the RAPIDS unified devcontainers maintained in https://github.com/rapidsai/devcontainers Similar to rapidsai/nx-cugraph#25 ### How I made these changes Copied the `.devcontainer/` directory from https://github.com/rapidsai/cugraph, then just changed `cugraph` references to `cugraph-gnn`. ### How I tested this Tested the `update-version.sh` changes like this: ```shell ./ci/release/update-version.sh '25.04.00' git grep -E '25\.[0-9]+' ``` Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Bradley Dice (https://github.com/bdice) URL: #79
- Loading branch information
Showing
12 changed files
with
308 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# syntax=docker/dockerfile:1.5 | ||
|
||
ARG BASE | ||
ARG PYTHON_PACKAGE_MANAGER=conda | ||
|
||
FROM ${BASE} as pip-base | ||
|
||
ENV DEFAULT_VIRTUAL_ENV=rapids | ||
|
||
RUN apt update -y \ | ||
&& DEBIAN_FRONTEND=noninteractive apt install -y \ | ||
libblas-dev liblapack-dev \ | ||
&& rm -rf /tmp/* /var/tmp/* /var/cache/apt/* /var/lib/apt/lists/*; | ||
|
||
FROM ${BASE} as conda-base | ||
|
||
ENV DEFAULT_CONDA_ENV=rapids | ||
ENV RAPIDS_LIBUCX_PREFER_SYSTEM_LIBRARY=true | ||
|
||
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}" | ||
|
||
ENV PYTHONSAFEPATH="1" | ||
ENV PYTHONUNBUFFERED="1" | ||
ENV PYTHONDONTWRITEBYTECODE="1" | ||
|
||
ENV SCCACHE_REGION="us-east-2" | ||
ENV SCCACHE_BUCKET="rapids-sccache-devs" | ||
ENV AWS_ROLE_ARN="arn:aws:iam::279114543810:role/nv-gha-token-sccache-devs" | ||
ENV HISTFILE="/home/coder/.cache/._bash_history" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# cugraph-gnn 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 cuGraph C++ and Python libraries. | ||
|
||
## Table of Contents | ||
|
||
* [Prerequisites](#prerequisites) | ||
* [Host bind mounts](#host-bind-mounts) | ||
* [Launch a Dev Container](#launch-a-dev-container) | ||
|
||
## 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/cugraph-gnn` | ||
* `${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 | ||
|
||
To launch a devcontainer from VSCode, open the cugraph-gnn 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"build": { | ||
"context": "${localWorkspaceFolder}/.devcontainer", | ||
"dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", | ||
"args": { | ||
"CUDA": "11.8", | ||
"PYTHON_PACKAGE_MANAGER": "conda", | ||
"BASE": "rapidsai/devcontainers:25.02-cpp-cuda11.8-mambaforge-ubuntu22.04" | ||
} | ||
}, | ||
"runArgs": [ | ||
"--rm", | ||
"--name", | ||
"${localEnv:USER:anon}-rapids-${localWorkspaceFolderBasename}-25.02-cuda11.8-conda" | ||
], | ||
"hostRequirements": {"gpu": "optional"}, | ||
"features": { | ||
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:25.2": {} | ||
}, | ||
"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}-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/cugraph-gnn,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}-cuda11.8-envs,target=/home/coder/.conda/envs,type=bind,consistency=consistent" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.flake8", | ||
"nvidia.nsight-vscode-edition" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"build": { | ||
"context": "${localWorkspaceFolder}/.devcontainer", | ||
"dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", | ||
"args": { | ||
"CUDA": "11.8", | ||
"PYTHON_PACKAGE_MANAGER": "pip", | ||
"BASE": "rapidsai/devcontainers:25.02-cpp-cuda11.8-ucx1.17.0-openmpi-ubuntu22.04" | ||
} | ||
}, | ||
"runArgs": [ | ||
"--rm", | ||
"--name", | ||
"${localEnv:USER:anon}-rapids-${localWorkspaceFolderBasename}-25.02-cuda11.8-pip" | ||
], | ||
"hostRequirements": {"gpu": "optional"}, | ||
"features": { | ||
"ghcr.io/rapidsai/devcontainers/features/cuda:25.2": { | ||
"version": "11.8", | ||
"installcuBLAS": true, | ||
"installcuSOLVER": true, | ||
"installcuRAND": true, | ||
"installcuSPARSE": true | ||
}, | ||
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:25.2": {} | ||
}, | ||
"overrideFeatureInstallOrder": [ | ||
"ghcr.io/rapidsai/devcontainers/features/cuda", | ||
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" | ||
], | ||
"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/cugraph-gnn,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/share/${localWorkspaceFolderBasename}-cuda11.8-venvs,target=/home/coder/.local/share/venvs,type=bind,consistency=consistent" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.flake8", | ||
"nvidia.nsight-vscode-edition" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"build": { | ||
"context": "${localWorkspaceFolder}/.devcontainer", | ||
"dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", | ||
"args": { | ||
"CUDA": "12.5", | ||
"PYTHON_PACKAGE_MANAGER": "conda", | ||
"BASE": "rapidsai/devcontainers:25.02-cpp-mambaforge-ubuntu22.04" | ||
} | ||
}, | ||
"runArgs": [ | ||
"--rm", | ||
"--name", | ||
"${localEnv:USER:anon}-rapids-${localWorkspaceFolderBasename}-25.02-cuda12.5-conda" | ||
], | ||
"hostRequirements": {"gpu": "optional"}, | ||
"features": { | ||
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:25.2": {} | ||
}, | ||
"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}-cuda12.5-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/cugraph-gnn,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}-cuda12.5-envs,target=/home/coder/.conda/envs,type=bind,consistency=consistent" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.flake8", | ||
"nvidia.nsight-vscode-edition" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"build": { | ||
"context": "${localWorkspaceFolder}/.devcontainer", | ||
"dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile", | ||
"args": { | ||
"CUDA": "12.5", | ||
"PYTHON_PACKAGE_MANAGER": "pip", | ||
"BASE": "rapidsai/devcontainers:25.02-cpp-cuda12.5-ucx1.17.0-openmpi-ubuntu22.04" | ||
} | ||
}, | ||
"runArgs": [ | ||
"--rm", | ||
"--name", | ||
"${localEnv:USER:anon}-rapids-${localWorkspaceFolderBasename}-25.02-cuda12.5-pip" | ||
], | ||
"hostRequirements": {"gpu": "optional"}, | ||
"features": { | ||
"ghcr.io/rapidsai/devcontainers/features/cuda:25.2": { | ||
"version": "12.5", | ||
"installcuBLAS": true, | ||
"installcuSOLVER": true, | ||
"installcuRAND": true, | ||
"installcuSPARSE": true | ||
}, | ||
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:25.2": {} | ||
}, | ||
"overrideFeatureInstallOrder": [ | ||
"ghcr.io/rapidsai/devcontainers/features/cuda", | ||
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils" | ||
], | ||
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config/pip,local/share/${localWorkspaceFolderBasename}-cuda12.5-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/cugraph-gnn,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/share/${localWorkspaceFolderBasename}-cuda12.5-venvs,target=/home/coder/.local/share/venvs,type=bind,consistency=consistent" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.flake8", | ||
"nvidia.nsight-vscode-edition" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ jobs: | |
pr-builder: | ||
needs: | ||
- changed-files | ||
- devcontainer | ||
- checks | ||
- conda-cpp-build | ||
- conda-cpp-tests | ||
|
@@ -37,7 +38,7 @@ jobs: | |
files_yaml: | | ||
test_cpp: | ||
- '**' | ||
- '!.devcontainers/**' | ||
- '!.devcontainer/**' | ||
- '!CONTRIBUTING.md' | ||
- '!README.md' | ||
- '!docs/**' | ||
|
@@ -48,20 +49,30 @@ jobs: | |
- '!readme_pages/**' | ||
test_notebooks: | ||
- '**' | ||
- '!.devcontainers/**' | ||
- '!.devcontainer/**' | ||
- '!CONTRIBUTING.md' | ||
- '!README.md' | ||
- '!docs/**' | ||
- '!readme_pages/**' | ||
test_python: | ||
- '**' | ||
- '!.devcontainers/**' | ||
- '!.devcontainer/**' | ||
- '!CONTRIBUTING.md' | ||
- '!README.md' | ||
- '!docs/**' | ||
- '!img/**' | ||
- '!notebooks/**' | ||
- '!readme_pages/**' | ||
devcontainer: | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
arch: '["amd64"]' | ||
cuda: '["12.5"]' | ||
build_command: | | ||
sccache -z; | ||
build-all --verbose -j$(nproc --ignore=1); | ||
sccache -s; | ||
checks: | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.