Skip to content

Commit

Permalink
add workflow to build RAPIDS repos from source with local CCCL
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt committed Apr 24, 2024
1 parent e3d181f commit f896a4c
Show file tree
Hide file tree
Showing 4 changed files with 222 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .devcontainer/cuda12.2-conda/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"image": "rapidsai/devcontainers:24.06-cpp-mambaforge-ubuntu22.04",
"runArgs": [
"--rm",
"--name",
"${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.06-cuda12.2-conda"
],
"hostRequirements": {"gpu": "optional"},
"containerEnv": {
"CUDA": "12.2",
"CUDAARCHS": "RAPIDS",
"PYTHON_PACKAGE_MANAGER": "conda",
"PYTHONSAFEPATH": "1",
"PYTHONUNBUFFERED": "1",
"PYTHONDONTWRITEBYTECODE": "1",
"SCCACHE_REGION": "us-east-2",
"SCCACHE_BUCKET": "rapids-sccache-devs",
"VAULT_HOST": "https://vault.ops.k8s.rapids.ai",
"HISTFILE": "${containerWorkspaceFolder}/.cache/._bash_history"
},
"features": {
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.6": {}
},
"overrideFeatureInstallOrder": [
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils"
],
"initializeCommand": ["/bin/bash", "-c", "mkdir -m 0755 -p ${localWorkspaceFolder}/.{aws,cache,config} ${localWorkspaceFolder}/../.{conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda12.2-envs,log/devcontainer-utils} ${localWorkspaceFolder}/../{rmm,kvikio,ucxx,cudf,raft,cuvs,cuml,wholegraph,cugraph,cuspatial}"],
"postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; fi"],
"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}/../rmm,target=/home/coder/rmm,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../kvikio,target=/home/coder/kvikio,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../ucxx,target=/home/coder/ucxx,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}/../cuvs,target=/home/coder/cuvs,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../cuml,target=/home/coder/cuml,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../wholegraph,target=/home/coder/wholegraph,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}-cuda12.2-envs,target=/home/coder/.conda/envs,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.log/devcontainer-utils,target=/var/log/devcontainer-utils,type=bind,consistency=consistent"
],
"customizations": {
"vscode": {
"extensions": [
"augustocdias.tasks-shell-input",
"ms-python.flake8",
"nvidia.nsight-vscode-edition"
],
"files.watcherExclude": {
"**/build/**": true,
"**/_skbuild/**": true,
"**/target/**": true,
"/home/coder/.aws/**/*": true,
"/home/coder/.cache/**/*": true,
"/home/coder/.conda/**/*": true,
"/home/coder/.local/share/**/*": true,
"/home/coder/.vscode-server/**/*": true
},
"search.exclude": {
"**/build/**": true,
"**/_skbuild/**": true,
"**/*.code-search": true,
"/home/coder/.aws/**/*": true,
"/home/coder/.cache/**/*": true,
"/home/coder/.conda/**/*": true,
"/home/coder/.local/share/**/*": true,
"/home/coder/.vscode-server/**/*": true
}
}
}
}
81 changes: 81 additions & 0 deletions .devcontainer/cuda12.2-pip/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"image": "rapidsai/devcontainers:24.06-cpp-cuda12.2-ubuntu22.04",
"runArgs": [
"--rm",
"--name",
"${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.06-cuda12.2-pip"
],
"hostRequirements": {"gpu": "optional"},
"containerEnv": {
"CUDA": "12.2",
"CUDAARCHS": "RAPIDS",
"PYTHON_PACKAGE_MANAGER": "pip",
"PYTHONSAFEPATH": "1",
"PYTHONUNBUFFERED": "1",
"PYTHONDONTWRITEBYTECODE": "1",
"SCCACHE_REGION": "us-east-2",
"SCCACHE_BUCKET": "rapids-sccache-devs",
"VAULT_HOST": "https://vault.ops.k8s.rapids.ai",
"HISTFILE": "${containerWorkspaceFolder}/.cache/._bash_history"
},
"features": {
"ghcr.io/rapidsai/devcontainers/features/ucx:24.6": {"version": "1.15.0"},
"ghcr.io/rapidsai/devcontainers/features/cuda:24.6": {"version": "12.2", "installcuBLAS": true, "installcuDNN": true, "installcuSOLVER": true, "installcuRAND": true, "installcuSPARSE": true},
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.6": {}
},
"overrideFeatureInstallOrder": [
"ghcr.io/rapidsai/devcontainers/features/ucx",
"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} ${localWorkspaceFolder}/../.{local/share/${localWorkspaceFolderBasename}-cuda12.2-venvs,log/devcontainer-utils} ${localWorkspaceFolder}/../{rmm,kvikio,ucxx,cudf,raft,cuvs,cuml,wholegraph,cugraph,cuspatial}"],
"postAttachCommand": ["/bin/bash", "-c", "if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; fi"],
"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}/../rmm,target=/home/coder/rmm,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../kvikio,target=/home/coder/kvikio,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../ucxx,target=/home/coder/ucxx,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}/../cuvs,target=/home/coder/cuvs,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../cuml,target=/home/coder/cuml,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../wholegraph,target=/home/coder/wholegraph,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}/../.local/share/${localWorkspaceFolderBasename}-cuda12.2-venvs,target=/home/coder/.local/share/venvs,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.log/devcontainer-utils,target=/var/log/devcontainer-utils,type=bind,consistency=consistent"
],
"customizations": {
"vscode": {
"extensions": [
"augustocdias.tasks-shell-input",
"ms-python.flake8",
"nvidia.nsight-vscode-edition"
],
"files.watcherExclude": {
"**/build/**": true,
"**/_skbuild/**": true,
"**/target/**": true,
"/home/coder/.aws/**/*": true,
"/home/coder/.cache/**/*": true,
"/home/coder/.conda/**/*": true,
"/home/coder/.local/share/**/*": true,
"/home/coder/.vscode-server/**/*": true
},
"search.exclude": {
"**/build/**": true,
"**/_skbuild/**": true,
"**/*.code-search": true,
"/home/coder/.aws/**/*": true,
"/home/coder/.cache/**/*": true,
"/home/coder/.conda/**/*": true,
"/home/coder/.local/share/**/*": true,
"/home/coder/.vscode-server/**/*": true
}
}
}
}
55 changes: 55 additions & 0 deletions .github/workflows/build-rapids.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build all RAPIDS repositories

