-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
morpheus_dfp conda recipe and CI updates
1. Add a build flag to disable compiling morpheus-core 2. Add a build flag for morpheus_dfp 3. Add morpheus_dfp conda recipe 4. Include morpheus_dfp package in docs Cleanup: 1. Avoid enabling morpheus extended package flags in the runner container. Instead set them via the build scripts. This is mainly to avoid the confusion in managing the flags. 2. Simply passing build flags to the conda recipes. This was happening in multiple ways making future maintanence challenging.
- Loading branch information
1 parent
f2db2b9
commit ac87f61
Showing
24 changed files
with
304 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
c_compiler_version: | ||
- 11.2 | ||
|
||
cxx_compiler_version: | ||
- 11.2 | ||
|
||
cuda_compiler: | ||
- cuda-nvcc | ||
|
||
cuda_compiler_version: | ||
- 12.1 | ||
|
||
python: | ||
- 3.10 | ||
|
||
rapids_version: | ||
- 24.02 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
{% set version = environ.get('GIT_VERSION', '0.0.0.dev').lstrip('v') + environ.get('VERSION_SUFFIX', '') %} | ||
|
||
package: | ||
name: morpheus-dfp | ||
version: {{ version }} | ||
|
||
source: | ||
git_url: ../../../.. | ||
|
||
outputs: | ||
|
||
- name: morpheus-dfp | ||
build: | ||
number: {{ GIT_DESCRIBE_NUMBER }} | ||
string: cuda_{{ cuda_compiler_version }}_py{{ python }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} | ||
script_env: | ||
# Note: Setting a default value here will overwrite the value from the | ||
# shell! Defaults should be set in the run_conda_build.sh script | ||
- CMAKE_CUDA_ARCHITECTURES | ||
- MORPHEUS_CACHE_DIR | ||
- MORPHEUS_PYTHON_BUILD_STUBS | ||
- PARALLEL_LEVEL | ||
run_exports: | ||
- {{ pin_subpackage("morpheus-dfp", max_pin="x.x") }} | ||
script: morpheus_dfp_build.sh | ||
|
||
requirements: | ||
build: | ||
- ccache | ||
- cmake =3.27 | ||
host: | ||
- morpheus-core # TBD - version | ||
- pip | ||
- python {{ python }} | ||
- scikit-build 0.17.6 | ||
- versioneer-518 | ||
run: | ||
- morpheus-core # TBD - version | ||
|
||
test: | ||
requires: | ||
- pynvml | ||
- pytest-asyncio | ||
- pytest-benchmark | ||
- pytest-cov | ||
- pytest =7.4.4 | ||
source_files: | ||
- pyproject.toml | ||
- scripts/fetch_data.py | ||
imports: | ||
- morpheus_dfp | ||
commands: | ||
- echo # make sure test requirements get installed | ||
|
||
about: | ||
home: https://github.com/nv-morpheus/Morpheus | ||
license: Apache-2.0 | ||
license_family: Apache | ||
license_file: LICENSE | ||
summary: Morpheus Cybersecurity Digital Fingerprinting Library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# 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) | ||
|
||
# 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 | ||
|
||
# Enable DFP | ||
CMAKE_ARGS="-DMORPHEUS_BUILD_MORPHEUS_DFP=ON ${CMAKE_ARGS}" | ||
|
||
# Disable core, llm and doca | ||
CMAKE_ARGS="-DMORPHEUS_SUPPORT_DOCA=OFF ${CMAKE_ARGS}" | ||
CMAKE_ARGS="-DMORPHEUS_BUILD_MORPHEUS_CORE=OFF ${CMAKE_ARGS}" | ||
CMAKE_ARGS="-DMORPHEUS_BUILD_MORPHEUS_LLM=OFF ${CMAKE_ARGS}" | ||
|
||
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}" | ||
CMAKE_ARGS="-DBUILD_SHARED_LIBS=ON ${CMAKE_ARGS}" | ||
CMAKE_ARGS="-DMORPHEUS_USE_CONDA=ON ${CMAKE_ARGS}" | ||
CMAKE_ARGS="-DMORPHEUS_USE_CCACHE=ON ${CMAKE_ARGS}" | ||
CMAKE_ARGS="-DMORPHEUS_PYTHON_BUILD_STUBS=${MORPHEUS_PYTHON_BUILD_STUBS=-"ON"} ${CMAKE_ARGS}" | ||
CMAKE_ARGS="-DMORPHEUS_PYTHON_INPLACE_BUILD=ON ${CMAKE_ARGS}" | ||
CMAKE_ARGS="-DMORPHEUS_PYTHON_BUILD_WHEEL=ON ${CMAKE_ARGS}" | ||
CMAKE_ARGS="-DCMAKE_BUILD_RPATH_USE_ORIGIN=ON ${CMAKE_ARGS}" | ||
CMAKE_ARGS="-DCMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES=-"RAPIDS"} ${CMAKE_ARGS}" | ||
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 "========Begin Env========" | ||
env | ||
echo "========End Env========" | ||
|
||
BUILD_DIR="build-conda" | ||
|
||
# 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" | ||
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 the mprpheus dfp python wheel components | ||
${PYTHON} -m pip install -vv ${BUILD_DIR}/python/morpheus_dfp/dist/*.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.