-
Notifications
You must be signed in to change notification settings - Fork 94
/
build.sh
executable file
·88 lines (66 loc) · 2.75 KB
/
build.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/env bash
# Copyright (c) 2019-2022, NVIDIA CORPORATION.
################################################################################
# dask-cuda cpu build
################################################################################
set -e
# Set path and build parallel level
export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH
export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4}
# Set home to the job's workspace
export HOME="$WORKSPACE"
# Determine CUDA release version
export CUDA_REL=${CUDA_VERSION%.*}
# Setup 'gpuci_conda_retry' for build retries (results in 2 total attempts)
export GPUCI_CONDA_RETRY_MAX=1
export GPUCI_CONDA_RETRY_SLEEP=30
# Switch to project root; also root of repo checkout
cd "$WORKSPACE"
# While conda provides these during conda-build, they are also necessary during
# the setup.py build for PyPI
export GIT_DESCRIBE_TAG=`git describe --abbrev=0 --tags`
export GIT_DESCRIBE_NUMBER=`git rev-list ${GIT_DESCRIBE_TAG}..HEAD --count`
# If nightly build, append current YYMMDD to version
if [[ "$BUILD_MODE" = "branch" && "$SOURCE_BRANCH" = branch-* ]] ; then
export VERSION_SUFFIX=`date +%y%m%d`
fi
################################################################################
# SETUP - Check environment
################################################################################
gpuci_logger "Check environment variables"
env
gpuci_logger "Activate conda env"
. /opt/conda/etc/profile.d/conda.sh
conda activate rapids
# Remove rapidsai-nightly channel if we are building main branch
if [ "$SOURCE_BRANCH" = "main" ]; then
conda config --system --remove channels rapidsai-nightly
fi
gpuci_logger "Check compiler versions"
python --version
$CC --version
$CXX --version
gpuci_logger "Check conda environment"
conda info
conda config --show-sources
conda list --show-channel-urls
# FIX Added to deal with Anancoda SSL verification issues during conda builds
conda config --set ssl_verify False
pip install git+https://github.com/dask/dask.git@main
pip install git+https://github.com/dask/distributed.git@main
################################################################################
# BUILD - Package builds
################################################################################
# FIXME: Move boa install to gpuci/rapidsai
gpuci_mamba_retry install -c conda-forge boa
gpuci_logger "Build conda pkg for dask-cuda"
gpuci_conda_retry mambabuild conda/recipes/dask-cuda --python=${PYTHON}
rm -rf dist/
python setup.py sdist bdist_wheel
################################################################################
# UPLOAD - Packages
################################################################################
gpuci_logger "Upload conda pkg..."
source ci/cpu/upload.sh
gpuci_logger "Upload pypi pkg..."
source ci/cpu/upload-pypi.sh