-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR enables building wheels for pylibraft and raft-dask. Authors: - Vyas Ramasubramani (https://github.com/vyasr) - Sevag H (https://github.com/sevagh) - Paul Taylor (https://github.com/trxcllnt) Approvers: - Corey J. Nolet (https://github.com/cjnolet) - AJ Schmidt (https://github.com/ajschmidt8) URL: #1013
- Loading branch information
Showing
20 changed files
with
260 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: RAFT wheels | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
versioneer-override: | ||
type: string | ||
default: '' | ||
build-tag: | ||
type: string | ||
default: '' | ||
branch: | ||
required: true | ||
type: string | ||
date: | ||
required: true | ||
type: string | ||
sha: | ||
required: true | ||
type: string | ||
build-type: | ||
type: string | ||
default: nightly | ||
|
||
concurrency: | ||
group: "raft-${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pylibraft-wheel: | ||
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux.yml@main | ||
with: | ||
repo: rapidsai/raft | ||
|
||
build-type: ${{ inputs.build-type }} | ||
branch: ${{ inputs.branch }} | ||
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
|
||
package-dir: python/pylibraft | ||
package-name: pylibraft | ||
|
||
python-package-versioneer-override: ${{ inputs.versioneer-override }} | ||
python-package-build-tag: ${{ inputs.build-tag }} | ||
|
||
skbuild-configure-options: "-DRAFT_BUILD_WHEELS=ON -DDETECT_CONDA_ENV=OFF -DFIND_RAFT_CPP=OFF" | ||
|
||
test-extras: test | ||
test-unittest: "python -m pytest -v ./python/pylibraft/pylibraft/test" | ||
secrets: inherit | ||
raft-dask-wheel: | ||
needs: pylibraft-wheel | ||
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux.yml@main | ||
with: | ||
repo: rapidsai/raft | ||
|
||
build-type: ${{ inputs.build-type }} | ||
branch: ${{ inputs.branch }} | ||
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
|
||
package-dir: python/raft-dask | ||
package-name: raft_dask | ||
|
||
python-package-versioneer-override: ${{ inputs.versioneer-override }} | ||
python-package-build-tag: ${{ inputs.build-tag }} | ||
|
||
skbuild-configure-options: "-DRAFT_BUILD_WHEELS=ON -DDETECT_CONDA_ENV=OFF -DFIND_RAFT_CPP=OFF" | ||
|
||
test-extras: test | ||
test-unittest: "python -m pytest -v ./python/raft-dask/raft_dask/test" | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,3 +49,6 @@ _skbuild | |
|
||
## doxygen build check inside ci/checks/style.sh | ||
doxygen_check/ | ||
|
||
## cibuildwheel | ||
/wheelhouse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copyright (c) 2022, NVIDIA CORPORATION. | ||
|
||
"""Custom build backend for pylibraft to get versioned requirements. | ||
Based on https://setuptools.pypa.io/en/latest/build_meta.html | ||
""" | ||
import os | ||
from functools import wraps | ||
|
||
from setuptools import build_meta as _orig | ||
|
||
# Alias the required bits | ||
build_wheel = _orig.build_wheel | ||
build_sdist = _orig.build_sdist | ||
|
||
|
||
def replace_requirements(func): | ||
@wraps(func) | ||
def wrapper(config_settings=None): | ||
orig_list = getattr(_orig, func.__name__)(config_settings) | ||
append_list = [ | ||
f"rmm{os.getenv('RAPIDS_PY_WHEEL_CUDA_SUFFIX', default='')}" | ||
] | ||
return orig_list + append_list | ||
|
||
return wrapper | ||
|
||
|
||
get_requires_for_build_wheel = replace_requirements( | ||
_orig.get_requires_for_build_wheel | ||
) | ||
get_requires_for_build_sdist = replace_requirements( | ||
_orig.get_requires_for_build_sdist | ||
) | ||
get_requires_for_build_editable = replace_requirements( | ||
_orig.get_requires_for_build_editable | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,3 @@ skip= | |
build | ||
dist | ||
__init__.py | ||
|
||
[options] | ||
packages = find: | ||
install_requires = numpy | ||
python_requires = >=3.7,<3.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,5 +21,4 @@ requires = [ | |
"scikit-build>=0.13.1", | ||
"cmake>=3.23.1,!=3.25.0", | ||
"ninja", | ||
"pylibraft" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.