From 76c7ffcbdd366baa604db5992862716b421d3631 Mon Sep 17 00:00:00 2001 From: Jordan Jacobelli Date: Mon, 23 May 2022 16:13:42 +0200 Subject: [PATCH] Build packages using mambabuild (#4542) Using mamba should speed up CI Authors: - Jordan Jacobelli (https://github.com/Ethyling) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) URL: https://github.com/rapidsai/cuml/pull/4542 --- ci/checks/style.sh | 4 ++-- ci/cpu/build.sh | 11 +++++++---- ci/gpu/build.sh | 5 ++++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ci/checks/style.sh b/ci/checks/style.sh index 8c92aeee91..e7b246cd63 100644 --- a/ci/checks/style.sh +++ b/ci/checks/style.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2019-2021, NVIDIA CORPORATION. +# Copyright (c) 2019-2022, NVIDIA CORPORATION. ##################### # cuML Style Tester # ##################### @@ -16,7 +16,7 @@ cd "$WORKSPACE" export GIT_DESCRIBE_TAG=`git describe --tags` export MINOR_VERSION=`echo $GIT_DESCRIBE_TAG | grep -o -E '([0-9]+\.[0-9]+)'` export UCX_PY_VERSION='0.26.*' -conda install "ucx-py=${UCX_PY_VERSION}" "ucx-proc=*=gpu" +mamba install "ucx-py=${UCX_PY_VERSION}" "ucx-proc=*=gpu" # Run flake8 and get results/return code FLAKE=`flake8 --config=python/setup.cfg` diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index b1d7e79a06..28501aba97 100755 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -77,18 +77,21 @@ else CONDA_LOCAL_CHANNEL="ci/artifacts/cuml/cpu/.conda-bld/" fi +# FIXME: Remove +gpuci_mamba_retry install -c conda-forge boa + ################################################################################ # BUILD - Conda package builds (conda deps: libcuml <- cuml) ################################################################################ if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then if [ "$BUILD_LIBCUML" == '1' -o "$BUILD_CUML" == '1' ]; then gpuci_logger "Build conda pkg for libcuml" - gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcuml + gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcuml fi else if [ "$BUILD_LIBCUML" == '1' ]; then gpuci_logger "PROJECT FLASH: Build conda pkg for libcuml" - gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcuml --dirty --no-remove-work-dir + gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcuml --dirty --no-remove-work-dir mkdir -p ${CONDA_BLD_DIR}/libcuml mv ${CONDA_BLD_DIR}/work/ ${CONDA_BLD_DIR}/libcuml/work fi @@ -99,10 +102,10 @@ sccache --show-stats if [ "$BUILD_CUML" == '1' ]; then if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then gpuci_logger "Build conda pkg for cuml" - gpuci_conda_retry build --croot ${CONDA_BLD_DIR} conda/recipes/cuml --python=${PYTHON} + gpuci_conda_retry mambabuild --croot ${CONDA_BLD_DIR} conda/recipes/cuml --python=${PYTHON} else gpuci_logger "PROJECT FLASH: Build conda pkg for cuml" - gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/cuml -c ${CONDA_LOCAL_CHANNEL} --dirty --no-remove-work-dir --python=${PYTHON} + gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/cuml -c ${CONDA_LOCAL_CHANNEL} --dirty --no-remove-work-dir --python=${PYTHON} mkdir -p ${CONDA_BLD_DIR}/cuml mv ${CONDA_BLD_DIR}/work/ ${CONDA_BLD_DIR}/cuml/work fi diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index e1cbe8ec68..aca1eb7ec3 100755 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -182,10 +182,13 @@ else echo "Ran gtest $test_name : return code was: $?, test script exit code is now: $EXITCODE" done + # TODO: Move boa install to gpuci/rapidsai + gpuci_mamba_retry install boa + gpuci_logger "Building and installing cuml" export CONDA_BLD_DIR="$WORKSPACE/.conda-bld" export VERSION_SUFFIX="" - gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/cuml -c ${CONDA_ARTIFACT_PATH} --python=${PYTHON} + gpuci_conda_retry mambabuild --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/cuml -c ${CONDA_ARTIFACT_PATH} --python=${PYTHON} gpuci_mamba_retry install -c ${CONDA_ARTIFACT_PATH} -c ${CONDA_BLD_DIR} cuml gpuci_logger "Install the main version of dask, distributed, and dask-glm"