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

Forward-merge branch-23.10 to branch-23.12 #1352

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Conversation

GPUtester
Copy link
Contributor

Forward-merge triggered by push to branch-23.10 that creates a PR to keep branch-23.12 up-to-date. If this PR is unable to be immediately merged due to conflicts, it will remain open for the team to manually merge.

This PR adds some [devcontainers](https://containers.dev/) 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](https://github.com/trxcllnt/rmm/blob/fea/devcontainers/.github/workflows/pr.yaml#L79-L85), 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](https://user-images.githubusercontent.com/178183/221771999-97ab29d5-e718-4e5f-b32f-2cdd51bba25c.png)

Clicking this button will cause VSCode to prompt the user to select one of these devcontainer variants:
![image](https://github.com/rapidsai/rmm/assets/178183/68d4b264-4fc2-4008-92b6-cb4bdd19b29f)

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`](https://github.com/trxcllnt/rmm/blob/fea/devcontainers/.devcontainer/README.md).

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

```shell
$ 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:

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

Authors:
  - Paul Taylor (https://github.com/trxcllnt)

Approvers:
  - Mark Harris (https://github.com/harrism)
  - Bradley Dice (https://github.com/bdice)
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #1328
@GPUtester GPUtester requested review from a team as code owners September 26, 2023 20:59
@GPUtester GPUtester merged commit ec75b12 into branch-23.12 Sep 26, 2023
26 checks passed
@GPUtester
Copy link
Contributor Author

SUCCESS - forward-merge complete.

@github-actions github-actions bot added CMake conda cpp Pertains to C++ code ci labels Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci CMake conda cpp Pertains to C++ code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants