Skip to content

Commit

Permalink
Holoscan SDK 2.5.0 Release
Browse files Browse the repository at this point in the history
Co-authored-by: Alexis Girault <[email protected]>
Co-authored-by: Andreas Heumann <[email protected]>
Co-authored-by: Cindy Wilkinson <[email protected]>
Co-authored-by: Cristiana Dinea <[email protected]>
Co-authored-by: Denis Leshchev <[email protected]>
Co-authored-by: Gigon Bae <[email protected]>
Co-authored-by: Gregory Lee <[email protected]>
Co-authored-by: Ian Stewart <[email protected]>
Co-authored-by: Julien Jomier <[email protected]>
Co-authored-by: Shekhar Dwivedi <[email protected]>
Co-authored-by: Tom Birdsong <[email protected]>
Co-authored-by: Victor Chang <[email protected]>
Co-authored-by: Wendell Hom <[email protected]>
  • Loading branch information
13 people committed Oct 1, 2024
1 parent 9856d17 commit f3d80c6
Show file tree
Hide file tree
Showing 354 changed files with 6,248 additions and 3,595 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
"name": "(gdb) examples/conditions/periodic/cpp",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.buildDirectory}/examples/conditions/periodic/cpp/periodic_ping",
"program": "${command:cmake.buildDirectory}/examples/conditions/periodic/cpp/ping_periodic",
"args": [],
"stopAtEntry": false,
"cwd": "${command:cmake.buildDirectory}",
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ list(APPEND HOLOSCAN_INSTALL_TARGETS
holoinfer
infer_utils
logger
nvtx3-c
nvtx3-cpp
op_async_ping_rx
op_async_ping_tx
op_bayer_demosaic
Expand All @@ -200,6 +202,7 @@ list(APPEND HOLOSCAN_INSTALL_TARGETS
op_video_stream_recorder
op_video_stream_replayer
op_v4l2
profiler
spdlog_logger
)
if(HOLOSCAN_BUILD_LIBTORCH)
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ RUN git clone --depth 1 --branch v${GRPC_VERSION} \
https://github.com/grpc/grpc.git src
RUN cmake -S src -B build -G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_VISIBILITY_PRESET=hidden \
-D CMAKE_VISIBILITY_INLINES_HIDDEN=1 \
-D gRPC_INSTALL=ON \
-D gRPC_BUILD_TESTS=OFF
RUN cmake --build build -j $(( `nproc` > ${MAX_PROC} ? ${MAX_PROC} : `nproc` ))
Expand Down Expand Up @@ -288,7 +290,8 @@ RUN install -m 0755 -d /etc/apt/keyrings \
tee /etc/apt/sources.list.d/docker.list > /dev/null

# APT INSTALLS
# valgrind - static analysis
# valgrind - dynamic analysis
# clang-tidy - static analysis
# xvfb - testing on headless systems
# libx* - X packages
# libvulkan-dev, glslang-tools - for Vulkan apps (Holoviz)
Expand All @@ -306,6 +309,7 @@ RUN install -m 0755 -d /etc/apt/keyrings \
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
valgrind="1:3.18.1-*" \
clang-tidy="1:14.0-*" \
xvfb="2:21.1.4-*" \
libx11-dev="2:1.7.5-*" \
libxcb-glx0="1.14-*" \
Expand Down
4 changes: 4 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ nvpro_core (https://github.com/nvpro-samples/nvpro_core)
Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
Licensed under Apache 2.0 (https://github.com/nvpro-samples/nvpro_core/blob/master/LICENSE)

NVTX
Copyright 2009-2022, NVIDIA CORPORATION
Licensed under Apache-2.0 (http://www.apache.org/licenses/LICENSE-2.0)

ONNX Runtime (https://github.com/microsoft/onnxruntime)
Copyright (c) Microsoft Corporation
Licensed under MIT (https://github.com/microsoft/onnxruntime/blob/v1.15.1/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.0
2.5.0
44 changes: 37 additions & 7 deletions cmake/deps/gtest_rapids.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# 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");
Expand All @@ -13,10 +13,40 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# https://docs.rapids.ai/api/rapids-cmake/stable/packages/rapids_cpm_gtest.html
include(${rapids-cmake-dir}/cpm/gtest.cmake)
include(${rapids-cmake-dir}/cpm/package_override.cmake)
# Derived from https://docs.rapids.ai/api/rapids-cmake/stable/packages/rapids_cpm_gtest
#
# Workaround for issue where `FetchContent_Declare(GTest)` does not respect `SOURCE_DIR` for caching.
# https://github.com/google/googletest/issues/4384
# https://gitlab.kitware.com/cmake/cmake/-/issues/25714
set(version 1.12.1)
rapids_cpm_find(googletest ${version}
GLOBAL_TARGETS GTest::gtest GTest::gmock GTest::gtest_main GTest::gmock_main
CPM_ARGS FIND_PACKAGE_ARGUMENTS "EXACT"
GIT_REPOSITORY "https://github.com/google/googletest.git"
GIT_TAG release-${version}
GIT_SHALLOW ON
PATCH_COMMAND ""
EXCLUDE_FROM_ALL OFF
OPTIONS "INSTALL_GTEST OFF"
)

# Propagate up variables that CPMFindPackage provide
set(googletest_SOURCE_DIR "${googletest_SOURCE_DIR}" PARENT_SCOPE)
set(googletest_BINARY_DIR "${googletest_BINARY_DIR}" PARENT_SCOPE)
set(googletest_ADDED "${googletest_ADDED}" PARENT_SCOPE)
set(googletest_VERSION ${version} PARENT_SCOPE)

if(TARGET GTest::gtest AND NOT TARGET GTest::gmock)
message(WARNING "The googletest package found doesn't provide gmock. If you run into 'GTest::gmock target not found' issues you need to use a different version of GTest.The easiest way is to request building GTest from source by adding the following to the cmake invocation:
'-DCPM_DOWNLOAD_googletest=ON'")
endif()

if(NOT TARGET GTest::gtest AND TARGET gtest)
add_library(GTest::gtest ALIAS gtest)
add_library(GTest::gtest_main ALIAS gtest_main)
endif()

# Using GTest 1.12.1
rapids_cpm_package_override("${CMAKE_SOURCE_DIR}/cmake/deps/rapids-cmake-packages.json")
rapids_cpm_gtest()
if(NOT TARGET GTest::gmock AND TARGET gmock)
add_library(GTest::gmock ALIAS gmock)
add_library(GTest::gmock_main ALIAS gmock_main)
endif()
35 changes: 35 additions & 0 deletions cmake/deps/nvtx3.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SPDX-FileCopyrightText: Copyright (c) 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.

# https://docs.rapids.ai/api/rapids-cmake/stable/command/rapids_find_package.html#
include(${rapids-cmake-dir}/cpm/find.cmake)

rapids_cpm_find(nvtx3 3.1
GLOBAL_TARGETS nvtx3-c nvtx3-cpp

CPM_ARGS
GITHUB_REPOSITORY NVIDIA/NVTX
GIT_TAG v3.1.0-c-cpp
GIT_SHALLOW TRUE
EXCLUDE_FROM_ALL
)

if(nvtx3_ADDED)
# Install the headers needed for development with the SDK
install(DIRECTORY ${nvtx3_SOURCE_DIR}/include
DESTINATION "include"
COMPONENT "holoscan-dependencies"
)
endif()
9 changes: 0 additions & 9 deletions cmake/deps/rapids-cmake-packages.json

This file was deleted.

5 changes: 4 additions & 1 deletion cmake/deps/yaml-cpp_rapids.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# 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");
Expand Down Expand Up @@ -34,10 +34,13 @@ include(${rapids-cmake-dir}/cpm/find.cmake)
# (https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_USE_PACKAGE_REGISTRY.html#variable:CMAKE_FIND_USE_PACKAGE_REGISTRY)
set(CMAKE_FIND_USE_PACKAGE_REGISTRY FALSE)

set(patch_command ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/patches/yaml-cpp.patch <SOURCE_DIR> && git apply <SOURCE_DIR>/yaml-cpp.patch)

# https://github.com/cpm-cmake/CPM.cmake/wiki/More-Snippets#yaml-cpp
set(YAML_CPP_CPM_ARGS
GITHUB_REPOSITORY jbeder/yaml-cpp
GIT_TAG yaml-cpp-0.7.0
PATCH_COMMAND ${patch_command}
OPTIONS
"YAML_CPP_BUILD_TESTS Off"
"YAML_CPP_BUILD_CONTRIB Off"
Expand Down
64 changes: 22 additions & 42 deletions cmake/modules/HoloscanCPack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,67 +59,47 @@ set(CPACK_COMPONENTS_ALL
holoscan-cpack
)

# Method to get all CUDA debian package names up to the current MAJOR-MINOR version
if(NOT DEFINED CUDAToolkit_VERSION)
find_package(CUDAToolkit REQUIRED)
endif()
function(get_minor_version_packages dep_name output_string)
foreach(minor RANGE ${CUDAToolkit_VERSION_MINOR} 0 -1)
list(APPEND packages "${dep_name}-${CUDAToolkit_VERSION_MAJOR}-${minor}")
endforeach()
list(JOIN packages " | " ${output_string})
set(${output_string} ${${output_string}} PARENT_SCOPE)
endfunction()
set(CUDA_MAJOR ${CUDAToolkit_VERSION_MAJOR})

# - cuda-nvcc: needed to find Holoscan with CMake (FindCUDAToolkit requirement)
# Note: not needed at runtime
# - cuda-cudart-dev: needed for holoscan core and some operators
# Note: only cuda-cudart (non dev) needed at runtime
get_minor_version_packages("cuda-nvcc" NVCC_PACKAGES)
get_minor_version_packages("cuda-cudart-dev" CUDART_DEV_PACKAGES)
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"${NVCC_PACKAGES}, libcudart.so.${CUDA_MAJOR}-dev | ${CUDART_DEV_PACKAGES}"
"cuda-nvcc-12-2 | cuda-nvcc-12-9 | cuda-nvcc-12-8 | cuda-nvcc-12-7 | cuda-nvcc-12-6 | cuda-nvcc-12-5 | cuda-nvcc-12-4 | cuda-nvcc-12-3 | cuda-nvcc-12-1 | cuda-nvcc-12-0, \
cuda-cudart-dev-12-2 | libcudart.so.12-dev"
)
# - libnvinfer-bin: meta package including required nvinfer libs, cublas, and cudnn.
# Needed for TensorRT and OnnxRuntime inference backends
# - cuda-nvrtc: needed by cupy
# Note: only libcudart (non dev) needed at runtime
# Note: also a dependency of cuda-nvcc
# - libcublas: needed by TensorRT and OnnxRuntime inference backends
# Needed for all inference backends
# Note: only libnvonnxparsers and libnvinfer-plugin needed at runtime
# - libcublas: needed by all inference backends
# Note: also a dependency of the libnvinfer packages
# - cuda-nvrtc: libtorch & CuPy dependency
# Note: also a dependency of cuda-nvcc
# Note: should be able to use libnvrtc.so.12, but doesn't work
# - libcufft: needed by cupy and OnnxRuntime inference backend
# - libcurand: needed by cupy
# - libcurand: needed by libtorch and cupy
# - libcusolver: needed by cupy
# - libcusparse: needed by cupy
# - libnpp-dev: needed for format_converter and bayer_demosaic operators
# Note: only libnpp (non dev) needed at runtime
# - libnvjitlink: needed by cupy
# - libgomb1: needed by cupy
# - libvulkan1 : needed for holoviz operator
# - libgomp1: needed by cupy
# - libvulkan1: needed for holoviz operator
# - libegl1: needed for holoviz operator in headless mode
# - libv4l-0: needed for v4l2 operator
# - python3-cloudpickle: needed for python distributed applications
# - python3-pip: needed for holoscan CLI (packager, runner)
get_minor_version_packages("cuda-nvrtc" NVRTC_PACKAGES)
get_minor_version_packages("libcublas" CUBLAS_PACKAGES)
get_minor_version_packages("libcufft" CUFFT_PACKAGES)
get_minor_version_packages("libcurand" CURAND_PACKAGES)
get_minor_version_packages("libcusolver" CUSOLVER_PACKAGES)
get_minor_version_packages("libcusparse" CUSPARSE_PACKAGES)
get_minor_version_packages("libnpp-dev" NPP_DEV_PACKAGES)
get_minor_version_packages("libnvjitlink" NVJITLINK_PACKAGES)
set(CPACK_DEBIAN_PACKAGE_RECOMMENDS
"libnvinfer-bin (>= 8.6.1), \
${NVRTC_PACKAGES}, \
libcublas.so.${CUDA_MAJOR} | ${CUBLAS_PACKAGES}, \
libcufft.so.${CUDA_MAJOR} | ${CUFFT_PACKAGES}, \
libcurand.so.${CUDA_MAJOR} | ${CURAND_PACKAGES}, \
libcusolver.so.${CUDA_MAJOR} | ${CUSOLVER_PACKAGES}, \
libcusparse.so.${CUDA_MAJOR} | ${CUSPARSE_PACKAGES}, \
libnpp.so.${CUDA_MAJOR}-dev | ${NPP_DEV_PACKAGES}, \
libnvJitLink.so.${CUDA_MAJOR} | ${NVJITLINK_PACKAGES}, \
libgomb1, \
set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "\
libnvinfer-bin (>=8.6), libnvinfer-bin (<<9), \
libcublas-12-2 | libcublas.so.12, \
cuda-nvrtc-12-2 | cuda-nvrtc-12-9 | cuda-nvrtc-12-8 | cuda-nvrtc-12-7 | cuda-nvrtc-12-6 | cuda-nvrtc-12-5 | cuda-nvrtc-12-4 | cuda-nvrtc-12-3 | cuda-nvrtc-12-1 | cuda-nvrtc-12-0, \
libcufft-12-2 | libcufft.so.11, \
libcurand-12-2 | libcurand.so.10, \
libcusolver-12-2 | libcusolver.so.11, \
libcusparse-12-2 | libcusparse.so.12, \
libnpp-dev-12-2 | libnpp.so.12-dev, \
libnvjitlink-12-2 | libnvjitlink.so.12, \
libgomp1, \
libvulkan1, \
libegl1, \
libv4l-0, \
Expand Down
3 changes: 2 additions & 1 deletion cmake/setup_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ superbuild_depend(ucx)
superbuild_depend(v4l2)
superbuild_depend(yaml-cpp_rapids)
superbuild_depend(gxf)
superbuild_depend(nvtx3)

# Testing dependencies
if(HOLOSCAN_BUILD_TESTS)
Expand All @@ -60,4 +61,4 @@ endif()
if(HOLOSCAN_BUILD_PYTHON)
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
superbuild_depend(pybind11)
endif()
endif()
2 changes: 1 addition & 1 deletion docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.2
# syntax=docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3e2230a333fdbcc

# SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
Expand Down
13 changes: 5 additions & 8 deletions docs/cli/hap.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@

## Introduction

The Holoscan Application Package specification extends the MONAI Deploy Application Package specification to provide
the streaming capabilities, multi-fragment and other features of the Holoscan SDK.
The Holoscan Application Package specification extends the MONAI Deploy Application Package specification to provide the streaming capabilities, multi-fragment, and other features of the Holoscan SDK.

## Overview

This document includes the specification of the Holoscan Application Package (HAP). A HAP is a containerized application
or service which is self-descriptive, as defined by this document.
This document includes the specification of the Holoscan Application Package (HAP). A HAP is a containerized application or service which is self-descriptive, as defined by this document.

### Goal

Expand Down Expand Up @@ -63,8 +61,7 @@ The following assumptions relate to HAP execution, inspection and general usage:

## Requirements

The following requirements MUST be met by the HAP specification to be considered complete and approved.
All requirements marked as `MUST` or `SHALL` MUST be implemented in order to be supported by a HAP-ready hosting service.
The following requirements MUST be met by the HAP specification to be considered complete and approved. All requirements marked as `MUST` or `SHALL` MUST be implemented in order to be supported by a HAP-ready hosting service.

### Single Artifact

Expand Down Expand Up @@ -381,7 +378,7 @@ The Application Manifest file provides information about the HAP's Application.
| `version` | No | 0.0.0 | string | semantic version | Version of the package. |

> [Notes]
> (1) Use of resource limits depend on the orchestration service or the hosting environement's configuration and implementation.
> (1) Use of resource limits depend on the orchestration service or the hosting environment's configuration and implementation.
> (2) Consider rounding up to a whole number as decimal values may not be supported by all orchestration/hosting services.
The Package Manifest file provides information about the HAP's package layout. It is not intended as a mechanism for controlling how the HAP is used or how the HAP's Application is executed.
Expand Down Expand Up @@ -602,7 +599,7 @@ A HAP SHOULD provide at least one method to access the _embedded application_, _

- `/var/run/holoscan/export/`: when detected without any of the above being detected, the Method SHALL copy all of the above.

Since a HAP is an OCI compliant container, a user can also run a HAP and log in to an interactive shell, using a method supported by the container engine and its command line interface, e.g. Docker supports this by setting the entrypoint option. The files in the HAP can then be opened or copied to the mapped volumes with shell commands or scripts. A specific implementation of a HAP may choose to streamline such a process with scripts and applicable user documentation.
Since a HAP is an OCI compliant container, a user can also run a HAP and log in to an interactive shell, using a method supported by the container engine and its command line interface; e.g., Docker supports this by setting the entrypoint option. The files in the HAP can then be opened or copied to the mapped volumes with shell commands or scripts. A specific implementation of a HAP may choose to streamline such a process with scripts and applicable user documentation.

### Table of Important Paths

Expand Down
Loading

0 comments on commit f3d80c6

Please sign in to comment.