-
Notifications
You must be signed in to change notification settings - Fork 67
/
build_rust.sh
executable file
·38 lines (28 loc) · 1.07 KB
/
build_rust.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
#!/bin/bash
# Copyright (c) 2024, NVIDIA CORPORATION.
set -euo pipefail
rapids-logger "Create test conda environment"
. /opt/conda/etc/profile.d/conda.sh
rapids-dependency-file-generator \
--output conda \
--file-key rust \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml
rapids-mamba-retry env create --yes -f env.yaml -n rust
# seeing failures on activating the environment here on unbound locals
# apply workaround from https://github.com/conda/conda/issues/8186#issuecomment-532874667
set +eu
conda activate rust
set -eu
rapids-print-env
# we need to set up LIBCLANG_PATH to allow rust bindgen to work,
# grab it from the conda env
export LIBCLANG_PATH=$(dirname $(find /opt/conda -name libclang.so | head -n 1))
echo "LIBCLANG_PATH=$LIBCLANG_PATH"
rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
# installing libcuvs/libraft will speed up the rust build substantially
rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
libcuvs \
libraft
bash ./build.sh rust