holoscan-cli 2.9.0__py3-none-any.whl → 3.8.0__py3-none-any.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.
@@ -1,21 +1,22 @@
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
- #}
1
+ # SPDX-FileCopyrightText: Copyright (c) 2023-2025 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.
17
15
 
18
16
  ARG GPU_TYPE=dgpu
17
+ ARG LIBTORCH_VERSION_ARM64="2.9.0.dev20250828+cu130"
18
+ ARG LIBTORCH_VERSION_AMD64="2.9.0.dev20250829+cu130"
19
+ ARG LIBTORCH_VISION_VERSION="0.24.0.dev20250829"
19
20
 
20
21
  {% if application_type == 'CppCMake' %}
21
22
  # Build C++ application in the builder stage
@@ -51,95 +52,26 @@ RUN apt-get update \
51
52
  jq \
52
53
  && rm -rf /var/lib/apt/lists/*
53
54
 
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
55
  {% if 'onnx' in includes %}
101
56
  # Collect onnx dependencies
102
57
  FROM base AS onnx-dependencies
103
58
  ARG GPU_TYPE
104
- ARG ONNX_RUNTIME_VERSION=1.18.1_38712740_24.08-cuda-12.6
59
+ ARG ONNX_RUNTIME_VERSION=1.22.1
105
60
 
106
61
  WORKDIR /opt/onnxruntime
107
62
 
108
63
  # 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
64
+ RUN CUDA_MAJOR_MINOR=$(echo ${CUDA_VERSION} | cut -d. -f1-2) \
65
+ && echo "Downloading from https://edge.urm.nvidia.com/artifactory/sw-holoscan-thirdparty-generic-local/onnxruntime/onnxruntime-${ONNX_RUNTIME_VERSION}-cuda-${CUDA_MAJOR_MINOR}-$(uname -m).tar.gz" \
66
+ && curl -S -L -# -o ort.tgz \
67
+ https://edge.urm.nvidia.com/artifactory/sw-holoscan-thirdparty-generic-local/onnxruntime/onnxruntime-${ONNX_RUNTIME_VERSION}-cuda-${CUDA_MAJOR_MINOR}-$(uname -m).tar.gz
68
+ RUN mkdir -p ${ONNX_RUNTIME_VERSION} \
69
+ && tar -xf ort.tgz -C ${ONNX_RUNTIME_VERSION} --strip-components 2 --no-same-owner --no-same-permissions \
70
+ && rm -f ort.tgz
114
71
  WORKDIR /
115
72
  # End collect onnx dependencies
116
73
  {% endif %}
117
74
 
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
75
  FROM base AS release
144
76
  ENV DEBIAN_FRONTEND=noninteractive
145
77
  ENV TERM=xterm-256color
@@ -148,6 +80,9 @@ ARG GPU_TYPE
148
80
  ARG UNAME
149
81
  ARG UID
150
82
  ARG GID
83
+ ARG LIBTORCH_VERSION_ARM64
84
+ ARG LIBTORCH_VERSION_AMD64
85
+ ARG LIBTORCH_VISION_VERSION
151
86
 
152
87
  RUN mkdir -p /etc/holoscan/ \
153
88
  && mkdir -p /opt/holoscan/ \
@@ -179,6 +114,14 @@ ENV HOLOSCAN_PKG_MANIFEST_PATH={{ pkg_json }}
179
114
  ENV HOLOSCAN_LOGS_PATH={{ logs_dir }}
180
115
  ENV HOLOSCAN_VERSION={{ holoscan_sdk_version }}
181
116
 
117
+ # Update NV GPG repo key
118
+ # https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
119
+ RUN rm -f /etc/apt/sources.list.d/cuda*.list \
120
+ && curl -OL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/{{ cuda_deb_arch }}/cuda-keyring_1.1-1_all.deb \
121
+ && dpkg -i cuda-keyring_1.1-1_all.deb \
122
+ && rm -f cuda-keyring_1.1-1_all.deb \
123
+ && apt-get update
124
+
182
125
  {% if 'debug' in includes %}
183
126
  # Install debugging tools
184
127
  RUN apt-get update \
@@ -197,15 +140,15 @@ RUN apt-get update \
197
140
  # Install Holoviz dependencies
198
141
  RUN apt-get update \
199
142
  && apt-get install --no-install-recommends --no-install-suggests --allow-downgrades --allow-change-held-packages -y \
200
- libvulkan1="1.3.204.1-*" \
201
- # X11 support \
202
- libgl1="1.4.0-*" \
203
- # Wayland support \
204
- libwayland-client0="1.20.0-*" \
205
- libwayland-egl1="1.20.0-*" \
206
- libxkbcommon0="1.4.0-*" \
207
- libdecor-0-plugin-1-cairo="0.1.0-*" \
208
- libegl1="1.4.0-*" \
143
+ libvulkan1="1.3.275.0-*" \
144
+ # X11 support \
145
+ libgl1="1.7.0-*" \
146
+ # Wayland support \
147
+ libwayland-client0="1.22.0-*" \
148
+ libwayland-egl1="1.22.0-*" \
149
+ libxkbcommon0="1.6.0-*" \
150
+ libdecor-0-plugin-1-cairo="0.2.2-*" \
151
+ libegl1="1.7.0-*" \
209
152
  && rm -rf /var/lib/apt/lists/*
210
153
  # End install Holoviz dependencies
211
154
  {% endif %}
@@ -213,67 +156,52 @@ RUN apt-get update \
213
156
 
214
157
  {% if 'torch' in includes %}
215
158
  # Install torch dependencies
216
- ENV PYTHON_VERSION=3.10.6-1~22.04
217
- ENV PYTHON_PIP_VERSION=22.0.2+dfsg-*
159
+ ENV PYTHON_VERSION=3.12.3-*
160
+ ENV PYTHON_PIP_VERSION=24.0+dfsg-*
161
+ ENV LIBTORCH=/opt/libtorch
162
+ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${LIBTORCH}
218
163
 
219
164
  RUN apt update \
220
- && apt-get install -y --no-install-recommends --no-install-suggests \
165
+ && apt-get install -y --no-install-recommends --no-install-suggests \
221
166
  python3-minimal=${PYTHON_VERSION} \
222
167
  libpython3-stdlib=${PYTHON_VERSION} \
223
168
  python3=${PYTHON_VERSION} \
224
169
  python3-venv=${PYTHON_VERSION} \
225
170
  python3-pip=${PYTHON_PIP_VERSION} \
226
- libjpeg-turbo8="2.1.2-*" \
227
- libnuma1="2.0.14-*" \
228
- libhwloc15="2.7.0-*" \
229
- libopenblas0="0.3.20+ds-*" \
171
+ python3-dev \
172
+ libjpeg-turbo8="2.1.5-*" \
173
+ libnuma1="2.0.18-*" \
174
+ libhwloc15="2.10.0-*" \
175
+ libopenblas0="0.3.26+ds-*" \
230
176
  libevent-core-2.1-7 \
231
177
  libevent-pthreads-2.1-7 \
232
- cuda-cupti-12-6 \
233
- libcudnn9-cuda-12 \
234
- && rm -rf /var/lib/apt/lists/*
235
-
236
- # Install NVIDIA Performance Libraries on arm64 dGPU platform
237
- # as a runtime requirement for the Holoinfer `libtorch` backend (2.5.0).
238
- {% if target_arch == "aarch64" and gpu_type == "dgpu" %}
239
- RUN curl -L https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/sbsa/cuda-keyring_1.1-1_all.deb -O \
240
- && dpkg -i cuda-keyring_1.1-1_all.deb \
241
- && apt-get update \
242
- && apt-get install --no-install-recommends -y \
243
- nvpl-blas=0.2.0.1-* \
244
- nvpl-lapack=0.2.2.1-* \
178
+ cuda-cupti-$(echo ${CUDA_VERSION} | sed 's/\./-/g' | cut -d- -f1,2) \
179
+ libcudnn9-cuda-$(echo ${CUDA_VERSION} | cut -d. -f1) \
245
180
  && rm -rf /var/lib/apt/lists/*
246
- ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/sbsa-linux-gnu/
247
- {% endif %}
248
-
249
- # mkl - dependency for libtorch plugin on x86_64 (match pytorch container version)
250
- RUN if [ "{{ cuda_deb_arch }}" = "x86_64" ]; then \
251
- python3 -m pip install --no-cache-dir \
252
- mkl==2021.1.1 \
253
- && \
254
- # Clean up duplicate libraries from mkl/tbb python wheel install which makes copies for symlinks.
255
- # Only keep the *.so.X libs, remove the *.so and *.so.X.Y libs
256
- # This can be removed once upgrading to an MKL pip wheel that fixes the symlinks
257
- find /usr/local/lib -maxdepth 1 -type f -regex '.*\/lib\(tbb\|mkl\).*\.so\(\.[0-9]+\.[0-9]+\)?' -exec rm -v {} +; \
181
+ RUN rm -rf /usr/lib/python3.12/EXTERNALLY-MANAGED \
182
+ && if [ "${GPU_TYPE}" = "igpu" ]; then \
183
+ echo "Torch installation is not supported for iGPU."; \
184
+ exit 1; \
185
+ else \
186
+ INDEX_URL="https://download.pytorch.org/whl/nightly/cu130"; \
187
+ if [ "${GPU_TYPE}" = "dgpu" ]; then \
188
+ if [ $(uname -m) = "aarch64" ]; then \
189
+ LIBTORCH_VERSION="${LIBTORCH_VERSION_ARM64}"; \
190
+ else \
191
+ LIBTORCH_VERSION="${LIBTORCH_VERSION_AMD64}"; \
192
+ fi; \
193
+ fi; \
194
+ fi; \
195
+ echo "Installing torch==${LIBTORCH_VERSION} from $INDEX_URL"; \
196
+ python3 -m pip install --break-system-packages --force-reinstall torch==${LIBTORCH_VERSION} torchvision==${LIBTORCH_VISION_VERSION} torchaudio --index-url $INDEX_URL; \
197
+ if ! find /usr/local/lib/python3.12/dist-packages/torch -name libtorch_cuda.so | grep -q .; then \
198
+ echo "libtorch_cuda.so not found, torch installation failed"; \
199
+ exit 1; \
258
200
  fi
259
-
260
- # Copy Libtorch
261
- ARG LIBTORCH_VERSION=2.5.0_24.08
262
- ENV LIBTORCH=/opt/libtorch/${LIBTORCH_VERSION}/lib
263
- COPY --from=torch-dependencies ${LIBTORCH} ${LIBTORCH}
264
-
265
- # Copy TorchVision
266
- ARG TORCHVISION_VERSION=0.20.0_24.08
267
- ENV TORCHVISION=/opt/torchvision/${TORCHVISION_VERSION}/lib
268
- COPY --from=torch-dependencies ${TORCHVISION} ${TORCHVISION}
269
-
270
- ENV HPCX=/opt/hpcx/lib
271
- COPY --from=torch-dependencies /opt/hpcx/libucc.so.1 ${LIBTORCH}/libucc.so.1
272
- COPY --from=torch-dependencies /usr/lib/{{target_arch}}-linux-gnu/libmpi.so.40 ${LIBTORCH}/libmpi.so.40
273
- COPY --from=torch-dependencies /usr/lib/{{target_arch}}-linux-gnu/libopen-rte.so.40 ${LIBTORCH}/libopen-rte.so.40
274
- COPY --from=torch-dependencies /usr/lib/{{target_arch}}-linux-gnu/libopen-pal.so.40 ${LIBTORCH}/libopen-pal.so.40
275
-
276
- ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${LIBTORCH}:${TORCHVISION}:${HPCX}
201
+ # Set up Holoscan SDK container libtorch to be found with ldconfig for app C++ build and runtime
202
+ RUN echo $(python3 -c "import torch; print(torch.__path__[0])")/lib > /etc/ld.so.conf.d/libtorch.conf \
203
+ && ldconfig \
204
+ && ldconfig -p | grep -q "libtorch.so"
277
205
  WORKDIR /
278
206
  ### End install torch dependencies
279
207
  {% endif %}
@@ -281,27 +209,31 @@ WORKDIR /
281
209
 
282
210
  {% if 'onnx' in includes %}
283
211
  # Install onnx dependencies
284
- ARG ONNX_RUNTIME_VERSION=1.18.1_38712740_24.08-cuda-12.6
285
- ENV ONNX_RUNTIME=/opt/onnxruntime/${ONNX_RUNTIME_VERSION}/lib
212
+ ENV ONNX_RUNTIME=/opt/onnxruntime
286
213
  ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${ONNX_RUNTIME}
287
214
 
288
215
  # Copy ONNX Runtime
289
216
  COPY --from=onnx-dependencies ${ONNX_RUNTIME} ${ONNX_RUNTIME}
290
217
 
218
+
219
+ # CLARAHOLOS-1689 requires libnvinfer_plugin
291
220
  {% if gpu_type == "dgpu" %}
221
+
292
222
  RUN apt-get update \
223
+ && CUDA_MAJOR_VERSION=$(echo ${CUDA_VERSION} | cut -d. -f1) \
224
+ && TRT_VERSION_VAR_NAME="TENSORRT_CU${CUDA_MAJOR_VERSION}" \
225
+ && TRT_VERSION=$(apt-cache madison libnvinfer10 | grep "+cuda${CUDA_MAJOR_VERSION}" | head -n 1 | awk '{print $3}') \
293
226
  && apt-get install --no-install-recommends --no-install-suggests --allow-downgrades -y \
294
- libnvinfer10="10.3.*+cuda12.5" \
295
- libnvinfer-plugin10="10.3.*+cuda12.5" \
296
- libnvonnxparsers10="10.3.*+cuda12.5" \
297
- libcusparselt0="0.6.3.2-*" \
298
- libcudnn9-cuda-12 \
299
- && rm -rf /var/lib/apt/lists/* \
300
- && rm -f /usr/lib/*/libcudnn*train.so*
227
+ libnvinfer10="${TRT_VERSION}" \
228
+ libnvinfer-plugin10="${TRT_VERSION}" \
229
+ libnvonnxparsers10="${TRT_VERSION}" \
230
+ libcusparselt0 \
231
+ libcudnn9-cuda-${CUDA_MAJOR_VERSION} \
232
+ && rm -f /usr/lib/*/libcudnn*train.so* \
233
+ && rm -rf /var/lib/apt/lists/*
301
234
  {% endif %}
302
235
  ### End install onnx dependencies
303
236
  {% endif %}
304
-
305
237
  {% if health_probe is defined %}
306
238
  # Install gRPC health probe
307
239
  RUN curl -L -o /bin/grpc_health_probe {{ health_probe | pprint }} \
@@ -316,8 +248,8 @@ HEALTHCHECK --interval=10s --timeout=1s \
316
248
  {% if application_type == 'PythonModule' or application_type == 'PythonFile' %}
317
249
  {% if not 'torch' in includes %}
318
250
  # If torch is installed, we can skip installing Python
319
- ENV PYTHON_VERSION=3.10.6-1~22.04
320
- ENV PYTHON_PIP_VERSION=22.0.2+dfsg-*
251
+ ENV PYTHON_VERSION=3.12.3-*
252
+ ENV PYTHON_PIP_VERSION=24.0+dfsg-*
321
253
 
322
254
  RUN apt update \
323
255
  && apt-get install -y --no-install-recommends --no-install-suggests \
@@ -344,30 +276,24 @@ RUN apt update \
344
276
 
345
277
  ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/nvidia/holoscan/lib
346
278
 
347
- # Update NV GPG repo key
348
- # https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
349
- RUN curl -OL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/{{ cuda_deb_arch }}/cuda-keyring_1.1-1_all.deb \
350
- && dpkg -i cuda-keyring_1.1-1_all.deb \
351
- && rm -f cuda-keyring_1.1-1_all.deb \
352
- && apt-get update
353
-
354
279
  RUN if [ "{{ holoscan_deb_arch }}" = "arm64" ]; then \
355
280
  GDR_REPO_ARCH=aarch64 ; \
356
281
  else \
357
282
  GDR_REPO_ARCH=x64 ; \
358
283
  fi \
359
- && 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 \
360
- && dpkg -i libgdrapi_2.4-1_{{ holoscan_deb_arch }}.Ubuntu22_04.deb \
361
- && rm -f libgdrapi_2.4-1_{{ holoscan_deb_arch }}.Ubuntu22_04.deb
284
+ && curl -O https://developer.download.nvidia.com/compute/redist/gdrcopy/CUDA%2013.0/ubuntu24_04/${GDR_REPO_ARCH}/libgdrapi_2.5.1-1_{{ holoscan_deb_arch }}.Ubuntu24_04.deb \
285
+ && dpkg -i libgdrapi_2.5.1-1_{{ holoscan_deb_arch }}.Ubuntu24_04.deb \
286
+ && rm -f libgdrapi_2.5.1-1_{{ holoscan_deb_arch }}.Ubuntu24_04.deb \
287
+ && rm -rf /var/lib/apt/lists/*
362
288
 
363
289
  {% if custom_holoscan_sdk == True %}
364
290
 
365
291
  # Use user-specified Holoscan SDK Debian Package
366
292
  COPY ./{{ holoscan_sdk_filename }} /tmp/{{ holoscan_sdk_filename }}
367
- RUN apt-get install -y --no-install-recommends --no-install-suggests \
293
+ RUN apt-get update \
294
+ && apt-get install -y --no-install-recommends --no-install-suggests \
368
295
  /tmp/{{ holoscan_sdk_filename }} \
369
296
  && rm -rf /var/lib/apt/lists/*
370
-
371
297
  {% else %}
372
298
 
373
299
  # Install Holoscan SDK from NVIDIA APT repository
@@ -377,7 +303,6 @@ RUN apt-get install -y --no-install-recommends --no-install-suggests \
377
303
  # && apt-get remove -y g++ g++-11 gcc gcc-11 gcc-11-base build-essential \
378
304
  && apt-get purge -y cuda-keyring \
379
305
  && rm -rf /var/lib/apt/lists/*
380
-
381
306
  {% endif %}
382
307
 
383
308
  {% endif %}
@@ -387,11 +312,11 @@ RUN apt-get install -y --no-install-recommends --no-install-suggests \
387
312
  # Requires libnuma on aarch64
388
313
  RUN apt update \
389
314
  && apt-get install -y --no-install-recommends --no-install-suggests \
390
- libnuma1="2.0.14-*" \
315
+ libnuma1="2.0.18-*" \
391
316
  && rm -rf /var/lib/apt/lists/*
392
317
  {% endif %}
393
318
 
394
-
319
+ RUN if id "ubuntu" >/dev/null 2>&1; then touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu; fi
395
320
  RUN groupadd -f -g $GID $UNAME
396
321
  RUN useradd -rm -d /home/$UNAME -s /bin/bash -g $GID -G sudo -u $UID $UNAME
397
322
  RUN chown -R holoscan {{ working_dir }} && \
@@ -405,13 +330,16 @@ WORKDIR {{ working_dir }}
405
330
  COPY ./tools {{ working_dir }}/tools
406
331
  RUN chmod +x {{ working_dir }}/tools
407
332
 
333
+ # Remove EXTERNALLY-MANAGED directory
334
+ RUN rm -rf /usr/lib/python3.12/EXTERNALLY-MANAGED
335
+
408
336
  # Set the working directory
409
337
  WORKDIR {{ working_dir }}
410
338
 
411
339
  USER $UNAME
412
340
 
413
341
  ENV PATH=/home/${UNAME}/.local/bin:/opt/nvidia/holoscan/bin:$PATH
414
- ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/${UNAME}/.local/lib/python3.10/site-packages/holoscan/lib
342
+ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/${UNAME}/.local/lib/python3.12/site-packages/holoscan/lib
415
343
 
416
344
  {% if application_type == 'PythonModule' or application_type == 'PythonFile' %}
417
345
  COPY ./pip/requirements.txt /tmp/requirements.txt
@@ -429,7 +357,7 @@ RUN pip install /tmp/{{ holoscan_sdk_filename }}
429
357
 
430
358
  {% else %}
431
359
  # Install Holoscan SDK wheel from PyPI
432
- RUN pip install holoscan=={{holoscan_sdk_filename}}
360
+ RUN pip install holoscan-cu13=={{holoscan_sdk_filename}}
433
361
  {% endif %}
434
362
  {% else %}
435
363
 
@@ -476,4 +404,8 @@ ENV PYTHONPATH=$PYTHONPATH:{{ additional_lib_paths }}:{{ lib_dir }}
476
404
 
477
405
  {% endif %}
478
406
 
407
+ {% if input_data != None %}
408
+ COPY ./input $HOLOSCAN_INPUT_PATH
409
+ {% endif %}
410
+
479
411
  ENTRYPOINT ["/var/holoscan/tools"]
@@ -380,6 +380,7 @@ main() {
380
380
  info "Launching application ${command} ${args:1}..."
381
381
  eval ${command} "$@"
382
382
  exit_code=$?
383
+ info "Application exited with ${exit_code}."
383
384
  if [ $exit_code -ne 0 ] && [ -f /.dockerenv ] && [ "$HOLOSCAN_HOSTING_SERVICE" != "HOLOSCAN_RUN" ]; then
384
385
  newline
385
386
  c_echo "================================================================================================"
@@ -92,6 +92,14 @@ def create_run_parser(
92
92
  "between 10000 and 32767 that is not currently in use.",
93
93
  )
94
94
 
95
+ parser.add_argument(
96
+ "--rm",
97
+ dest="rm",
98
+ action="store_true",
99
+ default=False,
100
+ help="remove the container after it exits.",
101
+ )
102
+
95
103
  advanced_group = parser.add_argument_group(title="advanced run options")
96
104
 
97
105
  advanced_group.add_argument(
@@ -121,6 +121,7 @@ def _run_app(args: Namespace, app_info: dict, pkg_info: dict):
121
121
  worker_address: Optional[str] = args.worker_address if args.worker_address else None
122
122
  render: bool = args.render
123
123
  user: str = f"{args.uid}:{args.gid}"
124
+ remove: bool = args.rm
124
125
  hostname: Optional[str] = "driver" if driver else None
125
126
  terminal: bool = args.terminal
126
127
  platform_config: str = pkg_info.get("platformConfig")
@@ -174,6 +175,7 @@ def _run_app(args: Namespace, app_info: dict, pkg_info: dict):
174
175
  platform_config,
175
176
  shared_memory_size,
176
177
  args.uid == 0,
178
+ remove,
177
179
  )
178
180
 
179
181
 
@@ -266,10 +268,7 @@ def _pkg_specific_dependency_verification(pkg_info: dict) -> bool:
266
268
  Returns:
267
269
  True if all dependencies are satisfied, otherwise False.
268
270
  """
269
- if (
270
- os.path.exists("/.dockerenv")
271
- or os.environ.get("HOLOSCAN_SKIP_NVIDIA_CTK_CHECK") is not None
272
- ):
271
+ if os.path.exists("/.dockerenv"):
273
272
  logger.info("--> Skipping nvidia-ctk check inside Docker...\n")
274
273
  return True
275
274
 
@@ -319,7 +318,6 @@ def execute_run_command(args: Namespace):
319
318
  if not _dependency_verification(args.map):
320
319
  logger.error("Execution Aborted")
321
320
  sys.exit(2)
322
-
323
321
  try:
324
322
  # Fetch application manifest from MAP
325
323
  app_info, pkg_info = _fetch_map_manifest(args.map)
@@ -330,7 +328,6 @@ def execute_run_command(args: Namespace):
330
328
  if not _pkg_specific_dependency_verification(pkg_info):
331
329
  logger.error("Execution Aborted")
332
330
  sys.exit(2)
333
-
334
331
  try:
335
332
  # Run Holoscan Application
336
333
  _run_app(args, app_info, pkg_info)
@@ -20,6 +20,7 @@ from argparse import Namespace
20
20
  from ..common.enum_types import SdkType
21
21
  from ..common.sdk_utils import (
22
22
  detect_holoscan_version,
23
+ detect_holoscan_cli_version,
23
24
  detect_monaideploy_version,
24
25
  detect_sdk,
25
26
  )
@@ -40,6 +41,12 @@ def execute_version_command(args: Namespace):
40
41
  except Exception:
41
42
  print("Holoscan SDK: N/A")
42
43
 
44
+ try:
45
+ cli_version = detect_holoscan_cli_version()
46
+ print(f"Holoscan CLI: {cli_version}")
47
+ except Exception:
48
+ print("Holoscan CLI: N/A")
49
+
43
50
  if sdk == SdkType.MonaiDeploy:
44
51
  try:
45
52
  sdk_version = detect_monaideploy_version()
@@ -1,12 +1,13 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: holoscan-cli
3
- Version: 2.9.0
3
+ Version: 3.8.0
4
4
  Summary: Command line interface for packaging and running Holoscan applications.
5
5
  License: Apache-2.0
6
+ License-File: LICENSE
6
7
  Keywords: AI,holoscan,medical,streaming,HPC,nvidia,docker,container
7
8
  Author: NVIDIA
8
9
  Maintainer: mocsharp
9
- Requires-Python: >=3.9,<3.13
10
+ Requires-Python: >=3.10,<3.14
10
11
  Classifier: Development Status :: 5 - Production/Stable
11
12
  Classifier: Environment :: Console
12
13
  Classifier: Environment :: GPU :: NVIDIA CUDA :: 12
@@ -17,27 +18,27 @@ Classifier: Intended Audience :: Science/Research
17
18
  Classifier: License :: OSI Approved :: Apache Software License
18
19
  Classifier: Operating System :: POSIX :: Linux
19
20
  Classifier: Programming Language :: Python :: 3
20
- Classifier: Programming Language :: Python :: 3.9
21
21
  Classifier: Programming Language :: Python :: 3.10
22
22
  Classifier: Programming Language :: Python :: 3.11
23
23
  Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
24
25
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
25
26
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
27
  Classifier: Typing :: Typed
27
- Requires-Dist: Jinja2 (>=3.1.5,<4.0.0)
28
- Requires-Dist: packaging (>=23.1,<24.0)
29
- Requires-Dist: pip (>22.0.2)
30
- Requires-Dist: psutil (>=6.0.0,<7.0.0)
31
- Requires-Dist: python-on-whales (>=0.60.1,<0.61.0)
28
+ Requires-Dist: Jinja2 (>=3.1.6,<4.0.0)
29
+ Requires-Dist: packaging (>=25.0,<26.0)
30
+ Requires-Dist: pip (>25.1.0)
31
+ Requires-Dist: psutil (>=7.0.0,<8.0)
32
+ Requires-Dist: python-on-whales (>=0.77.0)
32
33
  Requires-Dist: pyyaml (>=6.0,<7.0)
33
- Requires-Dist: requests (>=2.31.0,<3.0.0)
34
+ Requires-Dist: requests (>=2.32,<3.0)
34
35
  Project-URL: Documentation, https://docs.nvidia.com/holoscan/sdk-user-guide/index.html
35
36
  Project-URL: Homepage, https://github.com/nvidia-holoscan/holoscan-cli
36
37
  Project-URL: Repository, https://github.com/nvidia-holoscan/holoscan-cli
37
38
  Description-Content-Type: text/markdown
38
39
 
39
40
  [![Code Check](https://github.com/nvidia-holoscan/holoscan-cli/actions/workflows/check.yaml/badge.svg)](https://github.com/nvidia-holoscan/holoscan-cli/actions/workflows/check.yaml)
40
- [![Coverage Status](https://coveralls.io/repos/github/nvidia-holoscan/holoscan-cli/badge.svg?branch=vchang/poetry-setup)](https://coveralls.io/github/nvidia-holoscan/holoscan-cli?branch=vchang/poetry-setup)
41
+ [![Coverage Status](https://coveralls.io/repos/github/nvidia-holoscan/holoscan-cli/badge.svg)](https://coveralls.io/github/nvidia-holoscan/holoscan-cli)
41
42
 
42
43
  # Holoscan CLI
43
44
 
@@ -58,10 +59,10 @@ You will need a platform supported by [NVIDIA Holoscan SDK](https://docs.nvidia.
58
59
 
59
60
  Holoscan CLI is delivered as a Python package and can be installed from PyPI.org using one of the following commands:
60
61
 
61
- | Holoscan SDK Version | Installation Command |
62
- | -------------------- | -------------------------- |
63
- | 2.8 or earlier | `pip install holoscan` |
64
- | 2.9 or later | `pip install holoscan-cli` |
62
+ | Holoscan SDK Version | Installation Command | CUDA Version |
63
+ | -------------------- | -------------------------- | ------------ |
64
+ | 2.8 or earlier | `pip install holoscan` | 12.6 |
65
+ | 2.9 or later | `pip install holoscan-cli` | 12.6 |
65
66
 
66
67
  ## Build From Source
67
68
 
@@ -69,7 +70,7 @@ Holoscan CLI is delivered as a Python package and can be installed from PyPI.org
69
70
 
70
71
  To build the Holoscan CLI from source, you will need to clone this repository and install the following dependencies:
71
72
 
72
- - Python 3.9+.
73
+ - Python 3.10+.
73
74
  - [poetry 2.0+](https://python-poetry.org/docs/#installation)
74
75
 
75
76
  ### Development Environment
@@ -78,12 +79,15 @@ Holoscan CLI uses [Poetry](https://python-poetry.org/) for package and dependenc
78
79
 
79
80
  ```bash
80
81
  # Create virtual environment
81
- poetry shell
82
+ poetry env use python3.12
83
+
84
+ # Activate virtual environment
85
+ eval $(poetry env activate)
82
86
 
83
87
  # Install dependencies
84
88
  poetry install
85
89
 
86
- # Configure pre-commmit hooks
90
+ # Configure pre-commit hooks
87
91
  pre-commit install
88
92
 
89
93
  # Run pre-commit against all files
@@ -96,6 +100,8 @@ poetry build
96
100
  poetry run pytest
97
101
  ```
98
102
 
103
+ For more information on Poetry and its usages, see the [Poetry documentation](https://python-poetry.org/docs/).
104
+
99
105
  ## Contributing to the Holoscan CLI
100
106
 
101
107
  See [CONTRIBUTING.md](./CONTRIBUTING.md) for details.