on:
schedule:
- cron: '0 0 * * *'
workflow_call:

jobs:
check-event:
name: Check GH Event
runs-on: ubuntu-latest
outputs:
ok: ${{ steps.check_gh_event.outputs.ok }}
steps:
- id: check_gh_event
name: Check GH Event
shell: bash
run: |
[[ '${{ github.event_name }}' == 'push' && '${{ github.repository }}' == 'NVIDIA/cccl' ]] || \
[[ '${{ github.event_name }}' == 'schedule' && '${{ github.repository }}' == 'NVIDIA/cccl' ]] || \
[[ '${{ github.event_name }}' == 'pull_request' && '${{ github.repository }}' != 'NVIDIA/cccl' ]] \
&& echo "ok=true" | tee -a $GITHUB_OUTPUT \
|| echo "ok=false" | tee -a $GITHUB_OUTPUT;
build-all-rapids-repos:
name: Build all RAPIDS repos
if: needs.check-event.outputs.ok == 'true'
needs: check-event
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@branch-24.06
with:
arch: '["amd64"]'
cuda: '["12.2"]'
node_type: cpu32
build_command: |
# Remove cumlprims_mg and cugraph-ops from /opt/rapids-build-utils/manifest.yaml
sudo yq -i '.repos |= filter(.name != "cumlprims_mg" and .name != "cugraph-ops")' /opt/rapids-build-utils/manifest.yaml;
# Regenerate builds scripts after modifying /opt/rapids-build-utils/manifest.yaml
rapids-generate-scripts;
# Clone all the RAPIDS repos
clone-all -j$(nproc) -v -q --clone-upstream --single-branch --shallow-submodules;
# Build the RAPIDS repos using the local CCCL mount
sccache -z;
sccache --show-adv-stats;
build-all \
-v \
-j$(nproc --ignore=1) \
-DBUILD_TESTS=ON \
-DBUILD_BENCHMARKS=ON \
-DBUILD_ANN_BENCH=ON \
-DBUILD_PRIMS_BENCH=ON \
-DBUILD_SHARED_LIBS=ON \
-DCPM_CCCL_SOURCE="${HOME}/cccl" \
;
sccache --show-adv-stats;
5 changes: 5 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ jobs:
export CXX="g++"
./ci/verify_codegen.sh
build-rapids:
name: Build RAPIDS
secrets: inherit
uses: ./.github/workflows/build-all-rapids-repos.yml

# This job is the final job that runs after all other jobs and is used for branch protection status checks.
# See: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks
# https://github.com/orgs/community/discussions/26822#discussioncomment-5122101
Expand Down

0 comments on commit f896a4c

Please sign in to comment.