forked from rapidsai/cugraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_wheel.sh
executable file
·61 lines (47 loc) · 1.38 KB
/
build_wheel.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# Copyright (c) 2023-2025, NVIDIA CORPORATION.
set -euo pipefail
package_name=$1
package_dir=$2
package_type=$3
source rapids-configure-sccache
source rapids-date-string
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
rapids-generate-version > ./VERSION
cd "${package_dir}"
sccache --zero-stats
rapids-logger "Building '${package_name}' wheel"
rapids-pip-retry wheel \
-w dist \
-v \
--no-deps \
--disable-pip-version-check \
--extra-index-url https://pypi.nvidia.com \
.
sccache --show-adv-stats
EXCLUDE_ARGS=(
--exclude "libraft.so"
)
# Avoid picking up dependencies on CUDA wheels that come through
# transitively from 'libraft'.
#
# 'libraft' wheels are responsible for carrying a runtime dependency on
# these based on RAFT's needs.
EXCLUDE_ARGS+=(
--exclude "libcublas.so.*"
--exclude "libcublasLt.so.*"
--exclude "libcurand.so.*"
--exclude "libcusolver.so.*"
--exclude "libcusparse.so.*"
--exclude "libnvJitLink.so.*"
--exclude "librapids_logger.so"
)
if [[ "${package_dir}" != "python/libcugraph" ]]; then
EXCLUDE_ARGS+=(
--exclude "libcugraph_c.so"
--exclude "libcugraph.so"
)
fi
mkdir -p final_dist
python -m auditwheel repair -w final_dist "${EXCLUDE_ARGS[@]}" dist/*
RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 "${package_type}" final_dist