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

Upgrade to RMM 23.02 #308

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 18 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, 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.

FROM rapidsai/devcontainers:23.04-cuda11.8-mambaforge-ubuntu22.04 AS base

ENV PATH="${PATH}:/workspaces/mrc/.devcontainer/bin"
97 changes: 65 additions & 32 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,68 @@
// SPDX-FileCopyrightText: Copyright (c) 2022, 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.
{
"name": "mrc-dev",
"build": {
"args": {
"USERNAME": "${localEnv:USER}",
"USER_ID": "${localEnv:UID}"
"dockerfile": "Dockerfile"
},
"hostRequirements": {
"gpu": true
},
"capAdd":[
"SYS_NICE",
"SYS_PTRACE"
],
"securityOpt": [
"seccomp=unconfined"
],
"runArgs": [
"--network=host"
],
"containerEnv": {
"HOST_MRC_ROOT": "${localWorkspaceFolder}",
"MRC_ROOT": "${containerWorkspaceFolder}",
"DEFAULT_CONDA_ENV": "mrc",
"MAMBA_NO_BANNER": "1",
"VAULT_HOST": "https://vault.ops.k8s.rapids.ai"
},
"initializeCommand": [ "${localWorkspaceFolder}/.devcontainer/initialize-command.sh" ],
"remoteUser": "coder",
"mounts": [
{
"type": "bind",
"source": "${localWorkspaceFolder}/.cache/conda/envs",
"target": "/home/coder/.conda/envs"
},
{
"type": "bind",
"source": "${localWorkspaceFolder}/../.conda/pkgs",
"target": "/home/coder/.conda/pkgs"
},
"context": "..",
"dockerfile": "${localWorkspaceFolder}/Dockerfile",
"target": "development"
{
"type": "bind",
"source": "${localWorkspaceFolder}/../.config", // parent folder because sister repos are sibling dirs
"target": "/home/coder/.config"
},
{
"type": "bind",
"source": "${localWorkspaceFolder}/.devcontainer/opt/mrc",
"target": "/opt/mrc"
},
],
"features": {
"ghcr.io/devcontainers/features/dotnet:1": {}
},
"customizations": {
"vscode": {
Expand All @@ -26,34 +82,11 @@
"xaver.clang-format"
],
"settings": {
"cmake.cmakePath": "cmake", // Ensure we use the default from the conda environment
// Fix for https://github.com/dotnet/vscode-dotnet-runtime/issues/159
// Once version 1.6.1 of the extension has been release, this can be removed
"cmake.cmakePath": "/tmp/.current-conda-env/bin/cmake",
"cmake.languageSupport.dotnetPath": "/usr/bin/dotnet",
"C_Cpp.intelliSenseEngine": "disabled",
"python.terminal.activateEnvironment": false
}
}
},
"hostRequirements": {
"gpu": true
},
"mounts": [
// Mount the necessary files for GDB pretty-printing to work
"source=${localWorkspaceFolder}/.devcontainer/home/.gdbinit,target=/home/${localEnv:USER}/.gdbinit,type=bind",
"source=${localWorkspaceFolder}/.devcontainer/home/.config/gdb,target=/home/${localEnv:USER}/.config/gdb,type=bind",
// Mount the Github CLI config directory to allow using the Github CLI
"source=${localEnv:HOME}/.config/gh,target=/home/${localEnv:USER}/.config/gh,type=bind",
],
"name": "mrc-dev",
"overrideCommand": true, // infinite loop of sleeps,
"remoteUser": "${localEnv:USER}",
"runArgs": [
"--network=host",
"--cap-add=SYS_PTRACE",
"--cap-add=SYS_NICE",
"--security-opt",
"seccomp=unconfined"
],
"updateRemoteUserUID": true,
"workspaceFolder": "/work",
"workspaceMount": "source=${localWorkspaceFolder},target=/work,type=bind,consistency=cached"
}
3 changes: 0 additions & 3 deletions .devcontainer/home/.gdbinit

This file was deleted.

21 changes: 21 additions & 0 deletions .devcontainer/initialize-command.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, 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.

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

# create a config directory if it does not exist so it's found when mounting
mkdir -p ../.config
33 changes: 33 additions & 0 deletions .devcontainer/opt/mrc/bin/post-attach-command.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2023, 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.

# Ensure our ~/.config directory has the correct permissions. If ~/.config did
# not exist, and you mount ~/.config/gh from the host, then ~/.config will be
# created with root permissions which can break things

