Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ci/checks/style.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#!/bin/bash
# Copyright (c) 2019, NVIDIA CORPORATION.
# Copyright (c) 2020, NVIDIA CORPORATION.
################################################################################
# dask-cuda Style Tester
################################################################################

# Ignore errors and set path
set +e
PATH=/conda/bin:$PATH
PATH=/opt/conda/bin:$PATH

# Activate common conda env
source activate gdf
. /opt/conda/etc/profile.d/conda.sh
conda activate rapids

# Run isort and get results/return code
ISORT=`isort --recursive --check-only .`
Expand Down
55 changes: 30 additions & 25 deletions ci/cpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,56 +5,61 @@
################################################################################
set -e

# Logger function for build status output
function logger() {
echo -e "\n>>>> $@\n"
}

# Set path and build parallel level
export PATH=/conda/bin:/usr/local/cuda/bin:$PATH
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

# Get latest tag and number of commits since tag
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
################################################################################

logger "Get env..."
gpuci_logger "Check environment variables"
env

logger "Activate conda env..."
source activate gdf
gpuci_logger "Activate conda env"
. /opt/conda/etc/profile.d/conda.sh
conda activate rapids

logger "Check versions..."
gpuci_logger "Check compiler versions"
python --version
gcc --version
g++ --version
conda list
$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@master
pip install git+https://github.com/dask/distributed.git@master
Comment thread
msadang marked this conversation as resolved.

# If nightly build, append current YYMMDD to version
if [[ "$BUILD_MODE" = "branch" && "$SOURCE_BRANCH" = branch-* ]] ; then
export VERSION_SUFFIX=`date +%y%m%d`
fi

################################################################################
# BUILD - Package builds
################################################################################

conda build conda/recipes/dask-cuda --python=${PYTHON}
gpuci_logger "Build conda pkg for libcudf"
gpuci_conda_retry build conda/recipes/dask-cuda --python=${PYTHON}

rm -rf dist/
python setup.py sdist bdist_wheel
Expand All @@ -63,8 +68,8 @@ python setup.py sdist bdist_wheel
# UPLOAD - Packages
################################################################################

logger "Upload conda pkg..."
source ci/cpu/upload-anaconda.sh
gpuci_logger "Upload conda pkg..."
source ci/cpu/upload.sh

logger "Upload pypi pkg..."
gpuci_logger "Upload pypi pkg..."
source ci/cpu/upload-pypi.sh
27 changes: 0 additions & 27 deletions ci/cpu/upload-anaconda.sh

This file was deleted.

44 changes: 44 additions & 0 deletions ci/cpu/upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
#
# Adopted from https://github.com/tmcdonell/travis-scripts/blob/dfaac280ac2082cd6bcaba3217428347899f2975/update-accelerate-buildbot.sh

set -e

# Setup 'gpuci_retry' for upload retries (results in 4 total attempts)
export GPUCI_RETRY_MAX=3
export GPUCI_RETRY_SLEEP=30

# Set default label options if they are not defined elsewhere
export LABEL_OPTION=${LABEL_OPTION:-"--label main"}

# Skip uploads unless BUILD_MODE == "branch"
if [ ${BUILD_MODE} != "branch" ]; then
echo "Skipping upload"
return 0
fi

# Skip uploads if there is no upload key
if [ -z "$MY_UPLOAD_KEY" ]; then
echo "No upload key"
return 0
fi

################################################################################
# SETUP - Get conda file output locations
################################################################################

gpuci_logger "Get conda file output locations"
export DASKCUDA_FILE=`conda build conda/recipes/dask-cuda --python=$PYTHON --output`

################################################################################
# UPLOAD - Conda packages
################################################################################

gpuci_logger "Starting conda uploads"

if [ "$UPLOAD_DASKCUDA" == "1" ]; then
test -e ${DASKCUDA_FILE}
echo "Upload Dask-cuda"
echo ${DASKCUDA_FILE}
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${DASKCUDA_FILE}
fi
56 changes: 29 additions & 27 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
#!/bin/bash
# Copyright (c) 2018, NVIDIA CORPORATION.
# Copyright (c) 2020, NVIDIA CORPORATION.
##############################################
# dask-cuda GPU build and test script for CI #
##############################################
set -e
NUMARGS=$#
ARGS=$*

# Logger function for build status output
function logger() {
echo -e "\n>>>> $@\n"
}

# Arg parsing function
function hasArg {
(( ${NUMARGS} != 0 )) && (echo " ${ARGS} " | grep -q " $1 ")
}

