Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have conda-build test cuml installation #764

Merged
merged 42 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
afb72e8
reorg
cwharris Feb 16, 2023
66993e6
add pytest-kafka installation script and VAULT_HOST env variable
cwharris Feb 16, 2023
1cb3f84
rename pytest-kafka installation script
cwharris Feb 16, 2023
af6d829
move .conda folder to parent dir
cwharris Feb 17, 2023
084c70d
Merge branch 'branch-23.03' of github.com:nv-morpheus/Morpheus into d…
cwharris Feb 17, 2023
4c9cfcf
move gdb pretty print files
cwharris Feb 23, 2023
d798d59
add x11 mount
cwharris Feb 23, 2023
62d96d1
add x-server related env variables and binds to devcontainer
cwharris Feb 23, 2023
b15e6ba
move devcontainer vscode settings to new location
cwharris Feb 23, 2023
6a0f93c
Merge branch 'branch-23.03' of github.com:nv-morpheus/Morpheus into d…
cwharris Feb 24, 2023
a3a1f59
Merge branch 'branch-23.03' of github.com:nv-morpheus/Morpheus into d…
cwharris Feb 27, 2023
04de58f
Merge branch 'branch-23.03' of github.com:nv-morpheus/Morpheus into d…
cwharris Mar 7, 2023
4af3619
address review feedback
cwharris Mar 7, 2023
6aa526b
make devcontainer conda mounts more resilient
cwharris Mar 8, 2023
67f6836
update to cuda 11.8
cwharris Mar 8, 2023
2ccbb44
Merge branch 'branch-23.03' of github.com:nv-morpheus/Morpheus into c…
cwharris Mar 8, 2023
b6a347c
Merge branch 'branch-23.03' of github.com:nv-morpheus/Morpheus into c…
cwharris Mar 13, 2023
564c593
conda build fixes for devcontainer
cwharris Mar 14, 2023
39b20c0
Merge branch 'branch-23.03' of github.com:nv-morpheus/Morpheus into c…
cwharris Mar 15, 2023
c69762b
add comments
cwharris Mar 15, 2023
9871d12
add cuda-11.8.0 label back
cwharris Mar 15, 2023
1146fb0
install cuda-compiler for dev and release container builds
cwharris Mar 15, 2023
2d241bd
Merge branch 'branch-23.03' of github.com:nv-morpheus/Morpheus into c…
cwharris Mar 20, 2023
ca92c7f
Removing `morpheus._lib` from the conda build tests since that requir…
mdemoret-nv Mar 22, 2023
470f3ac
Setting RAPIDS_NO_INITIALIZE=1 to allow import tests to work
mdemoret-nv Mar 22, 2023
e0a3463
Removing GPU libraries from import
mdemoret-nv Mar 22, 2023
5a656ce
Test removing cusolver and cusparse
mdemoret-nv Mar 22, 2023
c1a30a2
Switching to use run_constrained
mdemoret-nv Mar 22, 2023
9add0cd
Minor tweaks to dockerfile and add dependencies to export set
mdemoret-nv Mar 23, 2023
efa6193
Merge branch 'branch-23.03' into conda-build-fixes
dagardner-nv Mar 27, 2023
bd95575
Merge branch 'branch-23.03' of github.com:nv-morpheus/Morpheus into c…
cwharris Mar 27, 2023
5259261
Merge branch 'conda-build-fixes' of github.com:cwharris/Morpheus into…
cwharris Mar 27, 2023
8399992
reorder apt installs
cwharris Mar 27, 2023
3ac7943
Merge branch 'conda-build-fixes' of github.com:cwharris/Morpheus into…
dagardner-nv Mar 27, 2023
f3c9e3f
add copyright header
cwharris Mar 27, 2023
6c5a65a
remove run_test.py and fix typo
cwharris Mar 27, 2023
daa9a13
make CUDAToolkit find_package REQUIRED
cwharris Mar 27, 2023
77db009
Fix placement of the end of the apt command
dagardner-nv Mar 27, 2023
81bfb17
Merge branch 'conda-build-fixes' of github.com:cwharris/Morpheus into…
dagardner-nv Mar 27, 2023
474fae3
Merge branch 'branch-23.03' of github.com:nv-morpheus/Morpheus into c…
cwharris Mar 27, 2023
a96bb54
Merge branch 'conda-build-fixes' of github.com:cwharris/Morpheus into…
cwharris Mar 27, 2023
2768f20
Merge branch 'branch-23.03' of github.com:nv-morpheus/Morpheus into c…
cwharris Mar 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .devcontainer/initialize-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
docker network inspect morpheus >/dev/null 2>&1 || docker network create morpheus

