Skip to content

Commit

Permalink
Merge branch 'branch-24.06' of github.com:nv-morpheus/Morpheus into m…
Browse files Browse the repository at this point in the history
…dd_fix-logging-tests
  • Loading branch information
dagardner-nv committed Jun 3, 2024
2 parents a055cca + d9e6474 commit 5181db2
Show file tree
Hide file tree
Showing 51 changed files with 798 additions and 434 deletions.
91 changes: 86 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,11 +13,92 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM rapidsai/devcontainers:23.12-cpp-mambaforge-ubuntu22.04 AS base
ARG BASE
ARG PYTHON_PACKAGE_MANAGER

ENV MORPHEUS_SUPPORT_DOCA=ON
FROM node:22 as node

FROM ${BASE} as base

# ===== install common packages ==================================================================

RUN <<EOF

set -x

apt-get update;

rm -rf /tmp/*;
rm -rf /var/tmp/*;
rm -rf /var/cache/apt/*;
rm -rf /var/lib/apt/lists/*;

EOF

# ===== install node + camouflage ================================================================

COPY --from=node /usr/local/bin/node /usr/local/bin/node
COPY --from=node /usr/local/include/node /usr/local/include/node
COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules
COPY --from=node /opt/yarn-v*/bin/* /usr/local/bin/
COPY --from=node /opt/yarn-v*/lib/* /usr/local/lib/

RUN \
<<EOF

bash -c 'echo -e "
fund=false\n
audit=false\n
save-prefix=\n
--omit=optional\n
save-exact=true\n
package-lock=false\n
update-notifier=false\n
scripts-prepend-node-path=true\n
registry=https://registry.npmjs.org/\n
" | tee /root/.npmrc >/dev/null'

ln -s /usr/local/bin/node /usr/local/bin/nodejs
ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx

echo "node version: $(node --version)"
echo " npm version: $(npm --version)"
echo "yarn version: $(yarn --version)"

npm install -g [email protected]

EOF


FROM base as pip-base

ENV DEFAULT_VIRTUAL_ENV=morpheus

FROM base as conda-base

ENV DEFAULT_CONDA_ENV=morpheus

FROM ${PYTHON_PACKAGE_MANAGER}-base

ENV PROJECT_MANIFEST_YML="/home/coder/morpheus/manifest.yaml"
ENV PATH="${PATH}:/home/coder/morpheus/.devcontainer/bin"

ARG CUDA
ENV CUDAARCHS="RAPIDS"
ENV CUDA_VERSION="${CUDA_VERSION:-${CUDA}}"

ARG RAPIDS
ENV RAPIDS=${RAPIDS}

ARG PYTHON_PACKAGE_MANAGER
ENV PYTHON_PACKAGE_MANAGER="${PYTHON_PACKAGE_MANAGER}"

ENV SCCACHE_REGION="us-east-2"
ENV SCCACHE_BUCKET="rapids-sccache-devs"
ENV VAULT_HOST="https://vault.ops.k8s.rapids.ai"
ENV HISTFILE="/home/coder/.cache/._bash_history"

ENV MORPHEUS_SUPPORT_DOCA=ON
COPY ./docker/optional_deps docker/optional_deps
RUN ./docker/optional_deps/doca.sh /tmp/doca

ENV PATH="${PATH}:/workspaces/morpheus/.devcontainer/bin"
112 changes: 112 additions & 0 deletions .devcontainer/cuda12.1-conda/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"build": {
"context": "${localWorkspaceFolder}/.devcontainer",
"dockerfile": "${localWorkspaceFolder}/.devcontainer/Dockerfile",
"args": {
"CUDA": "12.1",
"PYTHON_PACKAGE_MANAGER": "conda",
"BASE": "rapidsai/devcontainers:24.06-cpp-mambaforge-ubuntu22.04"
}
},
"privileged": true,
"hostRequirements": {
"gpu": "optional"
},
"capAdd": [
"SYS_NICE",
"SYS_PTRACE"
],
"securityOpt": [
"seccomp=unconfined"
],
"runArgs": [
"--network=morpheus"
],
"containerEnv": {
"HOST_MORPHEUS_ROOT": "${localWorkspaceFolder}",
"MORPHEUS_ROOT": "${containerWorkspaceFolder}/morpheus",
"DISPLAY": "${localEnv:DISPLAY:-}",
"XAUTHORITY": "${localEnv:XAUTHORITY:-}",
"XDG_SESSION_TYPE": "${localEnv:XDG_SESSION_TYPE:-}",
"XDG_RUNTIME_DIR": "${localEnv:XDG_RUNTIME_DIR:-}",
"DBUS_SESSION_BUS_ADDRESS": "${localEnv:DBUS_SESSION_BUS_ADDRESS:-}"
},
"features": {
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils:24.6": {},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
"ghcr.io/devcontainers/features/dotnet:1": {
"version": "6.0",
"installUsingApt": false
}
},
"overrideFeatureInstallOrder": [
"ghcr.io/rapidsai/devcontainers/features/rapids-build-utils",
"ghcr.io/devcontainers/features/docker-outside-of-docker",
"ghcr.io/devcontainers/features/dotnet"
],
"initializeCommand": [
"/bin/bash",
"-c",
"${localWorkspaceFolder}/.devcontainer/initialize-command.sh && mkdir -m 0755 -p ${localWorkspaceFolder}/../.{aws,cache,config,conda/pkgs,conda/${localWorkspaceFolderBasename}-cuda12.1-envs}"
],
"postAttachCommand": [
"/bin/bash",
"-c",
"if [ ${CODESPACES:-false} = 'true' ]; then . devcontainer-utils-post-attach-command; . rapids-post-attach-command; fi"
],
"workspaceFolder": "/home/coder",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/coder/morpheus,type=bind,consistency=consistent",
"mounts": [
"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind",
"source=${localEnv:XDG_RUNTIME_DIR},target=${localEnv:XDG_RUNTIME_DIR},type=bind",
"source=/run/dbus/system_bus_socket,target=/run/dbus/system_bus_socket,type=bind",
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",
"source=/dev/hugepages,target=/dev/hugepages,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.aws,target=/home/coder/.aws,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.cache,target=/home/coder/.cache,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.config,target=/home/coder/.config,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.conda/pkgs,target=/home/coder/.conda/pkgs,type=bind,consistency=consistent",
"source=${localWorkspaceFolder}/../.conda/${localWorkspaceFolderBasename}-cuda12.1-envs,target=/home/coder/.conda/envs,type=bind,consistency=consistent"
],
"customizations": {
"vscode": {
"extensions": [
"cschlosser.doxdocgen", // Adding docstrings to C++ code
"eamodio.gitlens", // Enhanced Git support
"eeyore.yapf", // Python code formatter
"josetr.cmake-language-support-vscode", // CMake language support
"llvm-vs-code-extensions.vscode-clangd",
"llvm-vs-code-extensions.vscode-clangd", // Clangd language server for C++
"matepek.vscode-catch2-test-adapter",
"mechatroner.rainbow-csv", // Colorizing CSV files
"mhutchie.git-graph", // Visualizing Git history and branching
"ms-azuretools.vscode-docker", // Docker support
"ms-python.debugpy", // Python debugger
"ms-python.flake8", // Python linter
"ms-python.isort", // Python import sorter
"ms-python.pylint", // Python linter
"ms-python.python", // Python language support
"ms-python.vscode-pylance", // Python language server
"ms-toolsai.jupyter", // Jupyter notebook support
"ms-vscode.cmake-tools", // CMake support for building Morpheus
"ms-vscode.cpptools", // C++ language support
"njpwerner.autodocstring", // Adding docstrings to python code
"nvidia.nsight-vscode-edition", // CUDA integration and debugging
"stkb.rewrap", // Wrapping all text in any language
"twxs.cmake",
"vadimcn.vscode-lldb", // LLDB debugger (better than GDB for C++ debugging)
"xaver.clang-format"
],
"settings": {
"cmake.cmakePath": "/tmp/.current-conda-env/bin/cmake",
"C_Cpp.intelliSenseEngine": "disabled",
"python.terminal.activateEnvironment": false,
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/.cache/**": true
}
}
}
}
}
128 changes: 0 additions & 128 deletions .devcontainer/devcontainer.json

This file was deleted.

6 changes: 2 additions & 4 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

version: "3"

services:

triton:
Expand Down Expand Up @@ -54,5 +52,5 @@ services:

networks:
default:
external:
name: morpheus
name: morpheus
external: true
9 changes: 1 addition & 8 deletions .devcontainer/initialize-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,5 @@

set -e

# create a docker network for morpheus
# create a docker network for morpheus if it does not exist
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 .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
Loading

0 comments on commit 5181db2

Please sign in to comment.