Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to build RAPIDS from source with local CCCL #1667

Merged
merged 127 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
95faf3a
add workflow to build RAPIDS repos from source with local CCCL
trxcllnt Apr 24, 2024
69b013c
disable using cumlprims_mg in cuml and cugraph-ops in cugraph
trxcllnt Apr 24, 2024
29d31db
remove redundant mounts
trxcllnt Apr 24, 2024
be7abec
add permissions
trxcllnt Apr 24, 2024
94df1a8
add permissions again
trxcllnt Apr 24, 2024
ee40bed
more permissions
trxcllnt Apr 24, 2024
72e0b20
copy build-in-devcontainer.yml into cccl workflows
trxcllnt Apr 24, 2024
45ac0cb
update workspaceFolder path and add default conda/venv name
trxcllnt Apr 24, 2024
c580f2e
add rapids.Dockerfile
trxcllnt Apr 24, 2024
4875832
Merge branch 'main' into fea/build-rapids
trxcllnt May 1, 2024
3b6cdb8
Merge branch 'main' into fea/build-rapids
trxcllnt May 1, 2024
337284f
remove cuda12.2-pip devcontainer
trxcllnt May 1, 2024
47b5528
only build RAPIDS C++ libs
trxcllnt May 1, 2024
0928bac
build without tests and benchmarks first, then build with them
trxcllnt May 1, 2024
27d0e63
build separate RAPIDS libs in parallel
trxcllnt May 3, 2024
cc20473
Merge branch 'main' into fea/build-rapids
trxcllnt May 3, 2024
2d18b99
Merge branch 'fea/build-rapids' of github.com:trxcllnt/cccl into fea/…
trxcllnt May 3, 2024
173fe73
move RAPIDS devcontainer into ci/rapids
trxcllnt May 3, 2024
3c5dbdf
-DBUILD_SHARED_LIBS=ON
trxcllnt May 3, 2024
4eafb05
fix typo
trxcllnt May 3, 2024
d9e72d8
fix rapids.Dockerfile location
trxcllnt May 3, 2024
2284083
put -v and -j at the front
trxcllnt May 3, 2024
326a519
debug init-ssh-deploy-keys call
trxcllnt May 3, 2024
b279d34
use the debug envvar
trxcllnt May 3, 2024
220fab0
fix yq filter to match cpp name
trxcllnt May 3, 2024
07589da
fix filters list
trxcllnt May 3, 2024
4731e8c
add missing -D prefix
trxcllnt May 3, 2024
2ebafe2
remove debug code
trxcllnt May 3, 2024
6768edf
fix args
trxcllnt May 3, 2024
741418b
build wholegraph before cugraph
trxcllnt May 3, 2024
e5e8f05
Merge branch 'main' of github.com:NVIDIA/cccl into fea/build-rapids
trxcllnt May 7, 2024
07c3425
explicitly reconfigure
trxcllnt May 7, 2024
44e57de
Merge branch 'main' of github.com:NVIDIA/cccl into fea/build-rapids
trxcllnt May 8, 2024
5ba3eb1
use miscco/cudf fork with fixes for CCCL main
trxcllnt May 8, 2024
256b092
use cuco fork with fixes for CCCL main
trxcllnt May 8, 2024
2326bb5
define CCCL and cuCollections via rapids-cmake versions.json override…
trxcllnt May 8, 2024
d83368b
escape quotes
trxcllnt May 8, 2024
2593f62
replace git: with https: in CCCL git_url
trxcllnt May 8, 2024
40fa43b
temporarily comment out the rest of the PR job
trxcllnt May 8, 2024
ee97b86
always clone cuco, use my cuml and cugraph forks
trxcllnt May 8, 2024
d0ddf2d
use my cuspatial fork
trxcllnt May 9, 2024
80ed3b6
build cugraph with less parallelism
trxcllnt May 9, 2024
6e367a1
build with tests and benchmarks enabled
trxcllnt May 9, 2024
3afb9ab
only build for sm_70
trxcllnt May 13, 2024
1edc90e
build with/without tests again
trxcllnt May 13, 2024
d883c5a
add build-rapids job to nightly workflow
trxcllnt May 13, 2024
90bb6fb
uncomment the rest of the CI jobs
trxcllnt May 13, 2024
730320e
build cugraph multi-gpu tests
trxcllnt May 13, 2024
4633e3d
remove nightly schedule from build-rapids.yml
trxcllnt May 13, 2024
544e37e
Merge branch 'main' into fea/build-rapids
trxcllnt May 13, 2024
1ae3976
add problem matcher to build-rapids job
trxcllnt May 14, 2024
5c7b721
Merge branch 'main' of github.com:NVIDIA/cccl into fea/build-rapids
trxcllnt May 14, 2024
11b42c5
use my rapids-cmake fork with updates for CCCL 2.5
trxcllnt May 14, 2024
d268987
Merge branch 'main' into fea/build-rapids
trxcllnt May 15, 2024
dd639a2
* Update launch.sh to read workspaceFolder, runArgs, initializeComman…
trxcllnt May 16, 2024
d2b4df8
move logic for updating manifest.yaml and cloning repos into the cont…
trxcllnt May 16, 2024
f78a48f
don't run post-attach-command in CI
trxcllnt May 16, 2024
3549e89
update rapids container name
trxcllnt May 16, 2024
b6ccce0
comment out most PR jobs again
trxcllnt May 16, 2024
d557278
remove --no-update-env
trxcllnt May 16, 2024
aa0add3
fix typo
trxcllnt May 16, 2024
c55e2b6
set -x
trxcllnt May 16, 2024
f5da241
remove quotes
trxcllnt May 16, 2024
3a40a7c
Merge branch 'main' into fea/build-rapids
trxcllnt May 16, 2024
b3511c9
use branch-24.06 again
trxcllnt May 16, 2024
00c11f5
Merge branch 'fea/build-rapids' of github.com:trxcllnt/cccl into fea/…
trxcllnt May 16, 2024
eb4e133
debug clone
trxcllnt May 16, 2024
b035f6d
always generate scripts
trxcllnt May 16, 2024
b36d360
remove debug flags and enable full pr workflow again
trxcllnt May 17, 2024
22221f9
Merge branch 'main' into fea/build-rapids
trxcllnt May 21, 2024
d3a62f2
Merge branch 'main' into fea/build-rapids
trxcllnt May 24, 2024
cfe1aa7
Merge branch 'main' into fea/build-rapids
trxcllnt May 24, 2024
d359eb1
switch cudf and cuml to rapidsai branch-24.06, add full set of librar…
trxcllnt May 29, 2024
9b43e3e
Merge branch 'main' of github.com:NVIDIA/cccl into fea/build-rapids
trxcllnt May 29, 2024
dd40960
fix ucxx branch name
trxcllnt May 29, 2024
0826bf1
switch cugraph to rapidsai branch-24.06
trxcllnt May 29, 2024
c1caa94
parse localEnv entries with default values
trxcllnt May 29, 2024
ac28412
print prettier failure message
trxcllnt May 29, 2024
b1f516f
remove set -x
trxcllnt May 29, 2024
291a84c
fix problem matcher path
trxcllnt May 29, 2024
e5e38cb
remove adding problem matcher because it's added in the other workflow
trxcllnt May 29, 2024
83dcf6a
fix here-doc EOF
trxcllnt May 29, 2024
c34d1b3
Merge branch 'main' of github.com:NVIDIA/cccl into fea/build-rapids
trxcllnt May 29, 2024
6c07ede
cleanup parsing in launch.json, make docker-entrypoint.sh faster, mov…
trxcllnt May 30, 2024
526daf9
more parsing cleanup and hardening
trxcllnt May 30, 2024
2bef25e
Merge branch 'main' of github.com:NVIDIA/cccl into fea/build-rapids
trxcllnt May 30, 2024
e9bcdf8
run with --gpus all
trxcllnt May 30, 2024
272050f
determine remote user from devcontainer.json or image metadata, gpus …
trxcllnt May 31, 2024
5cd796d
Merge branch 'main' of github.com:NVIDIA/cccl into fea/build-rapids
trxcllnt May 31, 2024
c50553c
Merge branch 'main' of github.com:NVIDIA/cccl into fea/build-rapids
trxcllnt Jun 3, 2024
4524f08
add --gpus option to launch.json to allow overriding devcontainer.jso…
trxcllnt Jun 3, 2024
6bb64a6
update to RAPIDS branch-24.08
trxcllnt Jun 3, 2024
411768e
support -e|--env in launch.sh so CI can pass additional container env…
trxcllnt Jun 3, 2024
5d7124c
support -v|--volume in launch.sh so CI can pass additional container …
trxcllnt Jun 3, 2024
1cd271b
Merge branch 'main' of github.com:NVIDIA/cccl into fea/build-rapids
trxcllnt Jun 3, 2024
e4577e1
merge in changes from other branch
trxcllnt Jun 3, 2024
bc366bb
fix docker-entrypoint.sh for Ubuntu 18.04
trxcllnt Jun 3, 2024
a26add3
Merge branch 'main' into fea/build-rapids
trxcllnt Jun 4, 2024
1249e76
Update .github/workflows/build-rapids.yml
trxcllnt Jun 4, 2024
af99e88
refactor JSON parsing to use python json module
trxcllnt Jun 5, 2024
13542e2
Merge branch 'main' of github.com:NVIDIA/cccl into fea/build-rapids
trxcllnt Jun 5, 2024
9b91de4
Merge branch 'fea/build-rapids' of github.com:trxcllnt/cccl into fea/…
trxcllnt Jun 5, 2024
219e5f0
Merge branch 'main' into fea/build-rapids
alliepiper Jun 6, 2024
6f87214
Merge branch 'main' of github.com:NVIDIA/cccl into fea/build-rapids
trxcllnt Jun 6, 2024
faaac88
Merge branch 'fea/build-rapids' of github.com:trxcllnt/cccl into fea/…
trxcllnt Jun 6, 2024
98fc088
switch to rapidsai/rapids-cmake branch-24.08
trxcllnt Jun 6, 2024
ea20643
always recreate the conda env from scratch on container startup
trxcllnt Jun 6, 2024
0c58033
Clone the default rapidsai/devcontainers branch
trxcllnt Jun 6, 2024
fba92b1
remove RAPIDS_TEST_OPTIONS as it's safe to just set them all regardle…
trxcllnt Jun 6, 2024
22d39af
remove CCCL version from override JSON and tell rapids-cmake to alway…
trxcllnt Jun 6, 2024
1dd6da2
comment out overrides and leave a note about how to customize RAPIDS …
trxcllnt Jun 6, 2024
de2b267
use exact CCCL commit hash
trxcllnt Jun 7, 2024
93d2755
Merge branch 'main' of github.com:NVIDIA/cccl into fea/build-rapids
trxcllnt Jun 7, 2024
18b2caf
temporarily disable all PR jobs except build-rapids
trxcllnt Jun 7, 2024
439d8f7
24.6 -> 24.8
trxcllnt Jun 7, 2024
8cae679
update build-rapids.yml to use launch.sh
trxcllnt Jun 7, 2024
22d8a27
write aws config to local .aws dir
trxcllnt Jun 7, 2024
caab01a
change sub job name
trxcllnt Jun 7, 2024
3af4042
delete build-in-devcontainer.yml
trxcllnt Jun 7, 2024
b24a183
Revert "temporarily disable all PR jobs except build-rapids"
trxcllnt Jun 7, 2024
a0f628a
remove set -x
trxcllnt Jun 7, 2024
a17baa3
put all the envvars on one line
trxcllnt Jun 7, 2024
0ba40ed
check that SSH_AUTH_SOCK exists before mounting it
trxcllnt Jun 7, 2024
19d4a73
unset VIRTUAL_ENV and VIRTUAL_ENV_PROMPT so that the shell init files…
trxcllnt Jun 7, 2024
1ed7087
Merge branch 'main' of github.com:NVIDIA/cccl into fea/build-rapids
trxcllnt Jun 11, 2024
379d53c
Merge branch 'main' into fea/build-rapids
miscco Jun 12, 2024
b744ca2
Merge branch 'main' of github.com:NVIDIA/cccl into fea/build-rapids
trxcllnt Jun 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .devcontainer/cuda12.2-conda/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
trxcllnt marked this conversation as resolved.
Show resolved Hide resolved
"build": {
"context": "${localWorkspaceFolder}/.devcontainer",
"dockerfile": "${localWorkspaceFolder}/.devcontainer/rapids.Dockerfile",
"args": {
"CUDA": "12.2",
"PYTHON_PACKAGE_MANAGER": "conda",
"BASE": "rapidsai/devcontainers:24.06-cpp-mambaforge-ubuntu22.04"
}
},
"runArgs": [
"--rm",
"--name",
"${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.06-cuda12.2-conda"
],
"hostRequirements": {"gpu": "optional"},
"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/${localWorkspaceFolderBasename}",
"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}/../.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": {
trxcllnt marked this conversation as resolved.
Show resolved Hide resolved
"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
}
}
}
}
77 changes: 77 additions & 0 deletions .devcontainer/cuda12.2-pip/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"build": {
"context": "${localWorkspaceFolder}/.devcontainer",
"dockerfile": "${localWorkspaceFolder}/.devcontainer/rapids.Dockerfile",
"args": {
"CUDA": "12.2",
"PYTHON_PACKAGE_MANAGER": "pip",
"BASE": "rapidsai/devcontainers:24.06-cpp-cuda12.2-ubuntu22.04"
}
},
"runArgs": [
"--rm",
"--name",
"${localEnv:USER}-rapids-${localWorkspaceFolderBasename}-24.06-cuda12.2-pip"
],
"hostRequirements": {"gpu": "optional"},
"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/${localWorkspaceFolderBasename}",
"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
}
}
}
}
53 changes: 53 additions & 0 deletions .devcontainer/rapids.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# syntax=docker/dockerfile:1.5

