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 RMM devcontainers #1328

Merged
merged 72 commits into from
Sep 26, 2023
Merged

Conversation

trxcllnt
Copy link
Contributor

@trxcllnt trxcllnt commented Aug 22, 2023

Description

This PR adds some devcontainers to help simplify building the RMM C++ and Python libraries.

It also adds an optional job to the pr.yaml to build the RMM libs in each devcontainer, so the build caches are populated for devs by CI.

A devcontainer can be launched by clicking the "Reopen in Container" button that VSCode shows when opening the repo (or by using the "Rebuild and Reopen in Container" command from the command palette):
image

Clicking this button will cause VSCode to prompt the user to select one of these devcontainer variants:
image

On startup, the devcontainer creates or updates the conda/pip environment using rmm/dependencies.yaml. The envs/package caches are cached on the host via volume mounts, which are described in more detail in .devcontainer/README.md.

The container includes convenience functions to clean, configure, and build the various RMM components:

$ clean-rmm-cpp # only cleans the C++ build dir
$ clean-rmm-python # only cleans the Python build dir
$ clean-rmm # cleans both C++ and Python build dirs

$ configure-rmm-cpp # only configures rmm C++ lib

$ build-rmm-cpp # only builds rmm C++ lib
$ build-rmm-python # only builds rmm Python lib
$ build-rmm # builds both C++ and Python libs
  • The C++ build script is a small wrapper around cmake -S ~/rmm -B ~/rmm/build and cmake --build ~/rmm/build
  • The Python build script is a small wrapper around pip install --editable ~/rmm

Unlike build.sh, these convenience scripts don't install the libraries after building them. Instead, they automatically inject the correct arguments to build the C++ libraries from source and use their build dirs as package roots:

$ cmake -S ~/rmm -B ~/rmm/build
$ CMAKE_ARGS="-Drmm_ROOT=~/rmm/build" \ # <-- this argument is automatic
  pip install -e ~/rmm

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@trxcllnt
Copy link
Contributor Author

/ok to test

@trxcllnt
Copy link
Contributor Author

/ok to test

@trxcllnt
Copy link
Contributor Author

/ok to test

Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, once we update to clang 16.0.6.

dependencies.yaml Outdated Show resolved Hide resolved
dependencies.yaml Outdated Show resolved Hide resolved
@trxcllnt
Copy link
Contributor Author

/ok to test

@trxcllnt
Copy link
Contributor Author

/ok to test

@trxcllnt
Copy link
Contributor Author

/ok to test

@trxcllnt
Copy link
Contributor Author

/ok to test

@trxcllnt
Copy link
Contributor Author

/ok to test

rapids-bot bot pushed a commit to rapidsai/cuspatial that referenced this pull request Sep 25, 2023
Copy link
Member

@ajschmidt8 ajschmidt8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requesting some small changes

ci/release/update-version.sh Outdated Show resolved Hide resolved
trxcllnt and others added 2 commits September 26, 2023 10:02
Co-authored-by: AJ Schmidt <ajschmidt8@users.noreply.github.com>
@trxcllnt
Copy link
Contributor Author

/ok to test

@harrism
Copy link
Member

harrism commented Sep 26, 2023

/merge

@rapids-bot rapids-bot bot merged commit 7a9451d into rapidsai:branch-23.10 Sep 26, 2023
46 checks passed
rapids-bot bot pushed a commit that referenced this pull request Oct 2, 2023
Since #1328 was merged after `branch-23.12` was created, the files need to be updated manually in `branch-23.12`.

Authors:
  - Ray Douglass (https://github.com/raydouglass)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #1355
@bdice bdice mentioned this pull request Nov 9, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for review Ready for review by team ci CMake conda cpp Pertains to C++ code improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants