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

manage dependencies with rapids-dependency-file-generator #120

Merged
merged 6 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
35 changes: 23 additions & 12 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]

build-test:
needs: [pre-commit]
defaults:
run:
shell: bash -el {0}
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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/[email protected]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build
dist/
_skbuild
*.pyc
*.egg-info
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
28 changes: 28 additions & 0 deletions conda/environments/all_cuda-118.yaml
Original file line number Diff line number Diff line change
@@ -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
53 changes: 53 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
@@ -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
Loading