ARG BASE
ARG PYTHON_PACKAGE_MANAGER=conda

FROM ${BASE} as pip-base

RUN apt update -y \
&& DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
# C++ build tools
doxygen \
graphviz \
# C++ test dependencies
libgmock-dev \
libgtest-dev \
# needed by libcudf_kafka
librdkafka-dev \
# cuML/cuGraph dependencies
libblas-dev \
liblapack-dev \
# needed by libcuspatial
libgdal-dev \
sqlite3 \
libsqlite3-dev \
libtiff-dev \
libcurl4-openssl-dev \
&& rm -rf /tmp/* /var/tmp/* /var/cache/apt/* /var/lib/apt/lists/*;

ENV DEFAULT_VIRTUAL_ENV=rapids

FROM ${BASE} as conda-base

ENV DEFAULT_CONDA_ENV=rapids

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 VAULT_HOST="https://vault.ops.k8s.rapids.ai"
ENV HISTFILE="/home/coder/.cache/._bash_history"

ENV LIBCUDF_KERNEL_CACHE_PATH="/home/coder/cudf/cpp/build/${PYTHON_PACKAGE_MANAGER}/cuda-${CUDA}/latest/jitify_cache"
119 changes: 119 additions & 0 deletions .github/workflows/build-in-devcontainer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
on:
workflow_call:
inputs:
sha:
type: string
arch:
type: string
default: '["amd64"]'
cuda:
type: string
default: '["12.0"]'
repo:
type: string
node_type:
type: string
default: "cpu8"
build_command:
type: string
required: true
# Note that this is the _name_ of a secret containing the key, not the key itself.
extra-repo-deploy-key:
required: false
type: string
default: ''
# Note that this is the _name_ of a secret containing the key, not the key itself.
extra-repo-deploy-key-2:
required: false
type: string
default: ''

permissions:
actions: read
checks: none
contents: read
deployments: none
discussions: none
id-token: write
issues: none
packages: read
pages: none
pull-requests: read
repository-projects: none
security-events: none
statuses: none

jobs:
build:
strategy:
fail-fast: false
matrix:
arch: ${{ fromJSON(inputs.arch) }}
cuda: ${{ fromJSON(inputs.cuda) }}
pkgr: ["conda", "pip"]
runs-on: "linux-${{ matrix.arch }}-${{ inputs.node_type }}"
steps:
- uses: actions/checkout@v4
env:
GIT_TRACE_PACKET: 1
GIT_TRACE: 1
GIT_CURL_VERBOSE: 1
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.sha }}
fetch-depth: 0
- name: Check if repo has devcontainer
run: |
echo "REPOSITORY=$(basename $(pwd))" | tee -a "${GITHUB_ENV}";
if test -f .devcontainer/cuda${{ matrix.cuda }}-${{ matrix.pkgr }}/devcontainer.json; then
echo "HAS_DEVCONTAINER=true" >> "${GITHUB_ENV}";
else
echo "HAS_DEVCONTAINER=false" >> "${GITHUB_ENV}";
fi
- if: ${{ env.HAS_DEVCONTAINER == 'true' }}
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::279114543810:role/gha-oidc-NVIDIA
aws-region: us-east-2
role-duration-seconds: 43200 # 12h
- if: ${{ env.HAS_DEVCONTAINER == 'true' }}
name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '16'
- if: ${{ env.HAS_DEVCONTAINER == 'true' }}
name: Run build in devcontainer
uses: devcontainers/ci@v0.3
with:
push: never
configFile: .devcontainer/cuda${{ matrix.cuda }}-${{ matrix.pkgr }}/devcontainer.json
env: |
REPOSITORY=${{ env.REPOSITORY }}
SCCACHE_REGION=us-east-2
AWS_ACCESS_KEY_ID=${{ env.AWS_ACCESS_KEY_ID }}
AWS_SESSION_TOKEN=${{ env.AWS_SESSION_TOKEN }}
AWS_SECRET_ACCESS_KEY=${{ env.AWS_SECRET_ACCESS_KEY }}
runCmd: |
set -e;
mkdir -p ~/.config/pip/;
trxcllnt marked this conversation as resolved.
Show resolved Hide resolved
cat <<EOF >> ~/.config/pip/pip.conf
[global]
extra-index-url = https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
EOF

rapids-make-${PYTHON_PACKAGE_MANAGER}-env;

if test -n '${{ inputs.extra-repo-deploy-key }}' \
|| test -n '${{ inputs.extra-repo-deploy-key-2 }}'; then
if ! pgrep ssh-agent >/dev/null 2>&1; then eval "$(ssh-agent -s)"; fi;
if test -n '${{ inputs.extra-repo-deploy-key }}'; then
ssh-add - <<< '${{ secrets[inputs.extra-repo-deploy-key] }}';
fi
if test -n '${{ inputs.extra-repo-deploy-key-2 }}'; then
ssh-add - <<< '${{ secrets[inputs.extra-repo-deploy-key-2] }}';
fi
devcontainer-utils-init-ssh-deploy-keys || true;
fi

cd ~/"${REPOSITORY}";
${{ inputs.build_command }}
65 changes: 65 additions & 0 deletions .github/workflows/build-rapids.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
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-rapids:
name: Build all RAPIDS repos
if: needs.check-event.outputs.ok == 'true'
needs: check-event
secrets: inherit
# TODO: this is temporary
trxcllnt marked this conversation as resolved.
Show resolved Hide resolved
uses: ./.github/workflows/build-in-devcontainer.yml
# uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@branch-24.06
permissions:
actions: read
packages: read
id-token: write
contents: read
pull-requests: read
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;
trxcllnt marked this conversation as resolved.
Show resolved Hide resolved
# Build the RAPIDS repos using the local CCCL mount
sccache -z;
sccache --show-adv-stats;
build-all \
trxcllnt marked this conversation as resolved.
Show resolved Hide resolved
-v \
-j$(nproc --ignore=1) \
-DBUILD_TESTS=ON \
-DBUILD_BENCHMARKS=ON \
-DBUILD_ANN_BENCH=ON \
-DBUILD_PRIMS_BENCH=ON \
-DBUILD_SHARED_LIBS=ON \
-DENABLE_CUMLPRIMS_MG=OFF \
-DUSE_CUGRAPH_OPS=OFF \
-DCPM_CCCL_SOURCE="${HOME}/cccl" \
;
sccache --show-adv-stats;
Loading
Loading