Skip to content

Commit 9c6f5b6

Browse files
authored
Bifurcate Dependency Lists (rapidsai#1073)
## Summary This PR uses [rapids-dependency-file-generator](https://github.com/rapidsai/dependency-file-generator) along with a new `dependencies.yaml` file to bifurcate the existing dependency lists in the `conda/environments` directory. `rapids-dependency-file-generator` will generate `conda` environment files based on the contents of the new `dependencies.yaml` file (see [rapidsai/dependency-file-generator](https://github.com/rapidsai/dependency-file-generator) for more details). There is also a new GitHub Action that runs a shared workflow (which lives [here](https://github.com/rapidsai/shared-action-workflows/blob/main/.github/workflows/dependency-files.yaml)) to ensure that the generated dependency files are up-to-date in each PR. This shared workflow can easily be implemented across other RAPIDS repositories. ## Why is this PR Needed? This PR is necessary to support some upcoming changes in CI. We've recently created some new, slimmer CI images (~450MB vs. the current 6.5GB) in anticipation of the move to GitHub Actions. These new images omit the large dependency packages (i.e. `rapids-{build,notebook,doc}-env`) from the [rapidsai/integration](https://github.com/rapidsai/integration) repository, which will eventually be deprecated and deleted entirely. One of the consequences of removing the `integration` packages from our CI images is that commonly used test dependencies (i.e. `pytest`) are no longer included in the CI images by default. Therefore, we need to ensure that each repository has a list of the dependencies that are required to test its respective libraries. A similar list will also be needed in other repositories for JupyterLab Notebook dependencies (which will be utilized in our `runtime` end-user images), but that list does not apply to `rmm`. ## Impacts of these Changes The changes in this PR impact developers and CI as follows: ### Developers Developers should now update the dependencies in the `dependencies.yaml` file instead of the generated dependency files. If they accidentally update the generated dependency files, the new GitHub Action will fail. At this point, the developer will need to install `rapids-dependency-file-generator` and run it from the project's root directory. For example: ```sh pip install rapids-dependency-file-generator rapids-dependency-file-generator ``` This step can also be implemented as a pre-commit hook. ### CI The new GitHub Action CI process will use the dependencies in the `test` list in `dependencies.yaml` to create a new test environment for `rmm`/`librmm` in CI. For example: ```sh ENV_NAME="rmm_test" rapids-dependency-file-generator \ --file_key "test" \ --generate "conda" \ --matrix "cuda=11.5;arch=$(arch)" > env.yaml mamba env create --file env.yaml mamba activate "$ENV_NAME" # ... run `rmm`/`librmm` tests ``` ## Additional Information The new GitHub Action will enforce that an `all` environment (under the `files.all` key) is included in the `dependencies.yaml` file and that it includes all of the dependency lists in the `dependencies.conda` and `dependencies.conda_and_requirements` sections. This is enforced in the shared workflow [here](https://github.com/rapidsai/shared-action-workflows/blob/d5cf5f802a0da73aed5ed01ee18daf5dd3a0f095/.github/workflows/dependency-files.yaml#L42-L80). It exists to provide some standardization across the RAPIDS libraries and will eventually replace the `rapids-{build,notebook,doc}-env` packages in our `devel` end-user images. Authors: - AJ Schmidt (https://github.com/ajschmidt8) Approvers: - Bradley Dice (https://github.com/bdice) - Ray Douglass (https://github.com/raydouglass)
1 parent ed43650 commit 9c6f5b6

File tree

5 files changed

+95
-21
lines changed

5 files changed

+95
-21
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: dependency-files
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
check-generated-files:
8+
uses: rapidsai/shared-action-workflows/.github/workflows/dependency-files.yaml@main

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ $ cd rmm
9191
- Create the conda development environment `rmm_dev`
9292
```bash
9393
# create the conda environment (assuming in base `rmm` directory)
94-
$ conda env create --name rmm_dev --file conda/environments/rmm_dev_cuda11.0.yml
94+
$ conda env create --name rmm_dev --file conda/environments/all_cuda-115_arch-x86_64.yaml
9595
# activate the environment
9696
$ conda activate rmm_dev
9797
```
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
name: rmm_dev
1+
# This file is generated by `rapids-dependency-file-generator`.
2+
# To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
23
channels:
34
- rapidsai
45
- conda-forge
56
dependencies:
6-
- clang=11.1.0
7+
- black=22.3.0
78
- clang-tools=11.1.0
9+
- clang=11.1.0
810
- cmake>=3.20.1,!=3.23.0
911
- cmakelang=0.6.13
12+
- cuda-python>=11.5,<11.7.1
13+
- cudatoolkit=11.5
14+
- cython>=0.29,<0.30
1015
- flake8=3.8.3
11-
- black=22.3.0
16+
- gcovr>=5.0
1217
- isort=5.10.1
13-
- python>=3.8,<3.10
1418
- numba>=0.49
1519
- numpy>=1.19
16-
- cffi>=1.10.0
1720
- pytest
18-
- cudatoolkit=11.5
21+
- pytest-cov
22+
- python>=3.8,<3.10
1923
- scikit-build>=0.13.1
2024
- spdlog>=1.8.5,<1.9
21-
- cython>=0.29,<0.30
22-
- gcovr>=5.0
23-
- cuda-python>=11.5,<11.7.1
24-
- sphinx_rtd_theme
25+
name: all_cuda-115_arch-x86_64
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
name: rmm_dev
1+
# This file is generated by `rapids-dependency-file-generator`.
2+
# To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
23
channels:
34
- rapidsai
45
- conda-forge
56
dependencies:
6-
- clang=11.1.0
7+
- black=22.3.0
78
- clang-tools=11.1.0
9+
- clang=11.1.0
810
- cmake>=3.20.1,!=3.23.0
911
- cmakelang=0.6.13
12+
- cuda-python>=11.6,<11.7.1
13+
- cudatoolkit=11.6
14+
- cython>=0.29,<0.30
1015
- flake8=3.8.3
11-
- black=22.3.0
16+
- gcovr>=5.0
1217
- isort=5.10.1
13-
- python>=3.8,<3.10
1418
- numba>=0.49
1519
- numpy>=1.19
16-
- cffi>=1.10.0
1720
- pytest
18-
- cudatoolkit=11.6
21+
- pytest-cov
22+
- python>=3.8,<3.10
1923
- scikit-build>=0.13.1
2024
- spdlog>=1.8.5,<1.9
21-
- cython>=0.29,<0.30
22-
- gcovr>=5.0
23-
- cuda-python>=11.6,11.7.1
24-
- sphinx_rtd_theme
25+
name: all_cuda-116_arch-x86_64

dependencies.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Dependency list for https://github.com/rapidsai/dependency-file-generator
2+
files:
3+
all:
4+
generate: conda
5+
matrix:
6+
cuda: ["11.5", "11.6"]
7+
arch: [x86_64]
8+
includes:
9+
- build
10+
- develop
11+
- run
12+
- test
13+
test:
14+
generate: none
15+
includes:
16+
- test
17+
channels:
18+
- rapidsai
19+
- conda-forge
20+
dependencies:
21+
conda_and_requirements:
22+
common:
23+
build:
24+
- cmake>=3.20.1,!=3.23.0
25+
- cython>=0.29,<0.30
26+
- python>=3.8,<3.10
27+
- scikit-build>=0.13.1
28+
run:
29+
- numba>=0.49
30+
- numpy>=1.19
31+
develop:
32+
- black=22.3.0
33+
- clang=11.1.0
34+
- cmakelang=0.6.13
35+
- flake8=3.8.3
36+
- gcovr>=5.0
37+
- isort=5.10.1
38+
test:
39+
- pytest
40+
- pytest-cov
41+
specific:
42+
- matrix:
43+
cuda: "11.5"
44+
build:
45+
- cuda-python>=11.5,<11.7.1
46+
- matrix:
47+
cuda: "11.6"
48+
build:
49+
- cuda-python>=11.6,<11.7.1
50+
conda:
51+
common:
52+
build:
53+
- spdlog>=1.8.5,<1.9
54+
develop:
55+
- clang-tools=11.1.0
56+
specific:
57+
- matrix:
58+
cuda: "11.5"
59+
build:
60+
- cudatoolkit=11.5
61+
- matrix:
62+
cuda: "11.6"
63+
build:
64+
- cudatoolkit=11.6

0 commit comments

Comments
 (0)