holoscan 2.6.0__cp312-cp312-manylinux_2_35_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. holoscan-2.6.0.data/purelib/holoscan/__init__.py +133 -0
  2. holoscan-2.6.0.data/purelib/holoscan/cli/__init__.py +32 -0
  3. holoscan-2.6.0.data/purelib/holoscan/cli/__main__.py +159 -0
  4. holoscan-2.6.0.data/purelib/holoscan/cli/common/argparse_types.py +153 -0
  5. holoscan-2.6.0.data/purelib/holoscan/cli/common/artifact_sources.py +149 -0
  6. holoscan-2.6.0.data/purelib/holoscan/cli/common/constants.py +119 -0
  7. holoscan-2.6.0.data/purelib/holoscan/cli/common/dockerutils.py +509 -0
  8. holoscan-2.6.0.data/purelib/holoscan/cli/common/enum_types.py +52 -0
  9. holoscan-2.6.0.data/purelib/holoscan/cli/common/exceptions.py +130 -0
  10. holoscan-2.6.0.data/purelib/holoscan/cli/common/sdk_utils.py +180 -0
  11. holoscan-2.6.0.data/purelib/holoscan/cli/common/utils.py +130 -0
  12. holoscan-2.6.0.data/purelib/holoscan/cli/logging.json +37 -0
  13. holoscan-2.6.0.data/purelib/holoscan/cli/nics/__init__.py +18 -0
  14. holoscan-2.6.0.data/purelib/holoscan/cli/nics/nics.py +34 -0
  15. holoscan-2.6.0.data/purelib/holoscan/cli/packager/__init__.py +18 -0
  16. holoscan-2.6.0.data/purelib/holoscan/cli/packager/arguments.py +137 -0
  17. holoscan-2.6.0.data/purelib/holoscan/cli/packager/config_reader.py +181 -0
  18. holoscan-2.6.0.data/purelib/holoscan/cli/packager/container_builder.py +368 -0
  19. holoscan-2.6.0.data/purelib/holoscan/cli/packager/manifest_files.py +220 -0
  20. holoscan-2.6.0.data/purelib/holoscan/cli/packager/models.py +93 -0
  21. holoscan-2.6.0.data/purelib/holoscan/cli/packager/package_command.py +189 -0
  22. holoscan-2.6.0.data/purelib/holoscan/cli/packager/packager.py +122 -0
  23. holoscan-2.6.0.data/purelib/holoscan/cli/packager/parameters.py +558 -0
  24. holoscan-2.6.0.data/purelib/holoscan/cli/packager/platforms.py +402 -0
  25. holoscan-2.6.0.data/purelib/holoscan/cli/packager/templates/Dockerfile.jinja2 +470 -0
  26. holoscan-2.6.0.data/purelib/holoscan/cli/packager/templates/dockerignore +93 -0
  27. holoscan-2.6.0.data/purelib/holoscan/cli/packager/templates/tools.sh +416 -0
  28. holoscan-2.6.0.data/purelib/holoscan/cli/py.typed +0 -0
  29. holoscan-2.6.0.data/purelib/holoscan/cli/runner/__init__.py +18 -0
  30. holoscan-2.6.0.data/purelib/holoscan/cli/runner/resources.py +174 -0
  31. holoscan-2.6.0.data/purelib/holoscan/cli/runner/run_command.py +203 -0
  32. holoscan-2.6.0.data/purelib/holoscan/cli/runner/runner.py +306 -0
  33. holoscan-2.6.0.data/purelib/holoscan/cli/version/__init__.py +18 -0
  34. holoscan-2.6.0.data/purelib/holoscan/cli/version/version.py +50 -0
  35. holoscan-2.6.0.data/purelib/holoscan/conditions/__init__.py +57 -0
  36. holoscan-2.6.0.data/purelib/holoscan/core/__init__.py +430 -0
  37. holoscan-2.6.0.data/purelib/holoscan/decorator.py +592 -0
  38. holoscan-2.6.0.data/purelib/holoscan/executors/__init__.py +26 -0
  39. holoscan-2.6.0.data/purelib/holoscan/graphs/__init__.py +32 -0
  40. holoscan-2.6.0.data/purelib/holoscan/gxf/__init__.py +57 -0
  41. holoscan-2.6.0.data/purelib/holoscan/lib/gxf_extensions/libgxf_holoscan_wrapper.so +0 -0
  42. holoscan-2.6.0.data/purelib/holoscan/lib/gxf_extensions/libgxf_holoscan_wrapper_lib.so +0 -0
  43. holoscan-2.6.0.data/purelib/holoscan/lib/gxf_extensions/libgxf_ucx_holoscan.so +0 -0
  44. holoscan-2.6.0.data/purelib/holoscan/lib/gxf_extensions/libgxf_ucx_holoscan_lib.so +0 -0
  45. holoscan-2.6.0.data/purelib/holoscan/lib/libgxf_app.so +0 -0
  46. holoscan-2.6.0.data/purelib/holoscan/lib/libgxf_core.so +0 -0
  47. holoscan-2.6.0.data/purelib/holoscan/lib/libgxf_cuda.so +0 -0
  48. holoscan-2.6.0.data/purelib/holoscan/lib/libgxf_logger.so +0 -0
  49. holoscan-2.6.0.data/purelib/holoscan/lib/libgxf_multimedia.so +0 -0
  50. holoscan-2.6.0.data/purelib/holoscan/lib/libgxf_rmm.so +0 -0
  51. holoscan-2.6.0.data/purelib/holoscan/lib/libgxf_sample.so +0 -0
  52. holoscan-2.6.0.data/purelib/holoscan/lib/libgxf_serialization.so +0 -0
  53. holoscan-2.6.0.data/purelib/holoscan/lib/libgxf_std.so +0 -0
  54. holoscan-2.6.0.data/purelib/holoscan/lib/libgxf_ucx.so +0 -0
  55. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_core.so.2.6.0 +0 -0
  56. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_infer.so.2.6.0 +0 -0
  57. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_infer_onnx_runtime.so.2.6.0 +0 -0
  58. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_infer_torch.so.2.6.0 +0 -0
  59. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_infer_utils.so.2.6.0 +0 -0
  60. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_logger.so.2.6.0 +0 -0
  61. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_aja.so.2.6.0 +0 -0
  62. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_async_ping_rx.so.2.6.0 +0 -0
  63. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_async_ping_tx.so.2.6.0 +0 -0
  64. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_bayer_demosaic.so.2.6.0 +0 -0
  65. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_format_converter.so.2.6.0 +0 -0
  66. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_gxf_codelet.so.2.6.0 +0 -0
  67. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_holoviz.so.2.6.0 +0 -0
  68. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_inference.so.2.6.0 +0 -0
  69. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_inference_processor.so.2.6.0 +0 -0
  70. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_ping_rx.so.2.6.0 +0 -0
  71. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_ping_tensor_rx.so.2.6.0 +0 -0
  72. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_ping_tensor_tx.so.2.6.0 +0 -0
  73. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_ping_tx.so.2.6.0 +0 -0
  74. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_segmentation_postprocessor.so.2.6.0 +0 -0
  75. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_v4l2.so.2.6.0 +0 -0
  76. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_video_stream_recorder.so.2.6.0 +0 -0
  77. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_op_video_stream_replayer.so.2.6.0 +0 -0
  78. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_profiler.so.2.6.0 +0 -0
  79. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_spdlog_logger.so.2.6.0 +0 -0
  80. holoscan-2.6.0.data/purelib/holoscan/lib/libholoscan_viz.so.2.6.0 +0 -0
  81. holoscan-2.6.0.data/purelib/holoscan/lib/libucm.so.0.0.0 +0 -0
  82. holoscan-2.6.0.data/purelib/holoscan/lib/libucp.so.0.0.0 +0 -0
  83. holoscan-2.6.0.data/purelib/holoscan/lib/libucs.so.0.0.0 +0 -0
  84. holoscan-2.6.0.data/purelib/holoscan/lib/libucs_signal.so.0.0.0 +0 -0
  85. holoscan-2.6.0.data/purelib/holoscan/lib/libuct.so.0.0.0 +0 -0
  86. holoscan-2.6.0.data/purelib/holoscan/lib/libyaml-cpp.so.0.7.0 +0 -0
  87. holoscan-2.6.0.data/purelib/holoscan/lib/ucx/libucm_cuda.so.0.0.0 +0 -0
  88. holoscan-2.6.0.data/purelib/holoscan/lib/ucx/libucs_fuse.so.0.0.0 +0 -0
  89. holoscan-2.6.0.data/purelib/holoscan/lib/ucx/libuct_cma.so.0.0.0 +0 -0
  90. holoscan-2.6.0.data/purelib/holoscan/lib/ucx/libuct_cuda.so.0.0.0 +0 -0
  91. holoscan-2.6.0.data/purelib/holoscan/lib/ucx/libuct_cuda_gdrcopy.so.0.0.0 +0 -0
  92. holoscan-2.6.0.data/purelib/holoscan/lib/ucx/libuct_ib.so.0.0.0 +0 -0
  93. holoscan-2.6.0.data/purelib/holoscan/lib/ucx/libuct_rdmacm.so.0.0.0 +0 -0
  94. holoscan-2.6.0.data/purelib/holoscan/lib/ucx/libuct_xpmem.so.0.0.0 +0 -0
  95. holoscan-2.6.0.data/purelib/holoscan/lib/ucx/libucx_perftest_cuda.so.0.0.0 +0 -0
  96. holoscan-2.6.0.data/purelib/holoscan/logger/__init__.py +37 -0
  97. holoscan-2.6.0.data/purelib/holoscan/network_contexts/__init__.py +28 -0
  98. holoscan-2.6.0.data/purelib/holoscan/operators/__init__.py +97 -0
  99. holoscan-2.6.0.data/purelib/holoscan/operators/aja_source/__init__.py +22 -0
  100. holoscan-2.6.0.data/purelib/holoscan/operators/bayer_demosaic/__init__.py +24 -0
  101. holoscan-2.6.0.data/purelib/holoscan/operators/format_converter/__init__.py +23 -0
  102. holoscan-2.6.0.data/purelib/holoscan/operators/gxf_codelet/__init__.py +67 -0
  103. holoscan-2.6.0.data/purelib/holoscan/operators/holoviz/__init__.py +424 -0
  104. holoscan-2.6.0.data/purelib/holoscan/operators/inference/__init__.py +23 -0
  105. holoscan-2.6.0.data/purelib/holoscan/operators/inference_processor/__init__.py +23 -0
  106. holoscan-2.6.0.data/purelib/holoscan/operators/ping_rx/__init__.py +45 -0
  107. holoscan-2.6.0.data/purelib/holoscan/operators/ping_tensor_rx/__init__.py +22 -0
  108. holoscan-2.6.0.data/purelib/holoscan/operators/ping_tensor_tx/__init__.py +22 -0
  109. holoscan-2.6.0.data/purelib/holoscan/operators/ping_tx/__init__.py +46 -0
  110. holoscan-2.6.0.data/purelib/holoscan/operators/segmentation_postprocessor/__init__.py +23 -0
  111. holoscan-2.6.0.data/purelib/holoscan/operators/v4l2_video_capture/__init__.py +23 -0
  112. holoscan-2.6.0.data/purelib/holoscan/operators/video_stream_recorder/__init__.py +22 -0
  113. holoscan-2.6.0.data/purelib/holoscan/operators/video_stream_replayer/__init__.py +22 -0
  114. holoscan-2.6.0.data/purelib/holoscan/resources/__init__.py +147 -0
  115. holoscan-2.6.0.data/purelib/holoscan/schedulers/__init__.py +32 -0
  116. holoscan-2.6.0.data/purelib/holoscan-2.6.0.pth +1 -0
  117. holoscan-2.6.0.dist-info/LICENSE.txt +202 -0
  118. holoscan-2.6.0.dist-info/METADATA +125 -0
  119. holoscan-2.6.0.dist-info/NOTICE.txt +174 -0
  120. holoscan-2.6.0.dist-info/NVIDIA-AI-PRODUCT-EULA.txt +243 -0
  121. holoscan-2.6.0.dist-info/RECORD +126 -0
  122. holoscan-2.6.0.dist-info/WHEEL +5 -0
  123. holoscan-2.6.0.dist-info/axle.lck +0 -0
  124. holoscan-2.6.0.dist-info/entry_points.txt +3 -0
  125. holoscan-2.6.0.dist-info/symlinks.txt +82 -0
  126. holoscan-2.6.0.dist-info/top_level.txt +3 -0