conda_env_find(){
conda env list | grep "${@}" >/dev/null 2>/dev/null
}

ENV_NAME=${ENV_NAME:-mrc}

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 ${MRC_ROOT}/ci/conda/environments/dev_env.yml --prune; \
else mamba env create --name ${ENV_NAME} -f ${MRC_ROOT}/ci/conda/environments/dev_env.yml; \
fi
23 changes: 23 additions & 0 deletions .devcontainer/opt/mrc/bin/update-content-command.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2023, 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.

# Ensure our ~/.config directory has the correct permissions. If ~/.config did
# not exist, and you mount ~/.config/gh from the host, then ~/.config will be
# created with root permissions which can break things

if [[ ! -f ~/.config/.gdbinit ]]; then
cp /opt/mrc/etc/.gdbinit ~/.config/.gdbinit
fi
3 changes: 3 additions & 0 deletions .devcontainer/opt/mrc/etc/.gdbinit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
add-auto-load-safe-path /opt/conda

source /opt/mrc/etc/enable_conda_libstd_pretty_print.py
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ option(MRC_USE_CONDA "Enables finding dependencies via conda. All dependencies m
environment" ON)
option(MRC_USE_IWYU "Enable running include-what-you-use as part of the build process" OFF)

set(MRC_RAPIDS_VERSION "22.10" CACHE STRING "Which version of RAPIDS to build for. Sets default versions for RAPIDS CMake and RMM.")
set(MRC_RAPIDS_VERSION "23.02" CACHE STRING "Which version of RAPIDS to build for. Sets default versions for RAPIDS CMake and RMM.")

set(MRC_CACHE_DIR "${CMAKE_SOURCE_DIR}/.cache" CACHE PATH "Directory to contain all CPM and CCache data")
mark_as_advanced(MRC_CACHE_DIR)
Expand All @@ -63,7 +63,7 @@ list(PREPEND CMAKE_MODULE_PATH "${MRC_CMAKE_MODULE_PATH_EXTENSIONS}")
list(PREPEND CMAKE_PREFIX_PATH "${MRC_CMAKE_PREFIX_PATH_EXTENSIONS}")

# Load morpheus utils and update CMake paths
set(MORPHEUS_UTILS_RAPIDS_CMAKE_VERSION ${MRC_RAPIDS_VERSION})
set(MORPHEUS_UTILS_RAPIDS_VERSION ${MRC_RAPIDS_VERSION})
set(MORPHEUS_UTILS_RAPIDS_CPM_INIT_OVERRIDE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/rapids_cpm_package_overrides.json")
include(morpheus_utils/load)

Expand All @@ -78,7 +78,7 @@ morpheus_utils_initialize_package_manager(
morpheus_utils_initialize_cuda_arch(mrc)

project(mrc
VERSION 23.03.00
VERSION 23.07.00
LANGUAGES C CXX
)

Expand Down
24 changes: 12 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,41 +77,41 @@ Some options:

#### Clone MRC repository
```bash
export MRC_HOME=$(pwd)/mrc
git clone --recurse-submodules [email protected]:nv-morpheus/mrc.git $MRC_HOME
cd $MRC_HOME
export MRC_ROOT=$(pwd)/mrc
git clone --recurse-submodules [email protected]:nv-morpheus/mrc.git $MRC_ROOT
cd $MRC_ROOT
```

#### Create MRC Conda environment
```bash
# note: `mamba` may be used in place of `conda` for better performance.
conda env create -n mrc --file $MRC_HOME/ci/conda/environments/dev_env.yml
conda env create -n mrc --file $MRC_ROOT/ci/conda/environments/dev_env.yml
conda activate mrc
```
#### Build MRC
```bash
mkdir $MRC_HOME/build
cd $MRC_HOME/build
mkdir $MRC_ROOT/build
cd $MRC_ROOT/build
cmake ..
make -j $(nproc)
```

#### Run MRC C++ Tests
```bash
export MRC_TEST_INTERNAL_DATA_PATH=$MRC_HOME/src/tests
$MRC_HOME/build/src/tests/test_mrc_private.x
$MRC_HOME/build/tests/test_mrc.x
$MRC_HOME/build/tests/logging/test_mrc_logging.x
export MRC_TEST_INTERNAL_DATA_PATH=$MRC_ROOT/cpp/mrc/src/tests
$MRC_ROOT/build/cpp/mrcsrc/tests/test_mrc_private.x
$MRC_ROOT/build/cpp/mrctests/test_mrc.x
$MRC_ROOT/build/cpp/mrctests/logging/test_mrc_logging.x
```

### Install MRC Python
```bash
pip install -e $MRC_HOME/build/python
pip install -e $MRC_ROOT/build/python
```

#### Run MRC Python Tests
```bash
pytest $MRC_HOME/python
pytest $MRC_ROOT/python
```

### Building API Documentation
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@


ARG FROM_IMAGE="rapidsai/ci"
ARG CUDA_VER=11.4.1
ARG CUDA_VER=11.8.0
ARG LINUX_DISTRO=ubuntu
ARG LINUX_VER=20.04
ARG PYTHON_VER=3.8

# ============= base ===================
FROM ${FROM_IMAGE}:cuda11.4.1-ubuntu20.04-py3.8 AS base
FROM ${FROM_IMAGE}:cuda11.8.0-ubuntu20.04-py3.8 AS base

ARG PROJ_NAME=mrc

Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,46 +110,46 @@ Installing via source is for more advanced users and is necessary to try MRC fea
<!-- omit in toc -->
#### Clone MRC repository
```bash
export MRC_HOME=$(pwd)/mrc
git clone --recurse-submodules [email protected]:nv-morpheus/mrc.git $MRC_HOME
cd $MRC_HOME
export MRC_ROOT=$(pwd)/mrc
git clone --recurse-submodules [email protected]:nv-morpheus/mrc.git $MRC_ROOT
cd $MRC_ROOT
```
<!-- omit in toc -->
#### Create MRC Conda Environment
```bash
# note: `mamba` may be used in place of `conda` for better performance.
conda env create -n mrc-dev --file $MRC_HOME/ci/conda/environments/dev_env.yml
conda env create -n mrc-dev --file $MRC_ROOT/ci/conda/environments/dev_env.yml
conda activate mrc-dev
```
<!-- omit in toc -->
#### Build MRC
```bash
mkdir $MRC_HOME/build
cd $MRC_HOME/build
mkdir $MRC_ROOT/build
cd $MRC_ROOT/build
cmake ..
make -j $(nproc)
```
<!-- omit in toc -->
#### Run MRC C++ Tests
```bash
export MRC_TEST_INTERNAL_DATA_PATH=$MRC_HOME/src/tests
$MRC_HOME/build/src/tests/test_mrc_private.x
$MRC_HOME/build/tests/test_mrc.x
$MRC_HOME/build/tests/logging/test_mrc_logging.x
export MRC_TEST_INTERNAL_DATA_PATH=$MRC_ROOT/cpp/mrc/src/tests
$MRC_ROOT/build/cpp/mrc/src/tests/test_mrc_private.x
$MRC_ROOT/build/cpp/mrc/tests/test_mrc.x
$MRC_ROOT/build/cpp/mrc/tests/logging/test_mrc_logging.x
```
<!-- omit in toc -->
#### Install MRC Python Bindings
```bash
pip install -e $MRC_HOME/build/python
pip install -e $MRC_ROOT/build/python
```
<!-- omit in toc -->
#### Run MRC Python Tests
```bash
pytest $MRC_HOME/python
pytest $MRC_ROOT/python
```

### Docker Installation
A Dockerfile is provided at `$MRC_HOME` and can be built with
A Dockerfile is provided at `$MRC_ROOT` and can be built with
```bash
docker build -t mrc:latest .
```
Expand Down
6 changes: 3 additions & 3 deletions ci/conda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
To build the Conda packages, it's recommended to run the provided scripts from a docker container. To build the container, `mrc-conda-build`, run the following:

```bash
cd ${MRC_HOME}
cd ${MRC_ROOT}
docker buildx build --target developement -t mrc-conda-build .
```

Expand All @@ -20,10 +20,10 @@ docker run --rm -ti -v $PWD:/work \
mrc-conda-build ./ci/conda/recipes/run_conda_build.sh
```

This will save the conda packages to `${MRC_HOME}/.conda-bld`. To install from this location, use the following:
This will save the conda packages to `${MRC_ROOT}/.conda-bld`. To install from this location, use the following:

```bash
conda install -c file://${MRC_HOME}/.conda-bld mrc
conda install -c file://${MRC_ROOT}/.conda-bld mrc
```

## Uploading the Conda Package
Expand Down
Loading