From dd0385011681ea65c3ac9d8717b1bfa4c5676c75 Mon Sep 17 00:00:00 2001 From: Alexis Girault Date: Mon, 6 Feb 2023 12:36:55 -0500 Subject: [PATCH] Holoscan SDK v0.4.1 release Co-authored-by: Alexis Girault Co-authored-by: Andreas Heumann Co-authored-by: Anisha Goel Co-authored-by: Julien Jomier --- Dockerfile | 14 +++---- README.md | 63 ++++++++++++++------------------ python/pybind11/core/__init__.py | 22 +++++++---- 3 files changed, 48 insertions(+), 51 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2ec9342c..56b04dd6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,12 +30,7 @@ FROM ${BASE_IMAGE} as base ARG DEBIAN_FRONTEND=noninteractive -# Install tools -RUN apt update \ - && apt install --no-install-recommends -y \ - software-properties-common - -# Install newer CMake +# Install newer CMake (https://apt.kitware.com/) RUN rm -r \ /usr/local/bin/cmake \ /usr/local/bin/cpack \ @@ -43,10 +38,13 @@ RUN rm -r \ /usr/local/share/cmake-3.14 RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \ | gpg --dearmor - \ - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null \ - && apt-add-repository "deb https://apt.kitware.com/ubuntu/ focal main" \ + | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null \ + && echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' \ + | tee /etc/apt/sources.list.d/kitware.list >/dev/null \ && apt update \ + && rm /usr/share/keyrings/kitware-archive-keyring.gpg \ && apt install --no-install-recommends -y \ + kitware-archive-keyring \ cmake-data=3.22.2-0kitware1ubuntu20.04.1 \ cmake=3.22.2-0kitware1ubuntu20.04.1 \ && rm -rf /var/lib/apt/lists/* diff --git a/README.md b/README.md index b2282226..9996d70d 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,11 @@ Visit the [NGC demo website](https://demos.ngc.nvidia.com/holoscan) for a live d ## Table of Contents - [Documentation](#documentation) -- [Prerequisites](#prerequisites) - - [For Clara AGX and NVIDIA IGX Orin Developer Kits (aarch64)](#for-clara-agx-and-nvidia-igx-orin-developer-kits-aarch64) - - [For x86_64 systems](#for-x86_64-systems) - [Using the released SDK](#using-the-released-sdk) - [Building the SDK from source](#building-the-sdk-from-source) + - [Prerequisites](#prerequisites) + - [For Clara AGX and NVIDIA IGX Orin Developer Kits (aarch64)](#for-clara-agx-and-nvidia-igx-orin-developer-kits-aarch64) + - [For x86_64 systems](#for-x86_64-systems) - [Recommended: using the `run` script](#recommended-using-the-run-script) - [Cross-compilation](#cross-compilation) - [Advanced: Docker + CMake](#advanced-docker-cmake) @@ -27,11 +27,22 @@ Visit the [NGC demo website](https://demos.ngc.nvidia.com/holoscan) for a live d * The latest SDK user guide is available at https://docs.nvidia.com/clara-holoscan. * For a full list of Holoscan documentation, visit the [Holoscan developer page](https://developer.nvidia.com/clara-holoscan-sdk). -## Prerequisites +## Using the released SDK + +The Holoscan SDK is available as part of the following packages: +- 🐋 The [Holoscan container image on NGC](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/clara-holoscan/containers/holoscan) includes the Holoscan libraries, GXF extensions, headers, example source code, and sample datasets, as well as all the dependencies that were tested with Holoscan. It is the recommended way to run sample streaming applications, while still allowing you to create your own C++ and Python Holoscan application. +- 🐍 The [Holoscan python wheels on PyPI](https://pypi.org/project/holoscan/) (**NEW IN 0.4**) are the ideal way for Python developers to get started with the SDK, simply using `pip install holoscan`. The wheels include the necessary libraries and extensions, not including example code, built applications, nor sample datasets. +- 📦️ The [Holoscan Debian package on NGC](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/clara-holoscan/resources/holoscan_dev_deb) (**NEW IN 0.4**) includes the libraries, headers, and CMake configurations needed for both C++ and Python developers. It does not include example code, pre-built applications, nor sample datasets. + +## Building the SDK from source + +> **Disclaimer**: we only recommend building the SDK from source if you are a developer of the SDK, or need to build the SDK with debug symbols or other options not used as part of the released packages. If you want to modify some code to fit your use case, contribute to HoloHub if it's an operator or application, or file a feature or bug request. If that's not the case, prefer using [generated packages](using-the-released-sdk). + +### Prerequisites The Holoscan SDK currently supports the [Holoscan Developer Kits](https://www.nvidia.com/en-us/clara/developer-kits) (aarch64) as well as x86_64 systems. -### For Clara AGX and NVIDIA IGX Orin Developer Kits (aarch64) +#### For Clara AGX and NVIDIA IGX Orin Developer Kits (aarch64) Set up your developer kit: - [Clara AGX Developer Kit User Guide](https://developer.nvidia.com/clara-agx-developer-kit-user-guide), or @@ -39,49 +50,29 @@ Set up your developer kit: > Make sure you have joined the [Holoscan SDK Program](https://developer.nvidia.com/clara-holoscan-sdk-program) and, if needed, the [Rivermax SDK Program](https://developer.nvidia.com/nvidia-rivermax-sdk) before using the NVIDIA SDK Manager. -[SDK Manager](https://docs.nvidia.com/sdk-manager/install-with-sdkm-clara/) will install **Holopack 1.1** as well as the `nvgpuswitch.py` script. Once configured for dGPU mode, your developer kit will include the following necessary components to build the SDK: -- [NVIDIA Jetson Linux](https://developer.nvidia.com/embedded/jetson-linux): 34.1.2 -- [NVIDIA dGPU drivers](https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes): 510.73.08 -- [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) (for containerized development) -- [CUDA Toolkit](https://developer.nvidia.com/cuda-toolkit): 11.6.1 (for local development only) -- [TensorRT](https://developer.nvidia.com/tensorrt): 8.2.3 (for local development only) -- Optional Rivermax support - - [OFED Network Drivers](https://network.nvidia.com/products/infiniband-drivers/linux/mlnx_ofed/): 5.7 - - [Rivermax SDK](https://developer.nvidia.com/networking/rivermax): 1.11 (for local development only) - - *Note: [GPUDirect](https://docs.nvidia.com/clara-holoscan/sdk-user-guide/additional_setup.html#setting-up-gpudirect-rdma) drivers (required for Emergent support) need to be installed manually at this time* - -Refer to the user guide for additional steps needed to support specific technologies, such as [AJA cards](https://docs.nvidia.com/clara-holoscan/sdk-user-guide/aja_setup.html) or [Emergent cameras](https://docs.nvidia.com/clara-holoscan/sdk-user-guide/emergent_setup.html). +- [SDK Manager](https://docs.nvidia.com/sdk-manager/install-with-sdkm-clara/) will install **Holopack 1.2** as well as the `nvgpuswitch.py` script. Once configured for dGPU mode, your developer kit will include the necessary components to build the SDK +- For Rivermax support (optional/local development only at this time), GPUDirect drivers need to be installed manually at this time, see the [User Guide](https://docs.nvidia.com/clara-holoscan/sdk-user-guide/additional_setup.html#setting-up-gpudirect-rdma). +- Refer to the user guide for additional steps needed to support third-party technologies, such as [AJA cards](https://docs.nvidia.com/clara-holoscan/sdk-user-guide/aja_setup.html) or [Emergent cameras](https://docs.nvidia.com/clara-holoscan/sdk-user-guide/emergent_setup.html). +- Additional dependencies are required when developing locally instead of using a containerized environment, see details in the [section below](#advanced-local-environment--cmake). -> Additional dependencies are required when developing locally instead of using a containerized environment, see details in the [section below](#advanced-local-environment--cmake). - -### For x86_64 systems +#### For x86_64 systems You'll need the following to build applications from source on x86_64: - OS: Ubuntu 20.04 - NVIDIA GPU - Ampere or above recommended for best performance - [Quadro/NVIDIA RTX](https://www.nvidia.com/en-gb/design-visualization/desktop-graphics/) necessary for [GPUDirect RDMA](https://developer.nvidia.com/gpudirect) support -- [NVIDIA dGPU drivers](https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes): 510.73.08 + - Tested with [NVIDIA RTX 6000](https://www.nvidia.com/en-us/design-visualization/rtx-6000/) and [NVIDIA RTX A6000](https://www.nvidia.com/en-us/design-visualization/rtx-a6000/) +- [NVIDIA dGPU drivers](https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes): 510.73.08 or above - For containerized development (recommended): - [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) - For local development (advanced): - See details in the [section below](#advanced-local-environment--cmake). -- For Rivermax support (optional): +- For Rivermax support (optional/local development only at this time): - [NVIDIA ConnectX SmartNIC](https://www.nvidia.com/en-us/networking/ethernet-adapters/) - - [OFED Network Drivers](https://network.nvidia.com/products/infiniband-drivers/linux/mlnx_ofed/): 5.7 - - [Rivermax SDK](https://developer.nvidia.com/networking/rivermax): 1.11 (for local development only) - - [GPUDirect Drivers](https://docs.nvidia.com/clara-holoscan/sdk-user-guide/additional_setup.html#setting-up-gpudirect-rdma) - -## Using the released SDK - -The Holoscan SDK is available as part of the following packages: -- 🐋 The [Holoscan container image on NGC](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/clara-holoscan/containers/holoscan) includes the Holoscan libraries, GXF extensions, headers, example source code, and sample datasets, as well as all the dependencies that were tested with Holoscan. It is the recommended way to run sample streaming applications, while still allowing you to create your own C++ and Python Holoscan application. -- 🐍 The [Holoscan python wheels on PyPI](https://pypi.org/project/holoscan/) (**NEW IN 0.4**) are the ideal way for Python developers to get started with the SDK, simply using `pip install holoscan`. The wheels include the necessary libraries and extensions, not including example code, built applications, nor sample datasets. -- 📦️ The [Holoscan Debian package on NGC](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/clara-holoscan/resources/holoscan_dev_deb) (**NEW IN 0.4**) includes the libraries, headers, and CMake configurations needed for both C++ and Python developers. It does not include example code, pre-built applications, nor sample datasets. - -## Building the SDK from source - -Follow the instructions below if you want to build the Holoscan SDK yourself. + - [OFED Network Drivers](https://network.nvidia.com/products/infiniband-drivers/linux/mlnx_ofed/): 5.8 + - [GPUDirect Drivers](https://docs.nvidia.com/clara-holoscan/sdk-user-guide/additional_setup.html#setting-up-gpudirect-rdma): 1.1 + - [Rivermax SDK](https://developer.nvidia.com/networking/rivermax): 1.20 ### Recommended: using the `run` script diff --git a/python/pybind11/core/__init__.py b/python/pybind11/core/__init__.py index 250c636d..dd877682 100644 --- a/python/pybind11/core/__init__.py +++ b/python/pybind11/core/__init__.py @@ -120,6 +120,8 @@ def _load_gxf_extensions(cls): + import logging + from ..gxf import load_extensions if not hasattr(cls, "_context"): @@ -153,15 +155,21 @@ def _load_gxf_extensions(cls): pass extensions = [os.path.join(holoscan_lib_path, lib) for lib in gxf_extension_libs] - extensions += [os.path.join(holoscan_gxf_extensions_path, lib) for lib in holoscan_gxf_extension_libs] - for f in extensions: - if not os.path.exists(f): - raise ValueError(f"could not find the GXF extension: {f}") - + extensions += [ + os.path.join(holoscan_gxf_extensions_path, lib) for lib in holoscan_gxf_extension_libs + ] # Note: can only add a given extension once, otherwise will get: # ValueError: GXF_FACTORY_DUPLICATE_TID - load_extensions(cls._context, extensions, [], "") - + # Note: loading them one at a time to print adequate warning + for ext in extensions: + try: + load_extensions(cls._context, [ext], [], "") + except ValueError as e: + e_string = f"{type(e).__name__}: {e}" + if not os.path.exists(ext): + logging.warning(f"Could not find the GXF extension: {ext}. {e_string}") + else: + logging.warning(f"Could not load the GXF extension: {ext}. {e_string}") class Application(_Application): def __init__(self, *args, **kwargs):