Skip to content

Commit

Permalink
build wheels without build isolation
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Oct 15, 2024
1 parent f62b217 commit e19fd6e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 130 deletions.
123 changes: 0 additions & 123 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,138 +12,15 @@ concurrency:
jobs:
pr-builder:
needs:
- changed-files
- checks
- conda-cpp-build
- conda-cpp-tests
- conda-cpp-checks
- conda-python-build
- conda-python-tests
- docs-build
- rust-build
- wheel-build-cuvs
- wheel-tests-cuvs
- devcontainer
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: always()
with:
needs: ${{ toJSON(needs) }}
changed-files:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
files_yaml: |
test_cpp:
- '**'
- '!.devcontainer/**'
- '!.pre-commit-config.yaml'
- '!README.md'
- '!docs/**'
- '!img/**'
- '!notebooks/**'
- '!python/**'
- '!rust/**'
- '!thirdparty/LICENSES/**'
test_notebooks:
- '**'
- '!.devcontainer/**'
- '!.pre-commit-config.yaml'
- '!README.md'
- '!rust/**'
- '!thirdparty/LICENSES/**'
test_python:
- '**'
- '!.devcontainer/**'
- '!.pre-commit-config.yaml'
- '!README.md'
- '!docs/**'
- '!img/**'
- '!notebooks/**'
- '!rust/**'
- '!thirdparty/LICENSES/**'
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
enable_check_generated_files: false
conda-cpp-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
node_type: cpu16
conda-cpp-tests:
needs: [conda-cpp-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
conda-cpp-checks:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
enable_check_symbols: true
symbol_exclusions: (void (thrust::|cub::)|raft_cutlass)
conda-python-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
conda-python-tests:
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
docs-build:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
arch: "amd64"
container_image: "rapidsai/ci-conda:latest"
run_script: "ci/build_docs.sh"
rust-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
arch: "amd64"
container_image: "rapidsai/ci-conda:latest"
run_script: "ci/build_rust.sh"
wheel-build-cuvs:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
script: ci/build_wheel_cuvs.sh
wheel-tests-cuvs:
needs: [wheel-build-cuvs, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
with:
build_type: pull-request
script: ci/test_wheel_cuvs.sh
devcontainer:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
arch: '["amd64"]'
cuda: '["12.5"]'
build_command: |
sccache -z;
build-all --verbose;
sccache -s;
33 changes: 31 additions & 2 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@ source rapids-date-string

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

rapids-logger "Generating build requirements"
matrix_selectors="cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION};cuda_suffixed=true"

rapids-dependency-file-generator \
--output requirements \
--file-key "py_build_${underscore_package_name}" \
--matrix "${matrix_selectors}" \
| tee /tmp/requirements-build.txt

rapids-dependency-file-generator \
--output requirements \
--file-key "py_rapids_build_${underscore_package_name}" \
--matrix "${matrix_selectors}" \
| tee -a /tmp/requirements-build.txt

rapids-logger "Installing build requirements"
python -m pip install \
-v \
--prefer-binary \
-r /tmp/requirements-build.txt

rapids-generate-version > ./VERSION

cd "${package_dir}"
Expand All @@ -32,8 +53,16 @@ case "${RAPIDS_CUDA_VERSION}" in
;;
esac

# Hardcode the output dir
python -m pip wheel . -w dist -vvv --no-deps --disable-pip-version-check
rapids-logger "Building '${package_name}' wheel"
python -m pip wheel \
-w dist \
-v \
--no-build-isolation \
--no-deps \
--disable-pip-version-check \
.

sccache --show-adv-stats

mkdir -p final_dist
python -m auditwheel repair -w final_dist "${EXCLUDE_ARGS[@]}" dist/*
Expand Down
10 changes: 5 additions & 5 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ files:
- rapids_build
- cuda
- rust
py_build_py_cuvs:
py_build_cuvs:
output: pyproject
pyproject_dir: python/cuvs
extras:
table: build-system
includes:
- build
py_rapids_build_py_cuvs:
py_rapids_build_cuvs:
output: pyproject
pyproject_dir: python/cuvs
extras:
Expand All @@ -90,7 +90,7 @@ files:
includes:
- rapids_build
- build_py_cuvs
py_run_py_cuvs:
py_run_cuvs:
output: pyproject
pyproject_dir: python/cuvs
extras:
Expand All @@ -99,7 +99,7 @@ files:
- cuda_wheels
- run_py_cuvs
- depends_on_pylibraft
py_test_py_cuvs:
py_test_cuvs:
output: pyproject
pyproject_dir: python/cuvs
extras:
Expand All @@ -116,7 +116,7 @@ files:
table: build-system
includes:
- rapids_build_setuptools
py_rapids_build_py_cuvs_bench:
py_rapids_build_cuvs_bench:
output: pyproject
pyproject_dir: python/cuvs_bench
extras:
Expand Down

0 comments on commit e19fd6e

Please sign in to comment.