Skip to content

Commit

Permalink
RAPIDS 24.02 Upgrade (#1468)
Browse files Browse the repository at this point in the history
Requires nv-morpheus/utilities#66

Closes #1428
Closes #1430
Closes #1433

## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/nv-morpheus/Morpheus/blob/main/docs/source/developer_guide/contributing.md).
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

Authors:
  - Christopher Harris (https://github.com/cwharris)

Approvers:
  - Michael Demoret (https://github.com/mdemoret-nv)

URL: #1468
  • Loading branch information
cwharris authored Feb 5, 2024
1 parent 16ca5df commit 4c95c1d
Show file tree
Hide file tree
Showing 76 changed files with 865 additions and 1,224 deletions.
12 changes: 11 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@
# Disable modernize-use-trailing-return-type (too many hits)
# Disable modernize-use-nodiscard (why isnt [[nodiscard]] the default?)
# Enable identifier in TODO comments
Checks: -*,readability-identifier-naming,modernize-*,-modernize-use-trailing-return-type,-modernize-use-nodiscard,google-readability-todo
Checks: >
-*,
readability-identifier-naming,
modernize-*,
-modernize-use-trailing-return-type,
-modernize-use-nodiscard,
google-readability-todo
WarningsAsErrors: >
*,
-clang-diagnostic-unused-command-line-argument
#WarningsAsErrors: '*'
HeaderFilterRegex: '.*\/include\/morpheus\/.*'
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM rapidsai/devcontainers:23.10-cpp-cuda11.8-mambaforge-ubuntu22.04 AS base
FROM rapidsai/devcontainers:23.12-cpp-cuda12.1-mambaforge-ubuntu22.04 AS base

ENV PATH="${PATH}:/workspaces/morpheus/.devcontainer/bin"
4 changes: 2 additions & 2 deletions .devcontainer/opt/morpheus/bin/post-attach-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ ENV_NAME=${ENV_NAME:-morpheus}
sed -ri "s/conda activate base/conda activate $ENV_NAME/g" ~/.bashrc;

if conda_env_find "${ENV_NAME}" ; \
then mamba env update --name ${ENV_NAME} -f ${MORPHEUS_ROOT}/conda/environments/all_cuda-118_arch-x86_64.yaml --prune; \
else mamba env create --name ${ENV_NAME} -f ${MORPHEUS_ROOT}/conda/environments/all_cuda-118_arch-x86_64.yaml; \
then mamba env update --name ${ENV_NAME} -f ${MORPHEUS_ROOT}/conda/environments/all_cuda-121_arch-x86_64.yaml --prune; \
else mamba env create --name ${ENV_NAME} -f ${MORPHEUS_ROOT}/conda/environments/all_cuda-121_arch-x86_64.yaml; \
fi
2 changes: 1 addition & 1 deletion .github/workflows/ci_pipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ on:
env:
CHANGE_TARGET: "${{ github.base_ref }}"
CUDA_PATH: "/usr/local/cuda/"
CUDA_VER: "11.8"
CUDA_VER: "12.1"
GH_TOKEN: "${{ github.token }}"
GIT_COMMIT: "${{ github.sha }}"
MORPHEUS_ROOT: "${{ github.workspace }}/morpheus"
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ jobs:
# Disable conda upload for now, once we have morpheus packages in conda forge set the value to
# !fromJSON(needs.prepare.outputs.is_pr) && (fromJSON(needs.prepare.outputs.is_main_branch) && 'main' || 'dev') || ''
conda_upload_label: ""
container: nvcr.io/ea-nvidia-morpheus/morpheus:morpheus-ci-build-230913
test_container: nvcr.io/ea-nvidia-morpheus/morpheus:morpheus-ci-test-230913
# Info about the PR. Empty for non PR branches. Useful for extracting PR number, title, etc.
container: nvcr.io/ea-nvidia-morpheus/morpheus:morpheus-ci-build-240129
test_container: nvcr.io/ea-nvidia-morpheus/morpheus:morpheus-ci-test-240129
secrets:
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ option(MORPHEUS_USE_IWYU "Enable running include-what-you-use as part of the bui

set(MORPHEUS_PY_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/wheel" CACHE STRING "Location to install the python directory")

set(MORPHEUS_RAPIDS_VERSION "23.06" CACHE STRING "Sets default versions for RAPIDS libraries.")
set(MORPHEUS_RAPIDS_VERSION "24.02" CACHE STRING "Sets default versions for RAPIDS libraries.")
set(MORPHEUS_CACHE_DIR "${CMAKE_SOURCE_DIR}/.cache" CACHE PATH "Directory to contain all CPM and CCache data")
mark_as_advanced(MORPHEUS_CACHE_DIR)

Expand Down
7 changes: 2 additions & 5 deletions ci/conda/recipes/morpheus/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@ cuda_compiler:
- cuda-nvcc

cuda_compiler_version:
- 11.8
- 12.1

python:
- 3.10

boost:
- 1.82

rapids_version:
- 23.06
- 24.02
85 changes: 43 additions & 42 deletions ci/conda/recipes/morpheus/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,81 +46,82 @@ outputs:
requirements:
build:
- {{ compiler("c") }}
- {{ compiler("cxx") }}
- {{ compiler("cuda") }}
- automake 1.16.5 # Needed for DOCA build
- {{ compiler("cxx") }}
- automake =1.16.5 # Needed for DOCA build
- ccache
- cmake 3.25
- cuda-cudart-dev {{ cuda_compiler_version }} # Needed by CMake to compile a test application
- cmake =3.27
- cuda-cudart-dev {{ cuda_compiler_version }}.* # Needed by CMake to compile a test application
- cuda-version {{ cuda_compiler_version }}.*
- libtool # Needed for DOCA build
- ninja
- pkg-config # for mrc cmake
- ninja =1.11
- pkg-config =0.29 # for mrc cmake
- sysroot_linux-64 =2.17
host:
- cuda-toolkit {{ cuda_compiler_version }}
- cuda-cudart-dev {{ cuda_compiler_version }}.*
- cuda-libraries-dev {{ cuda_compiler_version }}.* # required by matx for libcublas-dev
- cuda-nvml-dev {{ cuda_compiler_version }}.*
- cuda-nvrtc-dev {{ cuda_compiler_version }}.*
- cuda-nvtx-dev {{ cuda_compiler_version }}.*
- cuda-version {{ cuda_compiler_version }}.*
- cudf {{ rapids_version }}
- cython >=0.29,<0.30
- cython =3.0
- libcudf {{ rapids_version }}
- librdkafka 1.9.2
- librdkafka >=1.9.2,<1.10.0a0
- mrc {{ minor_version }}
- pip
- pyarrow * *_cuda # Ensure we get a CUDA build. Version determined by cuDF
- pyarrow-hotfix # CVE-2023-47248
- pybind11-stubgen 0.10.5
- pybind11-stubgen =0.10.5
- python {{ python }}
- rapidjson 1.1
- rdma-core >=48 # Needed for DOCA. Compatible with UCX 1.14.1
- scikit-build 0.17.1
- rapidjson =1.1.0
- rdma-core >=48 # Needed for DOCA.
- scikit-build =0.17.6
- versioneer-518
- zlib # required to build triton client
run:
# Runtime only requirements. This + setup.py is the definitive runtime requirement list
- {{ pin_compatible('cuda-cudart', min_pin='x.x', max_pin='x') }}
- click >=8
- configargparse 1.5.*
- configargparse =1.5.*
- cuda-version {{ cuda_compiler_version }}.*
- cudf
- cudf_kafka {{ rapids_version }}.*
- cupy # Version determined from cudf
- datacompy 0.8.*
- datacompy =0.10.*
- dill
- distributed
- docker-py 5.0.*
- docker-py =5.0.*
- grpcio # Version determined from cudf
- libmrc
- libwebp>=1.3.2 # Required for CVE mitigation: https://nvd.nist.gov/vuln/detail/CVE-2023-4863
- mlflow>=2.2.1,<3
- mrc
- networkx>=2.8
- numpydoc 1.4.*
- nvtabular {{ rapids_version }}.*
- pandas 1.3.*
- pluggy 1.0.*
- numpydoc =1.5.*
- nvtabular =23.08.00
- pandas
- pluggy =1.3.*
- pyarrow * *_cuda # Ensure we get a CUDA build. Version determined by cuDF
- pyarrow-hotfix # CVE-2023-47248
- python
- python-confluent-kafka 1.9.2
- pytorch 2.0.1
- python-confluent-kafka >=1.9.2,<1.10.0a0
- pytorch
- pytorch-cuda
- requests=2.31
- requests-cache=1.1
- scikit-learn 1.2.2.*
- requests
- requests-cache =1.1
- scikit-learn =1.3.2.*
- sqlalchemy <2.0 # 2.0 is incompatible with pandas=1.3
- tqdm 4.*
- tritonclient 2.26.*
- typing_utils 0.1.*
- watchdog 2.1.*
- tqdm =4.*
- tritonclient =2.34.*
- typing_utils =0.1.*
- watchdog =3.0.*
- websockets
run_constrained:
# Since we dont explicitly require this but other packages might, constrain the versions.
- {{ pin_compatible('cudatoolkit', min_pin='x.x', max_pin='x') }}
test:
requires:
- pynvml
- pytest
- pytest-cov
- pytest-benchmark
# test that cuml can be installed in the env
- cuml {{ rapids_version }}.*
- pynvml
- pytest-asyncio
- pytest-benchmark
- pytest-cov
- pytest =7.4.4
source_files:
- docker/conda/environments/*
- pyproject.toml
- scripts/fetch_data.py
- tests/*
Expand Down
8 changes: 5 additions & 3 deletions ci/conda/recipes/run_conda_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,15 @@ if [[ "${CONDA_COMMAND}" == "mambabuild" || "${CONDA_COMMAND}" == "build" ]]; th
CONDA_ARGS_ARRAY+=("--build-id-pat" "{n}-{v}")
fi

# And default channels (with optional channel alias)
# And default channels (should match dependencies.yaml) with optional channel alias
CONDA_ARGS_ARRAY+=("-c" "${CONDA_CHANNEL_ALIAS:+"${CONDA_CHANNEL_ALIAS%/}/"}conda-forge")
CONDA_ARGS_ARRAY+=("-c" "${CONDA_CHANNEL_ALIAS:+"${CONDA_CHANNEL_ALIAS%/}/"}huggingface")
CONDA_ARGS_ARRAY+=("-c" "${CONDA_CHANNEL_ALIAS:+"${CONDA_CHANNEL_ALIAS%/}/"}rapidsai")
CONDA_ARGS_ARRAY+=("-c" "${CONDA_CHANNEL_ALIAS:+"${CONDA_CHANNEL_ALIAS%/}/"}nvidia/label/cuda-11.8.0")
CONDA_ARGS_ARRAY+=("-c" "${CONDA_CHANNEL_ALIAS:+"${CONDA_CHANNEL_ALIAS%/}/"}rapidsai-nightly")
CONDA_ARGS_ARRAY+=("-c" "${CONDA_CHANNEL_ALIAS:+"${CONDA_CHANNEL_ALIAS%/}/"}nvidia")
CONDA_ARGS_ARRAY+=("-c" "${CONDA_CHANNEL_ALIAS:+"${CONDA_CHANNEL_ALIAS%/}/"}nvidia/label/dev")
CONDA_ARGS_ARRAY+=("-c" "${CONDA_CHANNEL_ALIAS:+"${CONDA_CHANNEL_ALIAS%/}/"}pytorch")
CONDA_ARGS_ARRAY+=("-c" "${CONDA_CHANNEL_ALIAS:+"${CONDA_CHANNEL_ALIAS%/}/"}conda-forge")
CONDA_ARGS_ARRAY+=("-c" "${CONDA_CHANNEL_ALIAS:+"${CONDA_CHANNEL_ALIAS%/}/"}defaults")

if hasArg morpheus; then
# Set GIT_VERSION to set the project version inside of meta.yaml
Expand Down
49 changes: 34 additions & 15 deletions ci/runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@
# limitations under the License.

# Args used in FROM commands must come first
ARG FROM_IMAGE="rapidsai/ci"
ARG CUDA_PKG_VER=11-8
ARG CUDA_SHORT_VER=11.8
ARG CUDA_VER=11.8.0
ARG FROM_IMAGE="rapidsai/ci-conda"
ARG CUDA_PKG_VER=12-0
ARG CUDA_SHORT_VER=12.1
ARG CUDA_VER=12.1.1
ARG LINUX_DISTRO=ubuntu
ARG LINUX_VER=20.04
ARG LINUX_VER=22.04
ARG PROJ_NAME=morpheus
ARG PYTHON_VER=3.10
ARG ARCH=x86_64

# Configure the base docker img
FROM ${FROM_IMAGE}:cuda${CUDA_VER}-${LINUX_DISTRO}${LINUX_VER}-py${PYTHON_VER} AS base
Expand All @@ -34,27 +35,36 @@ ARG CUDA_SHORT_VER
SHELL ["/bin/bash", "-c"]

# Create conda environment
COPY ./docker/conda/environments/* /tmp/conda/

RUN CONDA_ALWAYS_YES=true /opt/conda/bin/mamba env create -n ${PROJ_NAME} -q --file /tmp/conda/cuda${CUDA_SHORT_VER}_dev.yml && \
/opt/conda/bin/mamba install -n morpheus -c conda-forge "conda-merge>=0.2" && \
sed -i "s/conda activate base/conda activate ${PROJ_NAME}/g" ~/.bashrc && \
conda clean -afy && \
rm -rf /tmp/conda
COPY ./dependencies.yaml /tmp/conda/


# ============ build ==================
FROM base as build

# Add any build only dependencies here.
# Add any build only dependencies here.ARG ARCH
ARG CUDA_SHORT_VER
ARG PROJ_NAME
ARG PYTHON_VER

RUN rapids-dependency-file-generator \
--config /tmp/conda/dependencies.yaml \
--output conda \
--file_key build \
--matrix "cuda=${CUDA_SHORT_VER};arch=${ARCH};py=${PYTHON_VER}" > /tmp/conda/env.yaml && \
CONDA_ALWAYS_YES=true /opt/conda/bin/conda env create -n ${PROJ_NAME} -q --file /tmp/conda/env.yaml && \
sed -i "s/conda activate base/conda activate ${PROJ_NAME}/g" ~/.bashrc && \
conda clean -afy && \
rm -rf /tmp/conda

# ============ test ==================
FROM base as test

# Add any test only dependencies here.

ARG PROJ_NAME
ARG ARCH
ARG CUDA_SHORT_VER
ARG PROJ_NAME
ARG PYTHON_VER

RUN apt update && \
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \
Expand All @@ -63,7 +73,16 @@ RUN apt update && \
apt clean && \
rm -rf /var/lib/apt/lists/*

COPY ./docker/conda/environments/cuda${CUDA_SHORT_VER}_examples.yml /tmp/conda/cuda${CUDA_SHORT_VER}_examples.yml
RUN rapids-dependency-file-generator \
--config /tmp/conda/dependencies.yaml \
--output conda \
--file_key test \
--matrix "cuda=${CUDA_SHORT_VER};arch=${ARCH};py=${PYTHON_VER}" > /tmp/conda/env.yaml && \
CONDA_ALWAYS_YES=true /opt/conda/bin/conda env create -n ${PROJ_NAME} -q --file /tmp/conda/env.yaml && \
sed -i "s/conda activate base/conda activate ${PROJ_NAME}/g" ~/.bashrc && \
conda clean -afy && \
rm -rf /tmp/conda

COPY ./ci/scripts/download_kafka.py /tmp/scripts/download_kafka.py

# Install camouflage needed for unittests to mock a triton server
Expand Down
3 changes: 2 additions & 1 deletion ci/scripts/github/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ function update_conda_env() {


# Update the packages
rapids-mamba-retry env update -n morpheus --prune -q --file "$1"
# use conda instead of mamba due to bug: https://github.com/mamba-org/mamba/issues/3059
rapids-conda-retry env update -n morpheus --prune -q --file "$1" --solver=libmamba
fi

# Finally, reactivate
Expand Down
4 changes: 2 additions & 2 deletions ci/scripts/run_ci_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ GIT_BRANCH=$(git branch --show-current)
GIT_COMMIT=$(git log -n 1 --pretty=format:%H)

LOCAL_CI_TMP=${LOCAL_CI_TMP:-${MORPHEUS_ROOT}/.tmp/local_ci_tmp}
CONTAINER_VER=${CONTAINER_VER:-230913}
CUDA_VER=${CUDA_VER:-11.8}
CONTAINER_VER=${CONTAINER_VER:-240129}
CUDA_VER=${CUDA_VER:-12.1}
DOCKER_EXTRA_ARGS=${DOCKER_EXTRA_ARGS:-""}

BUILD_CONTAINER="nvcr.io/ea-nvidia-morpheus/morpheus:morpheus-ci-build-${CONTAINER_VER}"
Expand Down
6 changes: 1 addition & 5 deletions ci/scripts/run_clang_tidy_for_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@

# set -x

# Call clang-tidy adding warnings-as-errors option. Currently this is not
# possible with clang-tidy-diff.py until this is merged:
# https://reviews.llvm.org/D49864

# Also add -fno-caret-diagnostics to prevent clangs own compiler warnings from
# coming through:
# https://github.com/llvm/llvm-project/blob/3f3faa36ff3d84af3c3ed84772d7e4278bc44ff1/libc/cmake/modules/LLVMLibCObjectRules.cmake#L226
${CLANG_TIDY:-clang-tidy} --warnings-as-errors='*' --extra-arg=-fno-caret-diagnostics "$@"
${CLANG_TIDY:-clang-tidy} --extra-arg=-fno-caret-diagnostics "$@"
9 changes: 7 additions & 2 deletions cmake/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ rapids_find_package(CUDAToolkit REQUIRED
INSTALL_EXPORT_SET ${PROJECT_NAME}-core-exports
)

rapids_find_package(ZLIB
BUILD_EXPORT_SET ${PROJECT_NAME}-core-exports
INSTALL_EXPORT_SET ${PROJECT_NAME}-core-exports
)

if(MORPHEUS_BUILD_BENCHMARKS)
# google benchmark
# - Expects package to pre-exist in the build environment
Expand Down Expand Up @@ -62,9 +67,9 @@ if(MORPHEUS_BUILD_TESTS)
)
endif()

# libcudacxx -- get an explicit lubcudacxx build, matx tries to pull a tag that doesn't exist.
# cccl -- get an explicit cccl build, matx tries to pull a tag that doesn't exist.
# =========
morpheus_utils_configure_libcudacxx()
morpheus_utils_configure_cccl()

# matx
# ====
Expand Down
Loading

0 comments on commit 4c95c1d

Please sign in to comment.