diff --git a/README.md b/README.md index ae1d942d..4bc8e14e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,17 @@ -# integration +#
Integration
+
RAPIDS - combined conda package & integration tests for all of RAPIDS libraries
-The conda recipe in the `conda` folder provides the RAPIDS meta-package, which
-when installed will provide the latest RAPIDS libraries for the given version.
+## RAPIDS Meta-packages
+
+The conda recipe in the `conda` folder provides the RAPIDS meta-packages, which
+when installed will provide the latest RAPIDS libraries for the given version or
+setup `build`, `doc`, or `notebook` environments for RAPIDS.
+
+See the [README](conda/recipes/README.md) for more information about the
+meta-packages and how to update versions.
+
+## RAPIDS Integration Tests
Test scripts in the `test` folder verify proper interaction across multiple
RAPIDS APIs. Tests are separated into individual subfolders based on the usage
diff --git a/ci/axis/nightly.yaml b/ci/axis/nightly.yaml
new file mode 100644
index 00000000..9fe656a1
--- /dev/null
+++ b/ci/axis/nightly.yaml
@@ -0,0 +1,21 @@
+CONDA_USERNAME:
+ - rapidsai-nightly
+
+CONDA_CONFIG_FILE:
+ - conda/recipes/nightly-versions.yaml
+
+RAPIDS_VER:
+ - 0.15.0
+
+# Use CUDA_VER to not clobber `CUDA_VERSION` in the container
+CUDA_VER:
+ - 10.2
+ - 10.1
+ - 10.0
+
+DEFAULT_CUDA_VER:
+ - 10.0
+
+PYTHON_VER:
+ - 3.6
+ - 3.7
diff --git a/ci/axis/release.yaml b/ci/axis/release.yaml
new file mode 100644
index 00000000..efaf40fd
--- /dev/null
+++ b/ci/axis/release.yaml
@@ -0,0 +1,21 @@
+CONDA_USERNAME:
+ - rapidsai
+
+CONDA_CONFIG_FILE:
+ - conda/recipes/release-versions.yaml
+
+RAPIDS_VER:
+ - 0.14.0
+
+# Use CUDA_VER to not clobber `CUDA_VERSION` in the container
+CUDA_VER:
+ - 10.2
+ - 10.1
+ - 10.0
+
+DEFAULT_CUDA_VER:
+ - 10.0
+
+PYTHON_VER:
+ - 3.6
+ - 3.7
diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh
new file mode 100644
index 00000000..a78c702a
--- /dev/null
+++ b/ci/cpu/build.sh
@@ -0,0 +1,94 @@
+#!/bin/bash
+# Copyright (c) 2020, NVIDIA CORPORATION.
+###############################################################
+# rapids/rapids-xgboost meta pkg conda build script for gpuCI #
+# #
+# config set in `ci/axis/*.yml` #
+###############################################################
+set -e
+
+# Set paths
+export PATH=/conda/bin:$PATH
+export HOME=$WORKSPACE
+
+# Save original build offset
+export ORIG_OFFSET=$RAPIDS_OFFSET
+
+# Set recipe paths
+CONDA_XGBOOST_RECIPE="conda/recipes/rapids-xgboost"
+CONDA_RAPIDS_RECIPE="conda/recipes/rapids"
+CONDA_RAPIDS_BUILD_RECIPE="conda/recipes/rapids-build-env"
+CONDA_RAPIDS_NOTEBOOK_RECIPE="conda/recipes/rapids-notebook-env"
+CONDA_RAPIDS_DOC_RECIPE="conda/recipes/rapids-doc-env"
+
+# Activate conda env
+source activate gdf
+
+# Print current env vars
+env
+
+# Install gpuCI tools
+curl -s https://raw.githubusercontent.com/rapidsai/gpuci-tools/master/install.sh | bash
+source ~/.bashrc
+cd ~
+
+# Print diagnostic information
+gpuci_logger "Print conda info..."
+conda info
+conda config --show-sources
+conda list --show-channel-urls
+
+function build_pkg {
+ # Build pkg
+ gpuci_logger "Start conda build for '${1}'..."
+ conda build --override-channels -c ${CONDA_USERNAME:-rapidsai-nightly} -c nvidia -c conda-forge -c defaults \
+ --python=${PYTHON_VER} -m ${CONDA_CONFIG_FILE} ${1}
+}
+
+function build_default_pkg {
+ # Build default version if current version matches DEFAULT_CUDA_VER
+ if [ "$CUDA_VER" == "$DEFAULT_CUDA_VER" ] ; then
+ gpuci_logger "Current CUDA_VER '$CUDA_VER' is the DEFAULT_CUDA_VER, building package again with incremented build number..."
+ gpuci_logger "Previous build number '$RAPIDS_OFFSET'"
+ export RAPIDS_OFFSET=$((RAPIDS_OFFSET+1))
+ gpuci_logger "New build number '$RAPIDS_OFFSET'"
+ build_pkg $1
+ # Reset offset
+ export RAPIDS_OFFSET=$ORIG_OFFSET
+ gpuci_logger "Reset build number after default build '$RAPIDS_OFFSET'"
+ else
+ gpuci_logger "Current CUDA_VER '$CUDA_VER' is not DEFAULT_CUDA_VER, skipping default build..."
+ fi
+}
+
+function run_builds {
+ # Kick off main pkg b
+ build_pkg $1
+ # Check and build default pkgs
+ build_default_pkg $1
+}
+
+function upload_builds {
+ # Check for upload key
+ if [ -z "$MY_UPLOAD_KEY" ]; then
+ gpuci_logger "No upload key found, env var MY_UPLOAD_KEY not set, skipping upload..."
+ else
+ gpuci_logger "Upload key found, starting upload..."
+ gpuci_logger "Files to upload..."
+ ls /conda/conda-bld/linux-64/rapids*.tar.bz2
+
+ gpuci_logger "Starting upload..."
+ ls /conda/conda-bld/linux-64/rapids*.tar.bz2 | xargs gpuci_retry \
+ anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai-nightly} --label main --skip-existing
+ fi
+}
+
+# Run builds
+run_builds $CONDA_XGBOOST_RECIPE
+run_builds $CONDA_RAPIDS_RECIPE
+run_builds $CONDA_RAPIDS_BUILD_RECIPE
+run_builds $CONDA_RAPIDS_NOTEBOOK_RECIPE
+run_builds $CONDA_RAPIDS_DOC_RECIPE
+
+# Upload builds
+upload_builds
diff --git a/conda/recipes/README.md b/conda/recipes/README.md
new file mode 100644
index 00000000..caee8210
--- /dev/null
+++ b/conda/recipes/README.md
@@ -0,0 +1,135 @@
+#
Meta-packages
+
+## Overview
+
+These packages provide one-line installs for RAPIDS as well as environment
+setups for RAPIDS users and the RAPIDS [containers](https://github.com/rapidsai/build).
+
+## Meta-packages
+
+### Package Availability
+
+These meta-packages are available in two channels:
+
+Channel Name | Purpose
+--- | ---
+`rapidsai` | Release versions of the packages; tied to a stable release of RAPIDS
+`rapidsai-nightly` | Nightly versions of the packages; allows for install of WIP nightly versions of RAPIDS
+
+### Install Packages
+
+The install meta-packages are for RAPIDS installation and version pinning of core
+libraries to a RAPIDS release:
+
+Package Name | Purpose
+--- | ---
+`rapids` | Provide a one package install for all RAPIDS libraries, version matched to a RAPIDS release
+`rapids-xgboost` | Defines the version of `xgboost` used for a RAPIDS release
+
+### Environment Packages
+
+The environment meta-packages are used for setting up `build`, `doc`, and
+`notebook` environments for users and in our RAPIDS [containers](https://github.com/rapidsai/build).
+
+Package Name | Purpose
+--- | ---
+`rapids-build-env` | Installs all `conda` build dependencies to build & test RAPIDS libraries from source
+`rapids-doc-env` | Installs all tools needed to build RAPIDS documentation
+`rapids-notebook-env` | Installs a Jupyter Notebook server and other dependencies to run RAPIDS example notebooks; used in the `runtime` [stable](https://hub.docker.com/r/rapidsai/rapidsai/tags?page=1&name=runtime) and [nightly](https://hub.docker.com/r/rapidsai/rapidsai-nightly/tags?page=1&name=runtime) RAPIDS containers.
+
+## Managing Versions
+
+Packages without version restrictions do not need to use the following process
+and can be simply added as a `conda` package name to the recipe. For all other
+packages, follow this process to add/update versions used across all
+meta-packages:
+
+1. Examine the `meta.yaml` recipe to be modified
+2. Check if there is a pre-existing version definition like
+```
+cupy {{ cupy_version }}
+```
+3. If so, skip to the section [Updating Versions](#updating-versions)
+4. If not, continue with the section [Adding Versions](#adding-versions)
+
+### Adding Versions
+
+For new packages or those that do not have defined versions they need to be
+added.
+
+#### Modifying Recipes
+
+To add a package with versioning to the recipe we need the `PACKAGE_NAME` and
+the `VERSIONING_NAME` added to the file.
+
+- `PACKAGE_NAME` - is the conda package name
+- `VERSIONING_NAME` - is the conda package name with `-` replaced with `_` and a suffix of `_version` added
+ - For example
+ - `cupy` would become `cupy_version`
+ - `scikit-learn` would become `scikit_learn_version`
+
+Once the `PACKAGE_NAME` and `VERSIONING_NAME` are ready, we can add them to
+the `meta.yml` as follows:
+
+```
+PACKAGE_NAME {{ VERSIONING_NAME }}
+```
+
+- **NOTE:** The `VERSIONING_NAME` must be surrounded by the `{{ }}` for the substitution to work.
+
+Using our examples of `cupy` and `scikit-learn` we would have these entries in
+the `meta.yaml`:
+
+```
+cupy {{ cupy_version }}
+```
+```
+scikit-learn {{ scikit_learn_version }}
+```
+
+#### Modifying Versions Files
+
+There are two versions files that are in `conda/recipes`:
+ - `release-versions.yaml` - These are versions used by the `ci/axis/release.yaml` for RELEASE builds
+ - `nightly-versions.yaml` - These are versions used by the `ci/axis/nightly.yaml` for NIGHTLY builds
+
+Both of these files will need a config added to specify the version for the
+newly created `VERSIONING_NAME`.
+
+For each `VERSIONING_NAME` we need a `VERSION_SPEC`. This can be any of the
+standard `conda` version specifiers:
+```
+>=1.8.0
+>=0.48,<0.49
+>=7.0,<8.0.0a0,!=7.1.0
+=2.5.*
+```
+
+Combined together each of the versions files would add the following for each
+`VERSIONING_NAME`:
+```
+VERSIONING_NAME:
+ - 'VERSION_SPEC'
+```
+
+Using our examples of `cupy` and `scikit-learn` we would have these entries in
+the `meta.yaml`:
+
+```
+cupy_version:
+ - '>=7,<8.0.0a0,!=7.1.0'
+```
+```
+scikit_learn_version:
+ - '=0.21.3'
+```
+
+### Updating Versions
+
+There are two versions files that are in `conda/recipes`:
+ - `release-versions.yaml` - These are versions used by the `ci/axis/release.yaml` for RELEASE builds
+ - `nightly-versions.yaml` - These are versions used by the `ci/axis/nightly.yaml` for NIGHTLY builds
+
+ Edit the files above and update the `VERSION_SPEC` as desired.
+
+ For more information see the [Modifying Versions Files](#modifying-versions-files)
diff --git a/conda/recipes/nightly-versions.yaml b/conda/recipes/nightly-versions.yaml
new file mode 100644
index 00000000..3ad65a42
--- /dev/null
+++ b/conda/recipes/nightly-versions.yaml
@@ -0,0 +1,85 @@
+###
+# This file is used by `/ci/cpu/build.sh` for NIGHTLY builds
+###
+
+# Versions for `rapids` meta-pkg
+dask_xgboost_version:
+ - '=0.2.0.dev28'
+
+# Versions for `rapids-xgboost` meta-pkg
+xgboost_version:
+ - '=1.1.0dev.rapidsai0.14'
+
+# Versions for conda
+conda_version:
+ - '=4.7.12'
+conda_build_version:
+ - '=3.18.11'
+conda_verify_version:
+ - '=3.1.1'
+
+# Versions for `libgcc-ng`, `libgfortran-ng`, `libstdcxx-ng` stack
+build_stack_version:
+ - '=7.3.0'
+
+# Shared versions across meta-pkgs
+arrow_version:
+ - '=0.15.0'
+blas_version:
+ - '=2.14=openblas'
+bokeh_version:
+ - '=1.*'
+boost_cpp_version:
+ - '=1.70.0'
+clang_version:
+ - '=8.0.1'
+cmake_version:
+ - '=3.14.5'
+cmake_setuptools_version:
+ - '>=0.1.3'
+cupy_version:
+ - '>=7,<8.0.0a0,!=7.1.0'
+cython_version:
+ - '>=0.29,<0.30'
+dask_version:
+ - '>=2.15.0'
+distributed_version:
+ - '>=2.15.0'
+dlpack_version:
+ - '=0.2'
+double_conversion_version:
+ - '=3.1.5'
+fastavro_version:
+ - '>=0.22.0'
+flatbuffers_version:
+ - '=1.10.0'
+fsspec_version:
+ - '>=0.6.0'
+gdal_version:
+ - '>=3.0.2'
+ipython_version:
+ - '=7.3.*'
+jupyterlab_version:
+ - '=1.2.*'
+librdkafka_version:
+ - '=1.2.2'
+nccl_version:
+ - '=2.5.*'
+networkx_version:
+ - '>=2.3'
+numba_version:
+ - '>=0.49'
+numpy_version:
+ - '>=1.17.3'
+pandas_version:
+ - '>=0.25,<0.26'
+pandoc_version:
+ - '<=2.0.0'
+protobuf_version:
+ - '>=3.4.1,<4.0.0'
+rapidjson_version:
+ - '=1.1.0'
+scikit_learn_version:
+ - '=0.23.0'
+scipy_version:
+ - '=1.3.0'
diff --git a/conda/recipes/rapids-build-env/meta.yaml b/conda/recipes/rapids-build-env/meta.yaml
new file mode 100644
index 00000000..8b5d35d9
--- /dev/null
+++ b/conda/recipes/rapids-build-env/meta.yaml
@@ -0,0 +1,114 @@
+# Copyright (c) 2020, NVIDIA CORPORATION.
+
+{% set version = environ.get('RAPIDS_VER', '0.0.0.dev') %}
+{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %}
+{% set build_offset = environ.get('RAPIDS_OFFSET', 0) %}
+{% set cuda_version = '.'.join(environ.get('CUDA_VERSION', '10.0').split('.')[:2]) %}
+{% set py_version = environ.get('CONDA_PY', 36) %}
+
+###
+# Versions referenced below are set in `conda/recipe/*versions.yaml` except for
+# those set above (e.g. `cuda_version`)
+#
+# gpuCI loads the correct file based on the build type (NIGHTLY or RELEASE) in
+# `ci/cpu/build.sh` and `ci/axis/*.yaml`
+#
+# Manual builds need to use the `conda build` flag of `-m