# create the parent conda folder so it's found when mounting
mkdir -p ../.conda
mkdir -p .cache/conda/envs
mkdir -p ../.conda/pkgs

# create a config directory if it does not exist so it's found when mounting
mkdir -p ../.config
19 changes: 9 additions & 10 deletions ci/conda/recipes/morpheus/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ outputs:
- scikit-build >=0.12
- versioneer-518
run:
# Runtime only requirements. This + setup.y is the definitive runtime requirement list
# Runtime only requirements. This + setup.py is the definitive runtime requirement list
- click >=8
- configargparse 1.5.*
- cuda-python <=11.7.0 # Needed to ensure cudatoolkit and not cuda-toolkit is installed
Expand All @@ -91,30 +91,29 @@ outputs:
- tqdm 4.*
- typing_utils 0.1.*
- watchdog 2.1.*

run_constrained:
# If cuml is installed, we need to constrain these two libraries. See:
# https://docs.rapids.ai/notices/rsn0026/ for libcusolver & libcusparse
- libcusolver<=11.4.1.48
- libcusparse<12
test:
requires:
- cudatoolkit {{ cuda_version }}.*
- gputil
- pytest
- pytest-cov
- pytest-benchmark
# test that cuml can be installed in the env
- cuml {{ rapids_version }}
source_files:
# - .git/*
- docker/conda/environments/*
- pyproject.toml
- scripts/fetch_data.py
- tests/*
imports:
- morpheus
- morpheus._lib
commands:
# Install dependencies that are pip-only
- mamba env update --prefix ${CONDA_PREFIX} --file docker/conda/environments/cuda{{ cuda_version }}_runtime.yml
# Ensure the test data is downloaded
- ./scripts/fetch_data.py fetch tests
# Run pytest
- pytest
- echo # make sure test requirements get installed

about:
home: https://github.com/nv-morpheus/Morpheus
Expand Down
35 changes: 20 additions & 15 deletions cmake/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,39 @@ if (VERBOSE)
morpheus_utils_print_config()
endif()

# Load direct physical package dependencies first, so we fail early.
find_package(Protobuf REQUIRED)
find_package(CUDAToolkit REQUIRED) # Required by Morpheus. Fail early if we don't have it.
# Load direct physical package dependencies first, so we fail early. Add all dependencies to our export set
rapids_find_package(Protobuf
REQUIRED
BUILD_EXPORT_SET ${PROJECT_NAME}-core-exports
INSTALL_EXPORT_SET ${PROJECT_NAME}-core-exports
)

find_package(CUDAToolkit REQUIRED)

if(MORPHEUS_BUILD_BENCHMARKS)
# google benchmark
# - Expects package to pre-exist in the build environment
# ================
rapids_find_package(benchmark REQUIRED
GLOBAL_TARGETS benchmark::benchmark
BUILD_EXPORT_SET ${PROJECT_NAME}-exports
INSTALL_EXPORT_SET ${PROJECT_NAME}-exports
FIND_ARGS
CONFIG
)
GLOBAL_TARGETS benchmark::benchmark
BUILD_EXPORT_SET ${PROJECT_NAME}-exports
INSTALL_EXPORT_SET ${PROJECT_NAME}-exports
FIND_ARGS
CONFIG
)
endif()

if(MORPHEUS_BUILD_TESTS)
# google test
# - Expects package to pre-exist in the build environment
# ===========
rapids_find_package(GTest REQUIRED
GLOBAL_TARGETS GTest::gtest GTest::gmock GTest::gtest_main GTest::gmock_main
BUILD_EXPORT_SET ${PROJECT_NAME}-exports
INSTALL_EXPORT_SET ${PROJECT_NAME}-exports
FIND_ARGS
CONFIG
)
GLOBAL_TARGETS GTest::gtest GTest::gmock GTest::gtest_main GTest::gmock_main
BUILD_EXPORT_SET ${PROJECT_NAME}-exports
INSTALL_EXPORT_SET ${PROJECT_NAME}-exports
FIND_ARGS
CONFIG
)
endif()

# libcudacxx -- get an explicit lubcudacxx build, matx tries to pull a tag that doesn't exist.
Expand Down
13 changes: 6 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ WORKDIR ${MORPHEUS_ROOT}
# Install mamba to speed the solve up
RUN conda config --set ssl_verify false &&\
conda config --add pkgs_dirs /opt/conda/pkgs &&\
conda config --env --add channels conda-forge &&\
# Install mamba, boa and git here. Conda build breaks with other git installs
/opt/conda/bin/conda install -y -n base -c conda-forge "mamba >=0.22" "boa >=0.10" "git >=2.35.3" "git-lfs" "python=${PYTHON_VER}" "tini=0.19" &&\
/opt/conda/bin/mamba install -y -n base -c conda-forge "boa" "git >=2.35.3" "git-lfs" "python=${PYTHON_VER}" "tini=0.19" &&\
source activate base &&\
git lfs install
# conda clean -afy
Expand Down Expand Up @@ -148,10 +147,10 @@ RUN apt update && \
cuda-cupti-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
cuda-nvml-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
cuda-nvtx-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
libcublas-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
libcufft-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
libcurand-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
libcusolver-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
libcublas-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} && \
libcusolver-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} && \
apt clean && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -163,7 +162,7 @@ RUN --mount=type=cache,id=workspace_cache,target=/workspace/.cache,sharing=locke
source activate base &&\
# Need to get around recent versions of git locking paths until they are deemed safe
git config --global --add safe.directory "*" &&\
MORPHEUS_PYTHON_BUILD_STUBS=OFF CONDA_BLD_PATH=/opt/conda/conda-bld CONDA_ARGS="--no-test" ./ci/conda/recipes/run_conda_build.sh morpheus
MORPHEUS_PYTHON_BUILD_STUBS=OFF CONDA_BLD_PATH=/opt/conda/conda-bld ./ci/conda/recipes/run_conda_build.sh morpheus

# sid_visualization is a submodule we need to init
RUN git submodule update --init --recursive
Expand Down Expand Up @@ -212,13 +211,14 @@ ARG CUDA_MINOR_VER
RUN apt update && \
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \
apt install --no-install-recommends -y \
cuda-compiler-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
cuda-cudart-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
cuda-cupti-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
cuda-nvtx-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
libcublas-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
libcufft-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
libcurand-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
libcusolver-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
libcublas-dev-${CUDA_MAJOR_VER}-${CUDA_MINOR_VER} \
nodejs \
npm && \
apt clean && \
Expand Down Expand Up @@ -247,7 +247,6 @@ ARG MORPHEUS_USER="root"
RUN source activate morpheus \
&& MORPHEUS_ROOT=/workspace \
CONDA_BLD_PATH=/opt/conda/conda-bld \
CONDA_ARGS="--no-test" \
./ci/conda/recipes/run_conda_build.sh pydebug \
&& ./ci/conda/recipes/python_dbg_install.sh \
-s $( ls /opt/conda/conda-bld/src_cache/Python-${PYTHON_VER}*.tar.xz ) \
Expand Down