diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index bf9f62f1..aa490a62 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -11,7 +11,15 @@ on: - "branch-*" - "main" jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - uses: pre-commit/action@v3.0.1 + build-test: + needs: [pre-commit] defaults: run: shell: bash -el {0} @@ -23,14 +31,25 @@ jobs: env: NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} # GPU jobs must set this container env variable steps: - - name: Install legate/cunumeric - run: | - mamba install -y -c legate -c conda-forge legate-core=24.06 cunumeric=24.06 build cmake scikit-build scikit-learn hypothesis 'pytest<8' notebook 'numpy<2' mypy openblas - pip install matplotlib seaborn xgboost - name: Checkout legateboost uses: actions/checkout@v4 with: lfs: true + - name: Install legate/cunumeric + run: | + mamba install --yes -c rapidsai \ + 'rapids-dependency-file-generator>=1.14.0' + + rapids-dependency-file-generator \ + --output conda \ + --file-key all \ + --matrix "cuda=${CUDA_VERSION};arch=$(arch)" | tee /tmp/env.yaml + + # update the current environment (instead of creating a new one), as that + # persists across all steps + mamba env update \ + --name base \ + --file /tmp/env.yaml - name: Type check legateboost run: | mypy ./legateboost --config-file ./setup.cfg --exclude=legateboost/test --exclude=install_info @@ -52,7 +71,6 @@ jobs: - name: Build legateboost docs working-directory: docs run: | - pip install sphinx pydata-sphinx-theme myst-parser # invoke sphinx build using legate legate --run-mode=python --module sphinx.cmd.build source build -b html - uses: actions/upload-pages-artifact@v1 @@ -81,10 +99,3 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v2 - - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - - uses: pre-commit/action@v3.0.1 diff --git a/.gitignore b/.gitignore index 2f071c1d..dad547e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ build +dist/ _skbuild *.pyc *.egg-info diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5ec0d198..7fe2d855 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,5 +28,10 @@ repos: - id: clang-format files: \.(cu|cuh|h|cc|inl)$ types_or: [] + - repo: https://github.com/rapidsai/dependency-file-generator + rev: v1.14.0 + hooks: + - id: rapids-dependency-file-generator + args: ["--clean"] default_language_version: python: python3 diff --git a/conda/environments/all_cuda-118.yaml b/conda/environments/all_cuda-118.yaml new file mode 100644 index 00000000..c5f07951 --- /dev/null +++ b/conda/environments/all_cuda-118.yaml @@ -0,0 +1,28 @@ +# This file is generated by `rapids-dependency-file-generator`. +# To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. +channels: +- legate +- conda-forge +dependencies: +- cmake>=3.24.0,!=3.30.0 +- cunumeric=24.06.* +- hypothesis +- legate-core=24.06.* +- matplotlib +- mypy +- myst-parser +- nbconvert +- notebook +- numpy +- openblas +- pydata-sphinx-theme +- pytest<8 +- python-build +- scikit-build>=0.18.0 +- scikit-learn +- seaborn +- setuptools>=70.0 +- sphinx +- typing-extensions>=4.0 +- xgboost +name: all_cuda-118 diff --git a/dependencies.yaml b/dependencies.yaml new file mode 100644 index 00000000..36469d87 --- /dev/null +++ b/dependencies.yaml @@ -0,0 +1,53 @@ +# Dependency list for https://github.com/rapidsai/dependency-file-generator +files: + all: + output: conda + matrix: + cuda: ["11.8"] + includes: + - build + - docs + - run + - test +channels: + - legate + - conda-forge +dependencies: + build: + common: + - output_types: [conda] + packages: + - cmake>=3.24.0,!=3.30.0 + - &legate_core legate-core=24.06.* + - openblas + - python-build + - scikit-build>=0.18.0 + - setuptools>=70.0 + docs: + common: + - output_types: [conda] + packages: + - sphinx + - pydata-sphinx-theme + - myst-parser + run: + common: + - output_types: [conda] + packages: + - cunumeric=24.06.* + - *legate_core + - numpy + - scikit-learn + - typing-extensions>=4.0 + test: + common: + - output_types: [conda] + packages: + - hypothesis + - matplotlib + - mypy + - nbconvert + - notebook + - pytest<8 + - seaborn + - xgboost