Skip to content

Commit

Permalink
Gpuciscripts clean and update(#627)
Browse files Browse the repository at this point in the history
In CI folder the following changes have been made:

- Remove logger function and replace all logger calls with gpuci_logger

- Removed all ellipses ... from logger messages

- Prepend /opt to the conda path in PATH variable

- Replace conda with gpuci_conda_retry for build and install calls  (Did not replace conda activate with gpuci_conda_retry) 

- Replace source activate <env> with the following:
. /opt/conda/etc/profile.d/conda.sh
conda activate rapids

- Replace conda list with more verbose information:
conda info
conda config --show-sources
conda list --show-channel-urls

- Update Copyright year in the top of scripts to include 2020 if applicable

- Set PARALLEL_LEVEL to ${PARALLEL_LEVEL:-4}

- Set gpuci_conda_retry flags in cpu/build.sh
Setup 'gpuci_conda_retry' for build retries (results in 2 total attempts)
export GPUCI_CONDA_RETRY_MAX=1
export GPUCI_CONDA_RETRY_SLEEP=30

- Replace calls to gcc and g++ with $CC and $CXX respectively

Authors:
  - Mark Sadang <[email protected]>
  - Mark Sadang <[email protected]>
  - Mark Sadang <[email protected]>

Approvers:
  - AJ Schmidt
  - Dillon Cullinan

URL: #627
  • Loading branch information
msadang committed Dec 1, 2020
1 parent d9914ff commit 62ee3c7
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- PR #603 Always test both legacy and per-thread default stream
- PR #611 Add a note to the contribution guide about requiring 2 C++ reviewers
- PR #615 Improve gpuCI Scripts
- PR #627 Cleanup gpuCI Scripts
- PR #635 Add Python docs build to gpuCI

## Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ RAN_CMAKE=0
# If INSTALL_PREFIX is not set, check PREFIX, then check
# CONDA_PREFIX, then fall back to install inside of $LIBRMM_BUILD_DIR
INSTALL_PREFIX=${INSTALL_PREFIX:=${PREFIX:=${CONDA_PREFIX:=$LIBRMM_BUILD_DIR/install}}}
PARALLEL_LEVEL=${PARALLEL_LEVEL:=""}
export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4}

function hasArg {
(( NUMARGS != 0 )) && (echo " ${ARGS} " | grep -q " $1 ")
Expand Down
2 changes: 1 addition & 1 deletion ci/checks/changelog.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2018, NVIDIA CORPORATION.
# Copyright (c) 2020, NVIDIA CORPORATION.
#########################
# RMM CHANGELOG Tester #
#########################
Expand Down
7 changes: 4 additions & 3 deletions ci/checks/style.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
#!/bin/bash
# Copyright (c) 2018, NVIDIA CORPORATION.
# Copyright (c) 2020, NVIDIA CORPORATION.
#####################
# RMM Style Tester #
#####################

# Ignore errors and set path
set +e
PATH=/conda/bin:$PATH
PATH=/opt/conda/bin:$PATH
LC_ALL=C.UTF-8
LANG=C.UTF-8

# 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 python`
Expand Down
14 changes: 8 additions & 6 deletions ci/cpu/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Copyright (c) 2018, NVIDIA CORPORATION.
# Copyright (c) 2020, NVIDIA CORPORATION.
######################################
# rmm CPU build script for CI #
######################################
Expand Down Expand Up @@ -37,8 +37,8 @@ conda activate rapids

gpuci_logger "Check versions"
python --version
gcc --version
g++ --version
$CC --version
$CXX --version

gpuci_logger "Check conda environment"
conda info
Expand All @@ -55,19 +55,21 @@ conda config --set ssl_verify False
if [[ "$BUILD_LIBRMM" == "1" ]]; then
gpuci_logger "Build conda pkg for librmm"
if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
conda build conda/recipes/librmm --python=$PYTHON
gpuci_conda_retry build conda/recipes/librmm --python=$PYTHON
else
conda build --dirty --no-remove-work-dir conda/recipes/librmm
gpuci_conda_retry build --dirty --no-remove-work-dir conda/recipes/librmm
fi
fi

if [[ "$BUILD_RMM" == "1" ]]; then
gpuci_logger "Build conda pkg for rmm"
if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
conda build conda/recipes/rmm --python=$PYTHON
gpuci_conda_retry build conda/recipes/rmm --python=$PYTHON
else
gpuci_conda_retry build --dirty --no-remove-work-dir conda/recipes/rmm
conda build --dirty --no-remove-work-dir \
-c $WORKSPACE/ci/artifacts/rmm/cpu/conda-bld/ conda/recipes/rmm

fi
fi

Expand Down
2 changes: 1 addition & 1 deletion ci/docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if [ -z "$PROJECT_WORKSPACE" ]; then
fi

export DOCS_WORKSPACE=$WORKSPACE/docs
export PATH=/conda/bin:/usr/local/cuda/bin:$PATH
export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH
export HOME=$WORKSPACE
export PROJECT_WORKSPACE=/rapids/rmm
export LIBCUDF_KERNEL_CACHE_PATH="$HOME/.jitify-cache"
Expand Down
6 changes: 3 additions & 3 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Copyright (c) 2018, NVIDIA CORPORATION.
# Copyright (c) 2020, NVIDIA CORPORATION.
######################################
# rmm GPU build & testscript for CI #
######################################
Expand Down Expand Up @@ -42,7 +42,7 @@ conda activate rapids
gpuci_conda_retry install rapids-build-env=${MINOR_VERSION}.*

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

gpuci_logger "Check versions"
Expand Down Expand Up @@ -107,7 +107,7 @@ else
cd $WORKSPACE/python

gpuci_logger "Installing librmm"
conda install -c $WORKSPACE/ci/artifacts/rmm/cpu/conda-bld/ librmm
gpuci_conda_retry install -c $WORKSPACE/ci/artifacts/rmm/cpu/conda-bld/ librmm
export LIBRMM_BUILD_DIR="$WORKSPACE/ci/artifacts/rmm/cpu/conda_work/build"

gpuci_logger "Building rmm"
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/rmm -s
$ source activate rapids # Activate gpuCI conda environment
$ . /opt/conda/etc/profile.d/conda.sh
$ conda activate rapids # Activate gpuCI conda environment
$ cd rapids
$ flake8 python
```
Expand Down

0 comments on commit 62ee3c7

Please sign in to comment.