@@ -0,0 +1,470 @@
1
+ {#
2
+ SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
+ SPDX-License-Identifier: Apache-2.0
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ #}
17
+
18
+ ARG GPU_TYPE=dgpu
19
+
20
+ {% if application_type == 'CppCMake' %}
21
+ # Build C++ application in the builder stage
22
+ FROM {{ build_image }} AS builder
23
+ ENV DEBIAN_FRONTEND=noninteractive
24
+
25
+ RUN apt-get update && \
26
+ apt-get install -y --no-install-recommends jq
27
+
28
+ WORKDIR /src
29
+ COPY ./app/* /src
30
+
31
+ RUN mkdir -p /install/.cmake/api/v1/query/ && \
32
+ touch /install/.cmake/api/v1/query/codemodel-v2
33
+ RUN cd /src && \
34
+ cmake -S . -DHOLOHUB_DOWNLOAD_DATASETS=OFF {{ cmake_args }} -B /install && \
35
+ cmake --build /install -j && \
36
+ export OUTNAME=$(cat $(find /install/.cmake/api/v1/reply -type f | xargs grep -l "nameOnDisk") | jq -r '.nameOnDisk') && \
37
+ cd /install && \
38
+ if [ "${OUTNAME}" != "{{ command_filename }}" ]; then mv ./${OUTNAME} ./{{ command_filename }}; fi
39
+
40
+ RUN rm /install/CMakeCache.txt /install/Makefile /install/cmake_install.cmake && \
41
+ rm -r /install/CMakeFiles/ /install/.cmake/
42
+ {% endif %}
43
+
44
+
45
+
46
+ FROM {{ base_image }} AS base
47
+
48
+ RUN apt-get update \
49
+ && apt-get install -y --no-install-recommends --no-install-suggests \
50
+ curl \
51
+ jq \
52
+ && rm -rf /var/lib/apt/lists/*
53
+
54
+ {% if 'torch' in includes %}
55
+ # Collect torch dependencies: libtorch, torchvision
56
+ FROM base AS torch-dependencies
57
+
58
+ ARG GPU_TYPE
59
+ ARG TORCHVISION_VERSION=0.20.0_24.08
60
+ ARG LIBTORCH_VERSION=2.5.0_24.08
61
+
62
+ # Install openmpi
63
+ RUN apt update && \
64
+ apt-get install -y --no-install-recommends --no-install-suggests \
65
+ bzip2 \
66
+ libopenmpi3=4.1.2-* \
67
+ && rm -rf /var/lib/apt/lists/*
68
+
69
+ # Download libtorch
70
+ WORKDIR /opt/libtorch/
71
+ RUN ARCH={{ target_arch }} && if [ "$ARCH" = "aarch64" ]; then ARCH="aarch64-${GPU_TYPE}"; fi && \
72
+ curl -S -# -o libtorch.tgz -L \
73
+ https://edge.urm.nvidia.com/artifactory/sw-holoscan-thirdparty-generic-local/libtorch/libtorch-${LIBTORCH_VERSION}-${ARCH}.tar.gz
74
+ RUN mkdir -p ${LIBTORCH_VERSION} && \
75
+ tar -xf libtorch.tgz -C ${LIBTORCH_VERSION} --strip-components 1 && \
76
+ rm -f libtorch.tgz && \
77
+ find . -type f -name "*Config.cmake" -exec sed -i '/kineto/d' {} +
78
+
79
+ # Download torchvision
80
+ WORKDIR /opt/torchvision/
81
+ RUN ARCH={{ target_arch }} && if [ "$ARCH" = "aarch64" ]; then ARCH="aarch64-${GPU_TYPE}"; fi && \
82
+ curl -S -# -o torchvision.tgz -L \
83
+ https://edge.urm.nvidia.com/artifactory/sw-holoscan-thirdparty-generic-local/torchvision/torchvision-${TORCHVISION_VERSION}-${ARCH}.tar.gz
84
+ RUN mkdir -p ${TORCHVISION_VERSION}
85
+ RUN tar -xf torchvision.tgz -C ${TORCHVISION_VERSION} --strip-components 1 && \
86
+ rm -f torchvision.tgz
87
+
88
+ # Download HPCX for libucc.so.1
89
+ WORKDIR /opt/hpcx
90
+ RUN curl -S -# -o hpcx.tbz -L \
91
+ https://www.mellanox.com/downloads/hpc/hpc-x/v2.15/hpcx-v2.15-gcc-inbox-ubuntu22.04-cuda12-gdrcopy2-nccl2.17-{{target_arch}}.tbz && \
92
+ tar -xvjf hpcx.tbz hpcx-v2.15-gcc-inbox-ubuntu22.04-cuda12-gdrcopy2-nccl2.17-{{target_arch}}/ucc/lib/libucc.so.1.0.0 && \
93
+ rm -f hpcx.tbz && \
94
+ find . -name libucc.so.1.0.0 -exec mv -f {} /opt/hpcx/libucc.so.1 \;
95
+
96
+ # End collect torch dependencies
97
+ {% endif %}
98
+
99
+
100
+ {% if 'onnx' in includes %}
101
+ # Collect onnx dependencies
102
+ FROM base AS onnx-dependencies
103
+ ARG GPU_TYPE
104
+ ARG ONNX_RUNTIME_VERSION=1.18.1_38712740_24.08-cuda-12.6
105
+
106
+ WORKDIR /opt/onnxruntime
107
+
108
+ # Download onnx binaries
109
+ RUN curl -S -L -# -o ort.tar.gz \
110
+ https://edge.urm.nvidia.com/artifactory/sw-holoscan-thirdparty-generic-local/onnxruntime/onnxruntime-${ONNX_RUNTIME_VERSION}-$(uname -m).tar.gz
111
+ RUN mkdir -p ${ONNX_RUNTIME_VERSION}
112
+ RUN ls -l && tar -xvzf ort.tar.gz -C ${ONNX_RUNTIME_VERSION} --strip-components 2 && \
113
+ rm -f ort.tar.gz
114
+ WORKDIR /
115
+ # End collect onnx dependencies
116
+ {% endif %}
117
+
118
+ # FROM base AS mofed-installer
119
+ # ARG MOFED_VERSION=23.10-2.1.3.1
120
+
121
+ # # In a container, we only need to install the user space libraries, though the drivers are still
122
+ # # needed on the host.
123
+ # # Note: MOFED's installation is not easily portable, so we can't copy the output of this stage
124
+ # # to our final stage, but must inherit from it. For that reason, we keep track of the build/install
125
+ # # only dependencies in the `MOFED_DEPS` variable (parsing the output of `--check-deps-only`) to
126
+ # # remove them in that same layer, to ensure they are not propagated in the final image.
127
+ # WORKDIR /opt/nvidia/mofed
128
+ # ARG MOFED_INSTALL_FLAGS="--dpdk --with-mft --user-space-only --force --without-fw-update"
129
+ # RUN UBUNTU_VERSION=$(cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -d= -f2) \
130
+ # && OFED_PACKAGE="MLNX_OFED_LINUX-${MOFED_VERSION}-ubuntu${UBUNTU_VERSION}-$(uname -m)" \
131
+ # && curl -S -# -o ${OFED_PACKAGE}.tgz -L \
132
+ # https://www.mellanox.com/downloads/ofed/MLNX_OFED-${MOFED_VERSION}/${OFED_PACKAGE}.tgz \
133
+ # && tar xf ${OFED_PACKAGE}.tgz \
134
+ # && MOFED_INSTALLER=$(find . -name mlnxofedinstall -type f -executable -print) \
135
+ # && MOFED_DEPS=$(${MOFED_INSTALLER} ${MOFED_INSTALL_FLAGS} --check-deps-only 2>/dev/null | tail -n1 | cut -d' ' -f3-) \
136
+ # && apt-get update \
137
+ # && apt-get install --no-install-recommends -y ${MOFED_DEPS} \
138
+ # && ${MOFED_INSTALLER} ${MOFED_INSTALL_FLAGS} \
139
+ # && rm -r * \
140
+ # && apt-get remove -y ${MOFED_DEPS} && apt-get autoremove -y \
141
+ # && rm -rf /var/lib/apt/lists/*
142
+
143
+ FROM base AS release
144
+ ENV DEBIAN_FRONTEND=noninteractive
145
+ ENV TERM=xterm-256color
146
+
147
+ ARG GPU_TYPE
148
+ ARG UNAME
149
+ ARG UID
150
+ ARG GID
151
+
152
+ RUN mkdir -p /etc/holoscan/ \
153
+ && mkdir -p /opt/holoscan/ \
154
+ && mkdir -p {{ working_dir }} \
155
+ && mkdir -p {{ app_dir }} \
156
+ && mkdir -p {{ full_input_path }} \
157
+ && mkdir -p {{ full_output_path }}
158
+
159
+ LABEL base="{{ base_image }}"
160
+ LABEL tag="{{ tag }}"
161
+ LABEL org.opencontainers.image.title="{{ title }}"
162
+ LABEL org.opencontainers.image.version="{{ version }}"
163
+ LABEL org.nvidia.holoscan="{{ holoscan_sdk_version }}"
164
+
165
+ {% if sdk_type == 'monai-deploy' %}
166
+ LABEL org.monai.deploy.app-sdk="{{ monai_deploy_app_sdk_version }}"
167
+ {% endif %}
168
+
169
+ ENV HOLOSCAN_ENABLE_HEALTH_CHECK=true
170
+ ENV HOLOSCAN_INPUT_PATH={{ full_input_path }}
171
+ ENV HOLOSCAN_OUTPUT_PATH={{ full_output_path }}
172
+ ENV HOLOSCAN_WORKDIR={{ working_dir }}
173
+ ENV HOLOSCAN_APPLICATION={{ app_dir }}
174
+ ENV HOLOSCAN_TIMEOUT={{ timeout }}
175
+ ENV HOLOSCAN_MODEL_PATH={{ models_dir }}
176
+ ENV HOLOSCAN_DOCS_PATH={{ docs_dir }}
177
+ ENV HOLOSCAN_CONFIG_PATH={{ config_file_path }}
178
+ ENV HOLOSCAN_APP_MANIFEST_PATH={{ app_json }}
179
+ ENV HOLOSCAN_PKG_MANIFEST_PATH={{ pkg_json }}
180
+ ENV HOLOSCAN_LOGS_PATH={{ logs_dir }}
181
+ ENV HOLOSCAN_VERSION={{ holoscan_sdk_version }}
182
+
183
+ {% if 'debug' in includes %}
184
+ # Install debugging tools
185
+ RUN apt-get update \
186
+ && apt-get install -y --no-install-recommends --no-install-suggests \
187
+ build-essential \
188
+ ccache \
189
+ gdb \
190
+ strace \
191
+ sudo \
192
+ && rm -rf /var/lib/apt/lists/*
193
+ ### End install debugging tools
194
+ {% endif %}
195
+
196
+
197
+ {% if 'holoviz' in includes %}
198
+ # Install Holoviz dependencies
199
+ RUN apt-get update \
200
+ && apt-get install --no-install-recommends --no-install-suggests --allow-downgrades --allow-change-held-packages -y \
201
+ libvulkan1="1.3.204.1-*" \
202
+ # X11 support \
203
+ libgl1="1.4.0-*" \
204
+ # Wayland support \
205
+ libwayland-client0="1.20.0-*" \
206
+ libwayland-egl1="1.20.0-*" \
207
+ libxkbcommon0="1.4.0-*" \
208
+ libdecor-0-plugin-1-cairo="0.1.0-*" \
209
+ libegl1="1.4.0-*" \
210
+ && rm -rf /var/lib/apt/lists/*
211
+ # End install Holoviz dependencies
212
+ {% endif %}
213
+
214
+
215
+ {% if 'torch' in includes %}
216
+ # Install torch dependencies
217
+ ENV PYTHON_VERSION=3.10.6-1~22.04
218
+ ENV PYTHON_PIP_VERSION=22.0.2+dfsg-1ubuntu0.4
219
+
220
+ RUN apt update \
221
+ && apt-get install -y --no-install-recommends --no-install-suggests \
222
+ python3-minimal=${PYTHON_VERSION} \
223
+ libpython3-stdlib=${PYTHON_VERSION} \
224
+ python3=${PYTHON_VERSION} \
225
+ python3-venv=${PYTHON_VERSION} \
226
+ python3-pip=${PYTHON_PIP_VERSION} \
227
+ libjpeg-turbo8="2.1.2-*" \
228
+ libnuma1="2.0.14-*" \
229
+ libhwloc15="2.7.0-*" \
230
+ libopenblas0="0.3.20+ds-*" \
231
+ libevent-core-2.1-7 \
232
+ libevent-pthreads-2.1-7 \
233
+ cuda-cupti-12-6 \
234
+ libcudnn9-cuda-12 \
235
+ && rm -rf /var/lib/apt/lists/*
236
+
237
+ # Install NVIDIA Performance Libraries on arm64 dGPU platform
238
+ # as a runtime requirement for the Holoinfer `libtorch` backend (2.5.0).
239
+ {% if target_arch == "aarch64" and gpu_type == "dgpu" %}
240
+ RUN curl -L https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/sbsa/cuda-keyring_1.1-1_all.deb -O \
241
+ && dpkg -i cuda-keyring_1.1-1_all.deb \
242
+ && apt-get update \
243
+ && apt-get install --no-install-recommends -y \
244
+ nvpl-blas=0.2.0.1-* \
245
+ nvpl-lapack=0.2.2.1-* \
246
+ && rm -rf /var/lib/apt/lists/*
247
+ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/sbsa-linux-gnu/
248
+ {% endif %}
249
+
250
+ # mkl - dependency for libtorch plugin on x86_64 (match pytorch container version)
251
+ RUN if [ "{{ cuda_deb_arch }}" = "x86_64" ]; then \
252
+ python3 -m pip install --no-cache-dir \
253
+ mkl==2021.1.1 \
254
+ && \
255
+ # Clean up duplicate libraries from mkl/tbb python wheel install which makes copies for symlinks.
256
+ # Only keep the *.so.X libs, remove the *.so and *.so.X.Y libs
257
+ # This can be removed once upgrading to an MKL pip wheel that fixes the symlinks
258
+ find /usr/local/lib -maxdepth 1 -type f -regex '.*\/lib\(tbb\|mkl\).*\.so\(\.[0-9]+\.[0-9]+\)?' -exec rm -v {} +; \
259
+ fi
260
+
261
+ # Copy Libtorch
262
+ ARG LIBTORCH_VERSION=2.5.0_24.08
263
+ ENV LIBTORCH=/opt/libtorch/${LIBTORCH_VERSION}/lib
264
+ COPY --from=torch-dependencies ${LIBTORCH} ${LIBTORCH}
265
+
266
+ # Copy TorchVision
267
+ ARG TORCHVISION_VERSION=0.20.0_24.08
268
+ ENV TORCHVISION=/opt/torchvision/${TORCHVISION_VERSION}/lib
269
+ COPY --from=torch-dependencies ${TORCHVISION} ${TORCHVISION}
270
+
271
+ ENV HPCX=/opt/hpcx/lib
272
+ COPY --from=torch-dependencies /opt/hpcx/libucc.so.1 ${LIBTORCH}/libucc.so.1
273
+ COPY --from=torch-dependencies /usr/lib/{{target_arch}}-linux-gnu/libmpi.so.40 ${LIBTORCH}/libmpi.so.40
274
+ COPY --from=torch-dependencies /usr/lib/{{target_arch}}-linux-gnu/libopen-rte.so.40 ${LIBTORCH}/libopen-rte.so.40
275
+ COPY --from=torch-dependencies /usr/lib/{{target_arch}}-linux-gnu/libopen-pal.so.40 ${LIBTORCH}/libopen-pal.so.40
276
+
277
+ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${LIBTORCH}:${TORCHVISION}:${HPCX}
278
+ WORKDIR /
279
+ ### End install torch dependencies
280
+ {% endif %}
281
+
282
+
283
+ {% if 'onnx' in includes %}
284
+ # Install onnx dependencies
285
+ ARG ONNX_RUNTIME_VERSION=1.18.1_38712740_24.08-cuda-12.6
286
+ ENV ONNX_RUNTIME=/opt/onnxruntime/${ONNX_RUNTIME_VERSION}/lib
287
+ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${ONNX_RUNTIME}
288
+
289
+ # Copy ONNX Runtime
290
+ COPY --from=onnx-dependencies ${ONNX_RUNTIME} ${ONNX_RUNTIME}
291
+
292
+ {% if gpu_type == "dgpu" %}
293
+ RUN apt-get update \
294
+ && apt-get install --no-install-recommends --no-install-suggests --allow-downgrades -y \
295
+ libnvinfer10="10.3.*+cuda12.5" \
296
+ libnvinfer-plugin10="10.3.*+cuda12.5" \
297
+ libnvonnxparsers10="10.3.*+cuda12.5" \
298
+ libcusparselt0="0.6.2.3-*" \
299
+ libcudnn9-cuda-12 \
300
+ && rm -rf /var/lib/apt/lists/* \
301
+ && rm -f /usr/lib/*/libcudnn*train.so*
302
+ {% endif %}
303
+ ### End install onnx dependencies
304
+ {% endif %}
305
+
306
+ {% if health_probe is defined %}
307
+ # Install gRPC health probe
308
+ RUN curl -L -o /bin/grpc_health_probe {{ health_probe | pprint }} \
309
+ && chmod +x /bin/grpc_health_probe && ls -l /bin/grpc_health_probe
310
+
311
+ HEALTHCHECK --interval=10s --timeout=1s \
312
+ CMD /bin/grpc_health_probe -addr=:8777 || exit 1
313
+
314
+ # End install gRPC health probe
315
+ {% endif %}
316
+
317
+ {% if application_type == 'PythonModule' or application_type == 'PythonFile' %}
318
+ {% if not 'torch' in includes %}
319
+ # If torch is installed, we can skip installing Python
320
+ ENV PYTHON_VERSION=3.10.6-1~22.04
321
+ ENV PYTHON_PIP_VERSION=22.0.2+dfsg-1ubuntu0.4
322
+
323
+ RUN apt update \
324
+ && apt-get install -y --no-install-recommends --no-install-suggests \
325
+ python3-minimal=${PYTHON_VERSION} \
326
+ libpython3-stdlib=${PYTHON_VERSION} \
327
+ python3=${PYTHON_VERSION} \
328
+ python3-venv=${PYTHON_VERSION} \
329
+ python3-pip=${PYTHON_PIP_VERSION} \
330
+ && rm -rf /var/lib/apt/lists/*
331
+ {% endif %}
332
+
333
+ {% if holoscan_deb_arch == "arm64" %}
334
+ # Requires python3-dev on aarch64
335
+ RUN apt update \
336
+ && apt-get install -y --no-install-recommends --no-install-suggests \
337
+ gcc \
338
+ python3-dev \
339
+ && rm -rf /var/lib/apt/lists/*
340
+ {% endif %}
341
+
342
+ {% endif %}
343
+
344
+ {% if application_type == 'CppCMake' or application_type == 'Binary' %}
345
+
346
+ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/nvidia/holoscan/lib
347
+
348
+ # Update NV GPG repo key
349
+ # https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
350
+ RUN curl -OL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/{{ cuda_deb_arch }}/cuda-keyring_1.1-1_all.deb \
351
+ && dpkg -i cuda-keyring_1.1-1_all.deb \
352
+ && rm -f cuda-keyring_1.1-1_all.deb \
353
+ && apt-get update
354
+
355
+ RUN if [ "{{ holoscan_deb_arch }}" = "arm64" ]; then \
356
+ GDR_REPO_ARCH=aarch64 ; \
357
+ else \
358
+ GDR_REPO_ARCH=x64 ; \
359
+ fi \
360
+ && curl -O https://developer.download.nvidia.com/compute/redist/gdrcopy/CUDA%2012.2/ubuntu22_04/${GDR_REPO_ARCH}/libgdrapi_2.4-1_{{ holoscan_deb_arch }}.Ubuntu22_04.deb \
361
+ && dpkg -i libgdrapi_2.4-1_{{ holoscan_deb_arch }}.Ubuntu22_04.deb \
362
+ && rm -f libgdrapi_2.4-1_{{ holoscan_deb_arch }}.Ubuntu22_04.deb
363
+
364
+ {% if custom_holoscan_sdk == True %}
365
+
366
+ # Use user-specified Holoscan SDK Debian Package
367
+ COPY ./{{ holoscan_sdk_filename }} /tmp/{{ holoscan_sdk_filename }}
368
+ RUN apt-get install -y --no-install-recommends --no-install-suggests \
369
+ /tmp/{{ holoscan_sdk_filename }} \
370
+ && rm -rf /var/lib/apt/lists/*
371
+
372
+ {% else %}
373
+
374
+ # Install Holoscan SDK from NVIDIA APT repository
375
+ # Holoscan: available versions (https://pypi.org/project/holoscan/#history)
376
+ RUN apt-get install -y --no-install-recommends --no-install-suggests \
377
+ holoscan={{ holoscan_sdk_filename }} \
378
+ # && apt-get remove -y g++ g++-11 gcc gcc-11 gcc-11-base build-essential \
379
+ && apt-get purge -y cuda-keyring \
380
+ && rm -rf /var/lib/apt/lists/*
381
+
382
+ {% endif %}
383
+
384
+ {% endif %}
385
+
386
+
387
+ {% if holoscan_deb_arch == "arm64" %}
388
+ # Requires libnuma on aarch64
389
+ RUN apt update \
390
+ && apt-get install -y --no-install-recommends --no-install-suggests \
391
+ libnuma1="2.0.14-*" \
392
+ && rm -rf /var/lib/apt/lists/*
393
+ {% endif %}
394
+
395
+
396
+ RUN groupadd -f -g $GID $UNAME
397
+ RUN useradd -rm -d /home/$UNAME -s /bin/bash -g $GID -G sudo -u $UID $UNAME
398
+ RUN chown -R holoscan {{ working_dir }} && \
399
+ chown -R holoscan {{ full_input_path }} && \
400
+ chown -R holoscan {{ full_output_path }}
401
+
402
+ # Set the working directory
403
+ WORKDIR {{ working_dir }}
404
+
405
+ # Copy HAP/MAP tool script
406
+ COPY ./tools {{ working_dir }}/tools
407
+ RUN chmod +x {{ working_dir }}/tools
408
+
409
+ # Set the working directory
410
+ WORKDIR {{ working_dir }}
411
+
412
+ USER $UNAME
413
+
414
+ ENV PATH=/home/${UNAME}/.local/bin:/opt/nvidia/holoscan/bin:$PATH
415
+ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{{ app_dir }}:/home/${UNAME}/.local/lib/python3.10/site-packages/holoscan/lib
416
+ ENV PYTHONPATH="{{ app_dir }}:${PYTHONPATH}"
417
+
418
+ {% if application_type == 'PythonModule' or application_type == 'PythonFile' %}
419
+ COPY ./pip/requirements.txt /tmp/requirements.txt
420
+
421
+ RUN pip install --upgrade pip
422
+ RUN pip install --no-cache-dir --user -r /tmp/requirements.txt
423
+
424
+ {% if sdk_type == 'holoscan' %}
425
+ # Install Holoscan SDK
426
+
427
+ {% if custom_holoscan_sdk == True %}
428
+ # Copy user-specified Holoscan SDK wheel file
429
+ COPY ./{{ holoscan_sdk_filename }} /tmp/{{ holoscan_sdk_filename }}
430
+ RUN pip install /tmp/{{ holoscan_sdk_filename }}
431
+
432
+ {% else %}
433
+ # Install Holoscan SDK wheel from PyPI
434
+ RUN pip install holoscan=={{holoscan_sdk_filename}}
435
+ {% endif %}
436
+ {% else %}
437
+
438
+ # Install MONAI Deploy App SDK
439
+ {% if custom_monai_deploy_sdk == True %}
440
+ # Copy user-specified MONAI Deploy SDK file
441
+ COPY ./{{ monai_deploy_sdk_filename }} /tmp/{{ monai_deploy_sdk_filename }}
442
+ RUN pip install /tmp/{{ monai_deploy_sdk_filename }}
443
+ {% else %}
444
+
445
+ # Install MONAI Deploy from PyPI org
446
+ RUN pip install monai-deploy-app-sdk=={{ monai_deploy_app_sdk_version }}
447
+
448
+ {% endif %}
449
+ {% endif %}
450
+ {% endif %}
451
+
452
+ {% if models is defined %}
453
+ COPY ./models {{ models_dir }}
454
+ {% endif %}
455
+
456
+ {% if docs is defined %}
457
+ COPY ./docs {{ docs_dir }}
458
+ {% endif %}
459
+
460
+ COPY ./map/app.json {{ app_json }}
461
+ COPY ./app.config {{ config_file_path }}
462
+ COPY ./map/pkg.json {{ pkg_json }}
463
+
464
+ {% if application_type == 'CppCMake' %}
465
+ COPY --from=builder /install {{ app_dir }}
466
+ {% else %}
467
+ COPY ./app {{ app_dir }}
468
+ {% endif %}
469
+
470
+ ENTRYPOINT ["/var/holoscan/tools"]
@@ -0,0 +1,93 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ # Git
17
+ **/.git
18
+ **/.gitignore
19
+ **/.gitconfig
20
+
21
+ # CI
22
+ **/.codeclimate.yml
23
+ **/.travis.yml
24
+ **/.taskcluster.yml
25
+
26
+ # Docker
27
+ **/docker-compose.yml
28
+ **/.docker
29
+
30
+ # Byte-compiled/optimized/DLL files for Python
31
+ **/__pycache__
32
+ **/*.pyc
33
+ **/.Python
34
+ **/*$py.class
35
+
36
+ # Conda folders
37
+ **/.conda
38
+ **/conda-bld
39
+
40
+ # Distribution / packaging
41
+ **/.Python
42
+ **/.cmake
43
+ **/cmake-build*/
44
+ **/build-*/
45
+ **/develop-eggs/
46
+ **/.eggs/
47
+ **/sdist/
48
+ **/wheels/
49
+ **/*.egg-info/
50
+ **/.installed.cfg
51
+ **/*.egg
52
+ **/MANIFEST
53
+
54
+ # PyInstaller
55
+ # Usually these files are written by a python script from a template
56
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
57
+ **/*.manifest
58
+ **/*.spec
59
+
60
+ # Installer logs
61
+ **/pip-log.txt
62
+ **/pip-delete-this-directory.txt
63
+
64
+ # Unit test / coverage reports
65
+ **/htmlcov/
66
+ **/.tox/
67
+ **/.coverage
68
+ **/.coverage.*
69
+ **/.cache
70
+ **/nosetests.xml
71
+ **/coverage.xml
72
+ **/*.cover
73
+ **/*.log
74
+ **/.hypothesis/
75
+ **/.pytest_cache/
76
+
77
+ # mypy
78
+ **/.mypy_cache/
79
+
80
+ ## VSCode IDE
81
+ **/.vscode
82
+
83
+ # Jupyter Notebook
84
+ **/.ipynb_checkpoints
85
+
86
+ # Environments
87
+ **/.env
88
+ **/.venv
89
+ **/env/
90
+ **/venv/
91
+ **/ENV/
92
+ **/env.bak/
93
+ **/venv.bak/