Skip to content

Commit

Permalink
Holoscan SDK v2.0.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: Anisha Goel <[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: Ilies Chergui <[email protected]>
Co-authored-by: Julien Jomier <[email protected]>
Co-authored-by: Shekhar Dwivedi <[email protected]>
Co-authored-by: Soham Sinha <[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 Apr 18, 2024
1 parent cf61c8e commit 1e011a4
Show file tree
Hide file tree
Showing 437 changed files with 9,595 additions and 6,845 deletions.
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
"NVIDIA_DRIVER_CAPABILITIES": "graphics,video,compute,utility,display",
// Set the following environment variables to use the same folder name as the host machine.
// This is needed to launch container from the workspace folder that is not same as the SDK source root folder.
"HOLOSCAN_PUBLIC_FOLDER": "${env:HOLOSCAN_PUBLIC_FOLDER}",
"HOLOSCAN_PUBLIC_FOLDER": "${localEnv:HOLOSCAN_PUBLIC_FOLDER}",
// This is necessary to prevent memory overuse during the SDK build process.
// The `CMAKE_BUILD_PARALLEL_LEVEL` environment variable is set by the `run vscode` command.
"CMAKE_BUILD_PARALLEL_LEVEL": "${env:CMAKE_BUILD_PARALLEL_LEVEL}",
"CMAKE_BUILD_PARALLEL_LEVEL": "${localEnv:CMAKE_BUILD_PARALLEL_LEVEL}",
},
"mounts": [
"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached",
Expand All @@ -64,7 +64,7 @@
"shd101wyy.markdown-preview-enhanced",
"cschlosser.doxdocgen",
"mine.cpplint",
"benjamin-simmonds.pythoncpp-debug" , // Python/C++ debugging
"benjamin-simmonds.pythoncpp-debug", // Python/C++ debugging
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/debug_python → .vscode/debug_python
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
SCRIPT_DIR=$(dirname "$(readlink -f "$0")")

if [ -e ${SCRIPT_DIR}/debug_env.sh ]; then
# User can place debug_env.sh in the same directory as this script (scripts/debug_env.sh would be ignored in git repo)
# User can place debug_env.sh in the same directory as this script (.vscode/debug_env.sh would be ignored in git repo)
. ${SCRIPT_DIR}/debug_env.sh
fi

Expand Down
48 changes: 24 additions & 24 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${file}",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -98,7 +98,7 @@
"program": "/usr/bin/bash",
// https://github.com/catchorg/Catch2/blob/devel/docs/command-line.md#specifying-which-tests-to-run
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${command:cmake.buildDirectory}/examples/aja_capture/python/aja_capture.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -128,7 +128,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/bring_your_own_model/python/byom.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -212,7 +212,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/conditions/periodic/python/ping_periodic.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -242,7 +242,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/cupy_native/matmul.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -295,7 +295,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/flow_tracker/python/flow_tracker.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -348,7 +348,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/hello_world/python/hello_world.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -401,7 +401,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/holoviz/python/holoviz_geometry.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -431,7 +431,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/holoviz/python/holoviz_geometry_3d.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -461,7 +461,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/holoviz/python/holoviz_views.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -518,7 +518,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/multithread/python/multithread.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -552,7 +552,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/numpy_native/convolve.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -651,7 +651,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/ping_custom_op/python/ping_custom_op.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -733,7 +733,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/ping_distributed/python/ping_distributed.py",
"--driver",
"--worker",
Expand Down Expand Up @@ -793,7 +793,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/ping_multi_port/python/ping_multi_port.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -846,7 +846,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/ping_simple/python/ping_simple.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -899,7 +899,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/ping_simple_run_async/python/ping_simple_run_async.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -952,7 +952,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/ping_vector/python/ping_vector.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -1005,7 +1005,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/resources/clock/python/ping_clock.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -1058,7 +1058,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/tensor_interop/python/tensor_interop.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -1127,7 +1127,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/v4l2_camera/python/v4l2_camera.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -1188,7 +1188,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/video_replayer/python/video_replayer.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -1249,7 +1249,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/video_replayer_distributed/python/video_replayer_distributed.py",
],
"stopAtEntry": false,
Expand Down Expand Up @@ -1317,7 +1317,7 @@
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/scripts/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"-m",
"pytest",
"-v",
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@
"charconv": "cpp",
"cuchar": "cpp",
"propagate_const": "cpp",
"ranges": "cpp"
"ranges": "cpp",
"barrier": "cpp",
"latch": "cpp",
"syncstream": "cpp"
},
"git.alwaysSignOff": true,
"git.untrackedChanges": "separate",
Expand Down
1 change: 1 addition & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"env": {
"PATH": "${env:HOME}/.local/bin:${env:PATH}",
"CUDACXX": "/usr/local/cuda/bin/nvcc",
"CMAKE_BUILD_PARALLEL_LEVEL": "${env:CMAKE_BUILD_PARALLEL_LEVEL}",
}
},
"presentation": {
Expand Down
81 changes: 52 additions & 29 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ if(HOLOSCAN_BUILD_GXF_EXTENSIONS)
add_subdirectory(gxf_extensions)
endif()

# ##############################################################################
# # Configure scripts
# ##############################################################################
add_subdirectory(scripts)

# ##############################################################################
# # Package project
# ##############################################################################
Expand Down Expand Up @@ -192,6 +197,7 @@ list(APPEND HOLOSCAN_INSTALL_TARGETS
op_video_stream_recorder
op_video_stream_replayer
op_v4l2
spdlog_logger
)

if(HOLOSCAN_BUILD_LIBTORCH)
Expand Down Expand Up @@ -250,17 +256,37 @@ install(FILES ${${HOLOSCAN_PACKAGE_NAME}_BINARY_DIR}/include/holoscan/version_co

# Install GXF
install(DIRECTORY
${GXF_core_INCLUDE_DIR}/common
${GXF_core_INCLUDE_DIR}/gxf/core
${GXF_core_INCLUDE_DIR}/gxf/cuda
${GXF_core_INCLUDE_DIR}/gxf/multimedia
${GXF_core_INCLUDE_DIR}/gxf/network
${GXF_core_INCLUDE_DIR}/gxf/npp
${GXF_core_INCLUDE_DIR}/gxf/serialization
${GXF_core_INCLUDE_DIR}/gxf/std
${GXF_INCLUDE_DIR}/common
${GXF_INCLUDE_DIR}/gxf/app
${GXF_INCLUDE_DIR}/gxf/core
${GXF_INCLUDE_DIR}/gxf/cuda
${GXF_INCLUDE_DIR}/gxf/logger
${GXF_INCLUDE_DIR}/gxf/multimedia
${GXF_INCLUDE_DIR}/gxf/serialization
${GXF_INCLUDE_DIR}/gxf/std
${GXF_INCLUDE_DIR}/gxf/ucx
DESTINATION "include/gxf"
COMPONENT "holoscan-gxf_libs"
)
foreach(_component ${HOLOSCAN_GXF_COMPONENTS})
string(TOUPPER "${CMAKE_BUILD_TYPE}" _build_type)
get_target_property(GXF_${_component}_LOCATION GXF::${_component} IMPORTED_LOCATION_${_build_type})
if(NOT GXF_${_component}_LOCATION)
get_target_property(GXF_${_component}_LOCATION GXF::${_component} IMPORTED_LOCATION)
endif()
if("${_component}" STREQUAL "gxe")
install(FILES ${HOLOSCAN_GXE_LOCATION}
DESTINATION "bin"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
COMPONENT "holoscan-gxf_libs"
)
else()
install(FILES "${GXF_${_component}_LOCATION}"
DESTINATION ${HOLOSCAN_INSTALL_LIB_DIR}
COMPONENT "holoscan-gxf_libs"
)
endif()
endforeach()

# Install CMake script to build GXE applications
install(FILES "${CMAKE_SOURCE_DIR}/cmake/modules/GenerateGXEAppInstall.cmake"
Expand All @@ -286,21 +312,6 @@ DESTINATION "${HOLOSCAN_INSTALL_LIB_DIR}/cmake/holoscan"
COMPONENT "holoscan-core"
)

install(FILES "${CMAKE_SOURCE_DIR}/scripts/download_ngc_data"
"${CMAKE_SOURCE_DIR}/scripts/convert_video_to_gxf_entities.py"
"${CMAKE_SOURCE_DIR}/scripts/gxf_entity_codec.py"
DESTINATION "${HOLOSCAN_INSTALL_LIB_DIR}/cmake/holoscan"
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
COMPONENT "holoscan-core"
)

# Install CMake script to download example data from NGC
install(FILES "${CMAKE_SOURCE_DIR}/scripts/download_example_data"
DESTINATION "examples"
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
COMPONENT "holoscan-core"
)

# Define docs and hooks
set(holoscan_doc_string [=[
libholoscan: Holoscan SDK C++ API
Expand All @@ -316,19 +327,30 @@ if(NOT TARGET fmt::fmt-header-only)
add_library(fmt::fmt-header-only INTERFACE IMPORTED)
endif()

set(_GXFlibs core std multimedia cuda network npp serialization behavior_tree)
set(_GXF_components @HOLOSCAN_GXF_COMPONENTS@)

foreach(gxflib IN LISTS _GXFlibs)
if(NOT TARGET GXF::${gxflib})
add_library(GXF::${gxflib} SHARED IMPORTED)
set_target_properties(GXF::${gxflib} PROPERTIES
IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/lib/libgxf_${gxflib}.so"
foreach(gxf_component IN LISTS _GXF_components)
if(NOT TARGET GXF::${gxf_component} AND NOT (${gxf_component} STREQUAL "gxe"))
add_library(GXF::${gxf_component} SHARED IMPORTED)
set_target_properties(GXF::${gxf_component} PROPERTIES
IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/lib/libgxf_${gxf_component}.so"
IMPORTED_NO_SONAME ON
INTERFACE_INCLUDE_DIRECTORIES "${PACKAGE_PREFIX_DIR}/include;${PACKAGE_PREFIX_DIR}/include/gxf"
)
endif()
endforeach()

if(TARGET GXF::ucx)
# GXF UCX classes publicly depend on UCX headers.
# Workaround to include those headers without explicitly providing UCX targets.
# http://cdash.nvidia.com/viewBuildError.php?buildid=4461
set_property(
TARGET GXF::ucx
APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES "${PACKAGE_PREFIX_DIR}/include/3rdparty/ucx"
)
endif()

if(NOT TARGET GXF::gxe)
add_executable(GXF::gxe IMPORTED)
set_target_properties(GXF::gxe PROPERTIES
Expand All @@ -342,6 +364,7 @@ set(GXF_EXTENSIONS_DIR "${PACKAGE_PREFIX_DIR}/lib/gxf_extensions")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")

]=])
string(CONFIGURE "${holoscan_install_hook_code_string}" holoscan_install_hook_code_string @ONLY)

set(holoscan_build_hook_code_string [=[
]=])
Expand Down
Loading

0 comments on commit 1e011a4

Please sign in to comment.