Skip to content

Commit

Permalink
Merge branch 'branch-24.10' into david-http-source-cm-1811
Browse files Browse the repository at this point in the history
  • Loading branch information
dagardner-nv authored Oct 10, 2024
2 parents f3533eb + 1452aaf commit 4eaf78a
Show file tree
Hide file tree
Showing 165 changed files with 3,208 additions and 823 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/cuda12.1-conda/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"args": {
"CUDA": "12.1",
"PYTHON_PACKAGE_MANAGER": "conda",
"BASE": "rapidsai/devcontainers:24.06-cpp-mambaforge-ubuntu22.04"
"BASE": "rapidsai/devcontainers:24.10-cpp-mambaforge-ubuntu22.04"
}
},
"privileged": true,
Expand Down
48 changes: 5 additions & 43 deletions .github/workflows/ci_pipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@ on:
run_check:
required: true
type: boolean
conda_core_run_build:
description: 'Runs the stage to build the morpheus-core conda package'
required: true
type: boolean
conda_upload_label:
description: 'The label to use when uploading the morpheus conda packages. Leave empty to disable uploading'
required: true
type: string
conda_run_build:
description: 'Runs the conda-build stage to build the conda package with all morpheus components'
description: 'Runs the conda-build stage to build the morpheus conda packages'
required: true
type: boolean
container:
Expand Down Expand Up @@ -204,9 +200,9 @@ jobs:
shell: bash
run: ./morpheus/ci/scripts/github/docs.sh

package-core:
name: Package Core
if: ${{ inputs.conda_core_run_build }}
package:
name: Conda Package
if: ${{ inputs.conda_run_build }}
needs: [documentation, test]
runs-on: linux-amd64-cpu16
timeout-minutes: 60
Expand Down Expand Up @@ -240,38 +236,4 @@ jobs:
CONDA_TOKEN: "${{ secrets.CONDA_TOKEN }}"
SCRIPT_ARGS: "${{ inputs.conda_upload_label != '' && 'upload' || '' }}"
CONDA_PKG_LABEL: "${{ inputs.conda_upload_label }}"
run: ./morpheus/ci/scripts/github/conda_core.sh $SCRIPT_ARGS

package:
name: Package All
if: ${{ inputs.conda_run_build }}
needs: [check, documentation, test]
runs-on: linux-amd64-cpu16
timeout-minutes: 60
container:
credentials:
username: '$oauthtoken'
password: ${{ secrets.NGC_API_KEY }}
image: ${{ inputs.container }}
strategy:
fail-fast: true

steps:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: false
path: 'morpheus'
fetch-depth: 0
submodules: 'recursive'

- name: Get AWS credentials using OIDC
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
role-duration-seconds: 43200 # 12h

- name: conda
shell: bash
run: ./morpheus/ci/scripts/github/conda.sh
run: ./morpheus/ci/scripts/github/conda_libs.sh $SCRIPT_ARGS
16 changes: 6 additions & 10 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ jobs:
is_main_branch: ${{ github.ref_name == 'main' }}
is_dev_branch: ${{ startsWith(github.ref_name, 'branch-') }}
has_conda_build_label: ${{ steps.get-pr-info.outcome == 'success' && contains(fromJSON(steps.get-pr-info.outputs.pr-info).labels.*.name, 'conda-build') || false }}
has_conda_core_build_label: ${{ steps.get-pr-info.outcome == 'success' && contains(fromJSON(steps.get-pr-info.outputs.pr-info).labels.*.name, 'conda-core-build') || false }}
has_skip_ci_label: ${{ steps.get-pr-info.outcome == 'success' && contains(fromJSON(steps.get-pr-info.outputs.pr-info).labels.*.name, 'skip-ci') || false }}
pr_info: ${{ steps.get-pr-info.outcome == 'success' && steps.get-pr-info.outputs.pr-info || '' }}

