Skip to content

Commit

Permalink
Bugfix: Remove MORPHEUS_USE_CONDA option; Add warning if `CONDA_PRE…
Browse files Browse the repository at this point in the history
…FIX` not found (#2171)

* Removes `MORPHEUS_USE_CONDA` CMake option
* Update `external/utilities` submodule
* Update scripts for building/configuring

This PR changes the configuration behavior slightly. If `CONDA_PREFIX` is found, it will automatically configure to include looking for packages within conda. If not found, a WARNING message will be presented. Since conda is the preferred method for building Morpheus/MRC/etc, this was found to be a reasonable solution in discussion with David G.

## 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:
  - Will Killian (https://github.com/willkill07)

Approvers:
  - David Gardner (https://github.com/dagardner-nv)

URL: #2171
  • Loading branch information
willkill07 authored Feb 5, 2025
1 parent cc3305e commit 159fc7d
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 11 deletions.
8 changes: 2 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ option(MORPHEUS_PYTHON_PERFORM_INSTALL "Whether or not to automatically `pip ins
option(MORPHEUS_SUPPORT_DOCA "Whether or not to build doca-related elements of morpheus" OFF)
option(MORPHEUS_USE_CCACHE "Enable caching compilation results with ccache" OFF)
option(MORPHEUS_USE_CLANG_TIDY "Enable running clang-tidy as part of the build process" OFF)
option(MORPHEUS_USE_CONDA "Enables finding dependencies via conda instead of vcpkg. Note: This will disable vcpkg. All dependencies must be installed first in the conda environment" OFF)
option(MORPHEUS_USE_IWYU "Enable running include-what-you-use as part of the build process" OFF)

set(MORPHEUS_PY_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/wheel" CACHE STRING "Location to install the python directory")
Expand Down Expand Up @@ -75,10 +74,7 @@ set(MORPHEUS_UTILS_RAPIDS_VERSION ${MORPHEUS_RAPIDS_VERSION} CACHE STRING "" FOR
# Load morpheus utils and update CMake paths
include(morpheus_utils/load)

morpheus_utils_initialize_package_manager(
MORPHEUS_USE_CONDA
BUILD_SHARED_LIBS
)
morpheus_utils_initialize_package_manager()

# Initialize CUDA
# This is a two-step process. We need to call morpheus_utils_initialize_cuda_arch which in turn calls
Expand Down Expand Up @@ -106,7 +102,7 @@ project(morpheus
# This sets some clang specific settings for CUDA prior to calling enable_language(CUDA)
morpheus_utils_enable_cuda()

morpheus_utils_initialize_install_prefix(MORPHEUS_USE_CONDA)
morpheus_utils_initialize_install_prefix()

rapids_cmake_write_version_file(${CMAKE_BINARY_DIR}/autogenerated/include/morpheus/version.hpp)

Expand Down
1 change: 0 additions & 1 deletion ci/conda/recipes/morpheus-libs/cmake_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ 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}"
Expand Down
1 change: 0 additions & 1 deletion ci/conda/recipes/morpheus/morpheus_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ 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}"
Expand Down
1 change: 0 additions & 1 deletion ci/scripts/github/cmake_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ _FLAGS+=("-B" "${BUILD_DIR}")
_FLAGS+=("-G" "Ninja")
_FLAGS+=("-DCMAKE_MESSAGE_CONTEXT_SHOW=ON")
_FLAGS+=("-DMORPHEUS_CUDA_ARCHITECTURES=RAPIDS")
_FLAGS+=("-DMORPHEUS_USE_CONDA=ON")
_FLAGS+=("-DMORPHEUS_USE_CCACHE=ON")
_FLAGS+=("-DMORPHEUS_PYTHON_INPLACE_BUILD=OFF")
_FLAGS+=("-DMORPHEUS_PYTHON_BUILD_STUBS=ON")
Expand Down
1 change: 0 additions & 1 deletion scripts/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ cmake -S . -B ${BUILD_DIR} -GNinja \
-DMORPHEUS_PYTHON_INPLACE_BUILD=ON \
-DMORPHEUS_PYTHON_PERFORM_INSTALL=${MORPHEUS_PYTHON_PERFORM_INSTALL:-ON} \
-DMORPHEUS_USE_CCACHE=ON \
-DMORPHEUS_USE_CONDA=${MORPHEUS_USE_CONDA:-ON} \
-DMORPHEUS_SUPPORT_DOCA=${MORPHEUS_SUPPORT_DOCA:-OFF} \
-DMORPHEUS_BUILD_MORPHEUS_CORE=${MORPHEUS_BUILD_MORPHEUS_CORE:-ON} \
-DMORPHEUS_BUILD_MORPHEUS_LLM=${MORPHEUS_BUILD_MORPHEUS_LLM:-ON} \
Expand Down

0 comments on commit 159fc7d

Please sign in to comment.