# Set path and build parallel level
export PATH=/conda/bin:/usr/local/cuda/bin:$PATH
export PARALLEL_LEVEL=4
export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH
export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4}
export CUDA_REL=${CUDA_VERSION%.*}
export CUDA_REL2=${CUDA//./}

Expand All @@ -44,53 +39,60 @@ export INSTALL_DASK_MASTER=1
# SETUP - Check environment
################################################################################

logger "Check environment..."
gpuci_logger "Check environment"
env

logger "Check GPU usage..."
gpuci_logger "Check GPU usage"
nvidia-smi

logger "Activate conda env..."
source activate gdf
conda list
gpuci_logger "Activate conda env"
. /opt/conda/etc/profile.d/conda.sh
conda activate rapids
conda info
conda config --show-sources
conda list --show-channel-urls

# Fixing Numpy version to avoid RuntimeWarning: numpy.ufunc size changed, may
# indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject
conda install "cudatoolkit=$CUDA_REL" \
gpuci_conda_retry install "cudatoolkit=$CUDA_REL" \
"cudf=${MINOR_VERSION}" "dask-cudf=${MINOR_VERSION}" \
"ucx-py=$MINOR_VERSION.*" "ucx-proc=*=gpu" \
"rapids-build-env=$MINOR_VERSION.*"

# Pin pytest-asyncio because latest versions modify the default asyncio
# `event_loop_policy`. See https://github.com/dask/distributed/pull/4212 .
conda install "pytest-asyncio=<0.14.0"
gpuci_conda_retry install "pytest-asyncio=<0.14.0"

# https://docs.rapids.ai/maintainers/depmgmt/
# conda remove -f rapids-build-env
# conda install "your-pkg=1.0.0"
# gpuci_conda_retry remove -f rapids-build-env
# gpuci_conda_retry install "your-pkg=1.0.0"


conda list
conda info
conda config --show-sources
conda list --show-channel-urls

# Install the master version of dask and distributed
if [[ "${INSTALL_DASK_MASTER}" == 1 ]]; then
logger "pip install git+https://github.com/dask/distributed.git@master --upgrade"
gpuci_logger "pip install git+https://github.com/dask/distributed.git@master --upgrade"
pip install "git+https://github.com/dask/distributed.git@master" --upgrade
logger "pip install git+https://github.com/dask/dask.git@master --upgrade"
gpuci_logger "pip install git+https://github.com/dask/dask.git@master --upgrade"
pip install "git+https://github.com/dask/dask.git@master" --upgrade
fi

logger "Check versions..."
gpuci_logger "Check versions"
python --version
$CC --version
$CXX --version
conda list
conda info
conda config --show-sources
conda list --show-channel-urls

################################################################################
# BUILD - Build dask-cuda
################################################################################

logger "Build dask-cuda..."
gpuci_logger "Build dask-cuda"
cd $WORKSPACE
python -m pip install -e .

Expand All @@ -99,17 +101,17 @@ python -m pip install -e .
################################################################################

if hasArg --skip-tests; then
logger "Skipping Tests..."
gpuci_logger "Skipping Tests"
else
logger "Python py.test for dask-cuda..."
gpuci_logger "Python py.test for dask-cuda"
cd $WORKSPACE
ls dask_cuda/tests/
UCXPY_IFNAME=eth0 UCX_WARN_UNUSED_ENV_VARS=n UCX_MEMTYPE_CACHE=n py.test -vs --cache-clear --basetemp=${WORKSPACE}/dask-cuda-tmp --junitxml=${WORKSPACE}/junit-dask-cuda.xml --cov-config=.coveragerc --cov=dask_cuda --cov-report=xml:${WORKSPACE}/dask-cuda-coverage.xml --cov-report term dask_cuda/tests/

logger "Running dask.distributed GPU tests"
gpuci_logger "Running dask.distributed GPU tests"
# Test downstream packages, which requires Python v3.7
if [ $(python -c "import sys; print(sys.version_info[1])") -ge "7" ]; then
logger "TEST OF DASK/UCX..."
gpuci_logger "TEST OF DASK/UCX"
py.test --cache-clear -vs `python -c "import distributed.protocol.tests.test_cupy as m;print(m.__file__)"`
py.test --cache-clear -vs `python -c "import distributed.protocol.tests.test_numba as m;print(m.__file__)"`
py.test --cache-clear -vs `python -c "import distributed.protocol.tests.test_rmm as m;print(m.__file__)"`
Expand Down
3 changes: 2 additions & 1 deletion ci/local/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ For a full list of available gpuCI docker images, visit our [DockerHub](https://
Style Check:
```bash
$ bash ci/local/build.sh -r ~/rapids/dask-cuda -s
$ source activate gdf #Activate gpuCI conda environment
$ . /opt/conda/etc/profile.d/conda.sh
$ conda activate rapids #Activate gpuCI conda environment
$ cd rapids
$ flake8 python
```
Expand Down
2 changes: 1 addition & 1 deletion ci/release/update-version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2019, NVIDIA CORPORATION.
# Copyright (c) 2020, NVIDIA CORPORATION.
################################################################################
# dask-cuda version updater
################################################################################
Expand Down