Expand All @@ -90,16 +89,13 @@ jobs:
with:
# Run checks for any PR branch
run_check: ${{ fromJSON(needs.prepare.outputs.is_pr) }}
# Build morpheus-core conda package. This is done for main/dev branches and
# for PRs with the conda-core-build label
conda_core_run_build: ${{ !fromJSON(needs.prepare.outputs.is_pr) || fromJSON(needs.prepare.outputs.has_conda_core_build_label) }}
# Upload morpheus-core conda package only for non PR branches. Use 'main' for main branch and 'dev' for all other branches
conda_upload_label: ${{ !fromJSON(needs.prepare.outputs.is_pr) && (fromJSON(needs.prepare.outputs.is_main_branch) && 'main' || 'dev') || '' }}
# Run morpheus conda package, with all components. This is done for main/dev
# branches and for PRs with the conda-build label.
# Build conda packages for all the morpheus libraries - core, dfp, llm. This is
# done for main/dev branches and for PRs with the conda-build label
conda_run_build: ${{ !fromJSON(needs.prepare.outputs.is_pr) || fromJSON(needs.prepare.outputs.has_conda_build_label) }}
container: nvcr.io/ea-nvidia-morpheus/morpheus:morpheus-ci-build-240614
test_container: nvcr.io/ea-nvidia-morpheus/morpheus:morpheus-ci-test-240614
# Upload morpheus conda packages only for non PR branches. Use 'main' for main branch and 'dev' for all other branches
conda_upload_label: ${{ !fromJSON(needs.prepare.outputs.is_pr) && (fromJSON(needs.prepare.outputs.is_main_branch) && 'main' || 'dev') || '' }}
container: nvcr.io/ea-nvidia-morpheus/morpheus:morpheus-ci-build-241004
test_container: nvcr.io/ea-nvidia-morpheus/morpheus:morpheus-ci-test-241004
secrets:
CONDA_TOKEN: ${{ secrets.CONDA_TOKEN }}
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ option(BUILD_SHARED_LIBS "Default value for whether or not to build shared or st
option(MORPHEUS_BUILD_BENCHMARKS "Whether or not to build benchmarks" OFF)
option(MORPHEUS_BUILD_DOCS "Enable building of API documentation" OFF)
option(MORPHEUS_BUILD_EXAMPLES "Whether or not to build examples" OFF)
option(MORPHEUS_BUILD_MORPHEUS_LLM "Whether or not to build morpheus_llm" OFF)
option(MORPHEUS_BUILD_MORPHEUS_CORE "Whether or not to build morpheus_core" ON)
option(MORPHEUS_BUILD_MORPHEUS_DFP "Whether or not to build morpheus_dfp" ON)
option(MORPHEUS_BUILD_MORPHEUS_LLM "Whether or not to build morpheus_llm" ON)
option(MORPHEUS_BUILD_TESTS "Whether or not to build tests" OFF)
option(MORPHEUS_ENABLE_DEBUG_INFO "Enable printing debug information" OFF)
option(MORPHEUS_PYTHON_BUILD_STUBS "Whether or not to generated .pyi stub files for C++ Python modules. Disable to avoid requiring loading the NVIDIA GPU Driver during build" ON)
Expand All @@ -37,7 +39,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 "24.02" CACHE STRING "Sets default versions for RAPIDS libraries.")
set(MORPHEUS_RAPIDS_VERSION "24.10" 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
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -16,26 +17,10 @@
# It is assumed that this script is executed from the root of the repo directory by conda-build
# (https://conda-forge.org/docs/maintainer/knowledge_base.html#using-cmake)

# Need to ensure this value is set before checking it in the if block
MORPHEUS_SUPPORT_DOCA=-OFF
MORPHEUS_BUILD_MORPHEUS_LLM=-OFF

# This will store all of the cmake args. Make sure to prepend args to allow
# incoming values to overwrite them
CMAKE_ARGS=${CMAKE_ARGS:-""}

export CCACHE_BASEDIR=$(realpath ${SRC_DIR}/..)
export USE_SCCACHE=${USE_SCCACHE:-""}

# Check for some mrc environment variables. Append to front of args to allow users to overwrite them
if [[ -n "${MORPHEUS_CACHE_DIR}" ]]; then
# Set the cache variable, then set the Staging prefix to allow for host searching
CMAKE_ARGS="-DMORPHEUS_CACHE_DIR=${MORPHEUS_CACHE_DIR} ${CMAKE_ARGS}"

# Double check that the cache dir has been created
mkdir -p ${MORPHEUS_CACHE_DIR}
fi

# CMake flags common across all libraries
CMAKE_ARGS="-DCMAKE_MESSAGE_CONTEXT_SHOW=ON ${CMAKE_ARGS}"
CMAKE_ARGS="-DCMAKE_INSTALL_PREFIX=$PREFIX ${CMAKE_ARGS}"
CMAKE_ARGS="-DCMAKE_INSTALL_LIBDIR=lib ${CMAKE_ARGS}"
Expand All @@ -51,38 +36,12 @@ CMAKE_ARGS="-DPython_EXECUTABLE=${PYTHON} ${CMAKE_ARGS}"
CMAKE_ARGS="-DPYTHON_EXECUTABLE=${PYTHON} ${CMAKE_ARGS}" # for pybind11
CMAKE_ARGS="--log-level=VERBOSE ${CMAKE_ARGS}"

if [[ "${USE_SCCACHE}" == "1" ]]; then
CMAKE_ARGS="-DCCACHE_PROGRAM_PATH=$(which sccache) ${CMAKE_ARGS}"
fi

echo "CC : ${CC}"
echo "CXX : ${CXX}"
echo "CUDAHOSTCXX : ${CUDAHOSTCXX}"
echo "CUDA : ${CUDA}"
echo "CMAKE_ARGS : ${CMAKE_ARGS}"

echo "========Begin Env========"
env
echo "========End Env========"

BUILD_DIR="build-conda"
# Append to front of args to allow users to overwrite them
if [[ -n "${MORPHEUS_CACHE_DIR}" ]]; then
# Set the cache variable, then set the Staging prefix to allow for host searching
CMAKE_ARGS="-DMORPHEUS_CACHE_DIR=${MORPHEUS_CACHE_DIR} ${CMAKE_ARGS}"

# Check if the build directory already exists. And if so, delete the
# CMakeCache.txt and CMakeFiles to ensure a clean configuration
if [[ -d "./${BUILD_DIR}" ]]; then
echo "Deleting old CMake files at ./${BUILD_DIR}"
rm -rf "./${BUILD_DIR}/CMakeCache.txt"
rm -rf "./${BUILD_DIR}/CMakeFiles"
# Double check that the cache dir has been created
mkdir -p ${MORPHEUS_CACHE_DIR}
fi

# Run configure
cmake -B ${BUILD_DIR} \
${CMAKE_ARGS} \
--log-level=verbose \
.

# Build the components
cmake --build ${BUILD_DIR} -j${PARALLEL_LEVEL:-$(nproc)} --target install

# Install just the mprpheus core python wheel components
${PYTHON} -m pip install -vv ${BUILD_DIR}/python/morpheus/dist/*.whl
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
# limitations under the License.

c_compiler_version:
- 11.2
- 12.1

cxx_compiler_version:
- 11.2
- 12.1

cuda_compiler:
- cuda-nvcc

cuda_compiler_version:
- 12.1
- 12.5

python:
- 3.10

rapids_version:
- 24.02
- 24.10
Loading

0 comments on commit 4eaf78a

Please sign in to comment.