forked from rapidsai/cuml
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_python.sh
More file actions
executable file
·49 lines (32 loc) · 1.41 KB
/
build_python.sh
File metadata and controls
executable file
·49 lines (32 loc) · 1.41 KB
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
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
source rapids-configure-sccache
source rapids-date-string
export CMAKE_GENERATOR=Ninja
rapids-print-env
rapids-generate-version > ./VERSION
rapids-logger "Begin py build"
CPP_CHANNEL=$(rapids-download-conda-from-github cpp)
RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION)
export RAPIDS_PACKAGE_VERSION
# populates `RATTLER_CHANNELS` array and `RATTLER_ARGS` array
source rapids-rattler-channel-string
rapids-logger "Prepending channel ${CPP_CHANNEL} to RATTLER_CHANNELS"
RATTLER_CHANNELS=("--channel" "${CPP_CHANNEL}" "${RATTLER_CHANNELS[@]}")
sccache --stop-server 2>/dev/null || true
rapids-logger "Building cuml"
# --no-build-id allows for caching with `sccache`
# more info is available at
# https://rattler.build/latest/tips_and_tricks/#using-sccache-or-ccache-with-rattler-build
rattler-build build --recipe conda/recipes/cuml \
"${RATTLER_ARGS[@]}" \
"${RATTLER_CHANNELS[@]}"
sccache --show-adv-stats
sccache --stop-server >/dev/null 2>&1 || true
# remove build_cache directory to avoid uploading the entire source tree
# tracked in https://github.com/prefix-dev/rattler-build/issues/1424
rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache
RAPIDS_PACKAGE_NAME="$(rapids-package-name conda_python cuml --stable --cuda)"
export RAPIDS_PACKAGE_NAME