From 5a207bab29d24c626fb564be482cba42b6bfa45d Mon Sep 17 00:00:00 2001 From: unnik Date: Fri, 17 May 2024 17:06:30 -0700 Subject: [PATCH] Update for DS 7.0 Dockerfiles DS 7.0 Dockerfile release with Triton Migration Guide --- LICENSE | 2 +- README.md | 148 ++++++++--------- buildjet.sh | 8 +- buildx86.sh | 8 +- common/Dockerfile.cleanup | 3 +- common/Makefile | 4 +- common/install_base.sh | 36 +++- common/install_devel.sh | 28 +++- common/install_runtime.sh | 35 +++- common/install_test5.sh | 4 +- common/install_triton-devel.sh | 25 ++- common/install_triton.sh | 31 +++- common/post_install_script.sh | 4 +- common/version | 2 +- jetson/Makefile | 2 +- jetson/ubuntu_base_devel/Dockerfile | 29 ++-- jetson/ubuntu_base_runtime/Dockerfile | 26 +-- jetson/user_additional_install_devel.sh | 3 +- jetson/user_additional_install_runtime.sh | 2 +- jetson/user_deepstream_python_apps_install.sh | 10 +- x86_64/Makefile | 2 +- x86_64/Makefile_x86_triton | 4 +- .../triton_user_additional_install_devel.sh | 2 +- ...ton_user_deepstream_python_apps_install.sh | 157 ++++++++++++++++++ x86_64/trtserver_base_devel/Dockerfile | 61 +++++-- x86_64/ubuntu_base_runtime/Dockerfile | 55 ++++-- x86_64/user_additional_install_devel.sh | 2 +- x86_64/user_additional_install_runtime.sh | 3 +- x86_64/user_deepstream_python_apps_install.sh | 56 +++++-- 29 files changed, 549 insertions(+), 203 deletions(-) create mode 100755 x86_64/triton_user_deepstream_python_apps_install.sh diff --git a/LICENSE b/LICENSE index 1fd2630..e910418 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), diff --git a/README.md b/README.md index 524ef11..0270e99 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# DeepStream 6.4 Open Source Dockerfiles Guide +# DeepStream 7.0 Open Source Dockerfiles Guide The documentation here is intended to help customers build the Open Source DeepStream Dockerfiles. This information is useful for both x86 systems with dGPU setup and on NVIDIA Jetson devices. @@ -25,25 +25,33 @@ Please refer to the Prerequisites section at DeepStream NGC page [NVIDIA NGC](ht 1) Please download the [DeepStreamSDK release](https://developer.nvidia.com/deepstream-getting-started) x86 tarball and place it locally in the ``$ROOT/x86_64`` folder of this repository. -``cp deepstream_sdk_v6.4.0_x86_64.tbz2 x86_64/ `` +``cp deepstream_sdk_v7.0.0_x86_64.tbz2 x86_64/ `` 2) `image_url` is the desired docker name:TAG 3) `ds_pkg` and `ds_pkg_dir` shall be the tarball file-name with and without the -tarball extension respectively. Refer to [Section 2.1.3 x86 Build Command](#213-x86-Build-Command) for sample command. +tarball extension respectively. Refer to [Section 2.2 Building specific x86 docker types](#22-building-specific-x86-docker-types) for sample command. 4) `base_image` is the desired container name. Please feel free to use the sample name provided in the command above. This name is used in the triton build steps alone. -Refer to [Section 2.1.3 x86 Build Command](#213-x86-Build-Command) for sample command. +Refer to [Section 2.2 Building specific x86 docker types](#22-building-specific-x86-docker-types) for sample command. -### 2.1.2 Prerequisites; some are Optional; (TensorRT and other third-party packages) +#### 2.1.2 CuDNN 8.9.6 install (x86-Triton and x86-samples dockers) -#### 2.1.2.1 x86-Triton : Adding uff-converter-tf and graphsurgeon-tf packages +Mandatory for for x86-Triton and x86-samples docker builds. -Note: These packages (uff-converter-tf and graphsurgeon-tf) are now included by default. +Download file link: [cudnn-local-repo-ubuntu2204-8.9.6.50_1.0-1_amd64.deb](https://developer.nvidia.com/downloads/compute/cudnn/secure/8.9.6/local_installers/12.x/cudnn-local-repo-ubuntu2204-8.9.6.50_1.0-1_amd64.deb) from TensorRT download page. +Note: You may have to login to [developer.nvidia.com](https://developer.nvidia.com/) to download the file. +Quick Steps: +$ROOT is the root directory of this git repo. +``cd $ROOT/x86_64`` +``cp cudnn-local-repo-ubuntu2204-8.9.6.50_1.0-1_amd64.deb x86_64/ `` -#### 2.1.2.2 For x86 samples docker the TensorRT 8.6.1 and CuDNN 8.9.4 install is required for the Docker builds + +#### 2.1.3 TensorRT 8.6.1 install (x86-samples docker) + +Mandatory for for x86-samples docker build. Download file link: [nv-tensorrt-local-repo-ubuntu2204-8.6.1-cuda-12.0_1.0-1_amd64.deb](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/secure/8.6.1/local_repos/nv-tensorrt-local-repo-ubuntu2204-8.6.1-cuda-12.0_1.0-1_amd64.deb) from TensorRT download page. Note: You may have to login to [developer.nvidia.com](https://developer.nvidia.com/) to download the file. @@ -53,50 +61,22 @@ $ROOT is the root directory of this git repo. ``cp nv-tensorrt-local-repo-ubuntu2204-8.6.1-cuda-12.0_1.0-1_amd64.deb x86_64/ `` -Also the CuDNN file. - -Download file link: [cudnn-local-repo-ubuntu2204-8.9.4.25_1.0-1_amd64.deb](https://developer.nvidia.com/downloads/compute/cudnn/secure/8.9.4/local_installers/12.x/cudnn-local-repo-ubuntu2204-8.9.4.25_1.0-1_amd64.deb) from TensorRT download page. -Note: You may have to login to [developer.nvidia.com](https://developer.nvidia.com/) to download the file. -Quick Steps: -$ROOT is the root directory of this git repo. -``cd $ROOT/x86_64`` - -``cp cudnn-local-repo-ubuntu2204-8.9.4.25_1.0-1_amd64.deb x86_64/ `` - -#### 2.1.2.3 Important Notes on docker image size optimization +#### 2.1.4 Important Notes on docker image size optimization :warning: NOTE: Docker ADD image size workaround by using wget instead :warning: Docker ADD method is used by default for ease to building the x86 Dockers. Docker ADD also increases the image size by approximately 2GB. -To workaround this problem you can host the nv-tensorrt-local-repo-ubuntu2204-8.6.1-cuda-12.0_1.0-1_amd64.deb a server and pull it in during the docker build using wget. This section of code is commented out by default. - -To use this wget method you can uncomment this code section of the code in the dockerfile. Then also add the complete URL to the file. - -``# install TensorRT repo from a hosted file on a server`` - -The commented out this code section in the dockerfile that starts with this. - -``# Add TensorRT repo`` - - -### 2.1.3 x86 Build Command - -``` -sudo image_url=deepstream:6.4.0-triton-local \ - ds_pkg=deepstream_sdk_v6.4.0_x86_64.tbz2 \ - ds_pkg_dir=deepstream_sdk_v6.4.0.0_x86_64/ \ - base_image=dgpu-any-custom-base-image make -f Makefile_x86_triton triton-devel -C x86_64/ -``` +To workaround this problem you can host the nv-tensorrt-local-repo-ubuntu2204-8.6.1-cuda-12.0_1.0-1_amd64.deb file in a local server. Then with a single `RUN` command in Dockerfile, pull it using wget, install, and remove the file from filesystem. ## 2.2 Building specific x86 docker types ### 2.2.1 Instructions for Building x86 DS Triton docker image ``` -sudo image_url=deepstream:6.4.0-triton-local \ - ds_pkg=deepstream_sdk_v6.4.0_x86_64.tbz2 \ - ds_pkg_dir=deepstream_sdk_v6.4.0.0_x86_64/ \ +sudo image_url=deepstream:7.0.0-triton-local \ + ds_pkg=deepstream_sdk_v7.0.0_x86_64.tbz2 \ + ds_pkg_dir=deepstream_sdk_v7.0.0.0_x86_64/ \ base_image=dgpu-any-custom-base-image make -f Makefile_x86_triton triton-devel -C x86_64/ There is an example build script is called $ROOT/buildx86.sh with the same contents. @@ -104,9 +84,9 @@ There is an example build script is called $ROOT/buildx86.sh with the same conte ### 2.2.2 Instructions for Building x86 DS samples docker image ``` -sudo image_url=deepstream:6.4.0-samples-local \ - ds_pkg=deepstream_sdk_v6.4.0_x86_64.tbz2 \ - ds_pkg_dir=deepstream_sdk_v6.4.0.0_x86_64/ \ +sudo image_url=deepstream:7.0.0-samples-local \ + ds_pkg=deepstream_sdk_v7.0.0_x86_64.tbz2 \ + ds_pkg_dir=deepstream_sdk_v7.0.0.0_x86_64/ \ base_image=dgpu-any-custom-base-image make -f Makefile runtime -C x86_64/ ``` @@ -123,21 +103,21 @@ Please refer to the Prerequisites section at DeepStream NGC page [NVIDIA NGC](ht Download DeepStreamSDK tarball from [DeepStreamSDK release](https://developer.nvidia.com/deepstream-getting-started) Jetson tarball and place it locally in the ``$ROOT/jetson`` folder of this repository. -``cp deepstream_sdk_v6.4.0_jetson.tbz2 jetson/ `` +``cp deepstream_sdk_v7.0.0_jetson.tbz2 jetson/ `` -## 3.1.1 Jetson needs VPI 3.0.10 pre-requisites. +## 3.1.1 Jetson needs VPI 3.1.5 pre-requisites. -The following VPI 3.0.10 *.deb (vpi-dev-3.0.10-aarch64-l4t.deb, vpi-lib-3.0.10-aarch64-l4t.deb) files are required from [JetPack 6.0 DP](https://developer.nvidia.com/embedded/jetpack). These need to be copied into the Jetson folder so they can be used by the build. +The following VPI 3.1.5 *.deb (vpi-dev-3.1.5-aarch64-l4t.deb, vpi-lib-3.1.5-aarch64-l4t.deb) files are required from [JetPack 6.0 GA](https://developer.nvidia.com/embedded/jetpack). These need to be copied into the Jetson folder so they can be used by the build. -``cp vpi-dev-3.0.10-aarch64-l4t.deb jetson/ `` -``cp vpi-lib-3.0.10-aarch64-l4t.deb jetson/ `` +``cp vpi-dev-3.1.5-aarch64-l4t.deb jetson/ `` +``cp vpi-lib-3.1.5-aarch64-l4t.deb jetson/ `` ## 3.1.2 Jetson build command ``` -sudo image_url=deepstream-l4t:6.4.0-triton-local \ - ds_pkg=deepstream_sdk_v6.4.0_jetson.tbz2 \ - ds_pkg_dir=deepstream_sdk_v6.4.0_jetson \ +sudo image_url=deepstream-l4t:7.0.0-triton-local \ + ds_pkg=deepstream_sdk_v7.0.0_jetson.tbz2 \ + ds_pkg_dir=deepstream_sdk_v7.0.0_jetson \ base_image=jetson-any-custom-base-image make -f Makefile triton -C jetson/ There is an example build script is called $ROOT/buildjet.sh with the same contents. @@ -149,22 +129,22 @@ sudo image_url=deepstream-l4t:6.4.0-triton-local \ ### 3.2.1 Instructions for building Jetson DS triton docker image ``` -sudo image_url=deepstream-l4t:6.4.0-triton-local \ - ds_pkg=deepstream_sdk_v6.4.0_jetson.tbz2 \ - ds_pkg_dir=deepstream_sdk_v6.4.0_jetson \ +sudo image_url=deepstream-l4t:7.0.0-triton-local \ + ds_pkg=deepstream_sdk_v7.0.0_jetson.tbz2 \ + ds_pkg_dir=deepstream_sdk_v7.0.0_jetson \ base_image=jetson-any-custom-base-image make -f Makefile triton -C jetson/ ``` ### 3.2.2 Instructions for building Jetson DS samples docker image ``` -sudo image_url=deepstream-l4t:6.4.0-samples-local \ - ds_pkg=deepstream_sdk_v6.4.0_jetson.tbz2 \ - ds_pkg_dir=deepstream_sdk_v6.4.0_jetson \ +sudo image_url=deepstream-l4t:7.0.0-samples-local \ + ds_pkg=deepstream_sdk_v7.0.0_jetson.tbz2 \ + ds_pkg_dir=deepstream_sdk_v7.0.0_jetson \ base_image=jetson-any-custom-base-image make -f Makefile runtime -C jetson/ ``` ## 4 Triton Migration Guide -### 4.1 Changing triton version in DS 6.4 x86+dGPU docker image +### 4.1 Changing triton version in DS 7.0 x86+dGPU docker image Steps: @@ -178,33 +158,33 @@ x86_64/trtserver_base_devel/Dockerfile Change the FROM command to use the desired Triton version. -Current: Triton 23.08 +Current: Triton 23.10 ``` -FROM nvcr.io/nvidia/tritonserver:23.08-py3 +FROM nvcr.io/nvidia/tritonserver:23.10-py3 ``` -Example Migration to: Triton 23.11 +Example Migration to: Triton 24.04 ``` -FROM nvcr.io/nvidia/tritonserver:23.11-py3 +FROM nvcr.io/nvidia/tritonserver:24.04-py3 ``` 3. Edit the Triton client libraries URL in Dockerfile. Client libraries are available for download from [Triton Inference Server Releases page](https://github.com/triton-inference-server/server/releases). -Current: Triton 23.08 +Current: Triton 23.10 ``` -wget https://github.com/triton-inference-server/server/releases/download/v2.37.0/v2.37.0_ubuntu2204.clients.tar.gz +wget https://github.com/triton-inference-server/server/releases/download/v2.39.0/v2.39.0_ubuntu2204.clients.tar.gz ``` -Example Migration to: Triton 23.11 +Example Migration to: Triton 24.04 ``` -wget https://github.com/triton-inference-server/server/releases/download/v2.40.0/v2.40.0_ubuntu2204.clients.tar.gz +wget https://github.com/triton-inference-server/server/releases/download/v2.45.0/v2.45.0_ubuntu2204.clients.tar.gz ``` 4. Build the DS x86 triton docker following instructions [here](#221-instructions-for-building-x86-ds-triton-docker-image). -### 4.2 Changing triton version in DS 6.4 Jetson (iGPU) docker image +### 4.2 Changing triton version in DS 7.0 Jetson (iGPU) docker image Steps: @@ -218,25 +198,31 @@ jetson/ubuntu_base_devel/Dockerfile Change the FROM command to use the desired Triton version. -Current: Triton 23.11 +Current: Triton 24.03 ``` -FROM nvcr.io/nvidia/tritonserver:23.11-py3-igpu +FROM nvcr.io/nvidia/tritonserver:24.03-py3-igpu ``` -**Note**: Newer version of Triton is unavailable to verify migration at the time of DS 6.4 release. +Example Migration to: Triton 24.04 +``` +FROM nvcr.io/nvidia/tritonserver:24.04-py3-igpu +``` 3. Edit the Triton client libraries URL in Dockerfile. Client libraries are available for download from [Triton Inference Server Releases page](https://github.com/triton-inference-server/server/releases). -Current: Triton 23.08 +Current: Triton 24.03 ``` -wget https://github.com/triton-inference-server/server/releases/download/v2.40.0/tritonserver2.40.0-igpu.tar.gz +wget https://github.com/triton-inference-server/server/releases/download/v2.44.0/tritonserver2.44.0-igpu.tgz ``` -**Note**: Newer version of Triton is unavailable to verify migration at the time of DS 6.4 release. +Example Migration to: Triton 24.04 +``` +wget https://github.com/triton-inference-server/server/releases/download/v2.45.0/tritonserver2.45.0-igpu.tgz +``` 4. Build the DS x86 triton docker following instructions [here](#321-instructions-for-building-jetson-ds-triton-docker-image). @@ -244,20 +230,20 @@ wget https://github.com/triton-inference-server/server/releases/download/v2.40.0 #### 4.3.1 Tritonserver lib upgrade -DeepStream 6.4 Triton Server API is based on Triton 23.08 (x86) and Triton 23.11 (Jetson) release. +DeepStream 7.0 Triton Server API is based on Triton 23.10 (x86) and Triton 24.03 (Jetson) release. Regarding API compatibility, if a customer wants to upgrade triton, they need to make sure: a) new version's `tritonserver.h` is compatible with the: -[23.08 version of tritonserver.h for x86](https://github.com/triton-inference-server/core/blob/r23.08/include/triton/core/tritonserver.h), -[23.11 version of tritonserver.h for jetson](https://github.com/triton-inference-server/core/blob/r23.11/include/triton/core/tritonserver.h), +[23.10 version of tritonserver.h for x86](https://github.com/triton-inference-server/core/blob/r23.10/include/triton/core/tritonserver.h), +[24.03 version of tritonserver.h for jetson](https://github.com/triton-inference-server/core/blob/r24.03/include/triton/core/tritonserver.h), and b) new version’s `model_config.proto` is compatible with: -[23.08 version for x86](https://github.com/triton-inference-server/common/blob/r23.08/protobuf/model_config.proto), -[23.11 version for jetson](https://github.com/triton-inference-server/common/blob/r23.11/protobuf/model_config.proto), +[23.10 version for x86](https://github.com/triton-inference-server/common/blob/r23.10/protobuf/model_config.proto), +[24.03 version for jetson](https://github.com/triton-inference-server/common/blob/r24.03/protobuf/model_config.proto), To build specific Tritonserver version libs, users can follow instructions at https://github.com/triton-inference-server/server/blob/master/docs/build.md. @@ -265,13 +251,13 @@ To build specific Tritonserver version libs, users can follow instructions at ht #### 4.3.2 DeepStream Config file Requirement Gst-nvinferserver plugin’s config file kept backward compatibility. -Triton model/backend’s config.pbtxt file must follow rules of 23.08’s ``model_config.proto`` for x86 and 23.11's ``model_config.proto`` for jetson. +Triton model/backend’s config.pbtxt file must follow rules of 23.10’s ``model_config.proto`` for x86 and 24.03's ``model_config.proto`` for jetson. ### 4.4 Ubuntu Version Requirements #### 4.4.1 Ubuntu 22.04 -DeepStream 6.4 release package inherently support Ubuntu 22.04. +DeepStream 7.0 release package inherently support Ubuntu 22.04. Thus, the only thing to consider is API/ABI compatibility between the new Triton version and the Triton version supported by current DS release. diff --git a/buildjet.sh b/buildjet.sh index 5a98a58..46a1296 100755 --- a/buildjet.sh +++ b/buildjet.sh @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -21,7 +21,7 @@ # Example script to build Jetson triton docker on a Jetson device -sudo image_url=deepstream-l4t:6.4.0-triton-local \ - ds_pkg=deepstream_sdk_v6.4.0_jetson.tbz2 \ - ds_pkg_dir=deepstream_sdk_v6.4.0_jetson \ +sudo image_url=deepstream-l4t:7.0.0-triton-local \ + ds_pkg=deepstream_sdk_v7.0.0_jetson.tbz2 \ + ds_pkg_dir=deepstream_sdk_v7.0.0_jetson \ base_image=jetson-any-custom-base-image make -f Makefile triton -C jetson/ diff --git a/buildx86.sh b/buildx86.sh index 709c654..6a00981 100755 --- a/buildx86.sh +++ b/buildx86.sh @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -21,7 +21,7 @@ # Example script to build x86 docker (currently building a x86 triton docker). -sudo image_url=deepstream:6.4.0-triton-local \ - ds_pkg=deepstream_sdk_v6.4.0_x86_64.tbz2 \ - ds_pkg_dir=deepstream_sdk_v6.4.0_x86_64/ \ +sudo image_url=deepstream:7.0.0-triton-local \ + ds_pkg=deepstream_sdk_v7.0.0_x86_64.tbz2 \ + ds_pkg_dir=deepstream_sdk_v7.0.0_x86_64/ \ base_image=dgpu-any-custom-base-image make -f Makefile_x86_triton triton-devel -C x86_64/ diff --git a/common/Dockerfile.cleanup b/common/Dockerfile.cleanup index 03aef8c..74c7116 100644 --- a/common/Dockerfile.cleanup +++ b/common/Dockerfile.cleanup @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -19,7 +19,6 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. - ARG IMAGE FROM ${IMAGE} diff --git a/common/Makefile b/common/Makefile index a09b052..9a517a1 100644 --- a/common/Makefile +++ b/common/Makefile @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -19,8 +19,6 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. - - top=$(abspath $(lastword $(MAKEFILE_LIST))/../..) $(info $(top)) include $(top)/common/version diff --git a/common/install_base.sh b/common/install_base.sh index 8436218..014ce91 100755 --- a/common/install_base.sh +++ b/common/install_base.sh @@ -1,6 +1,5 @@ #!/bin/bash -# -# 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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -22,8 +21,6 @@ # DEALINGS IN THE SOFTWARE. -# - utils_install_librdkafka_from_source() { # @{ librdkafka from source; @@ -87,6 +84,29 @@ utils_install_libmosquitto_from_source() } +utils_install_glib_from_source() +{ + echo "Installing Dependencies: " + apt update + apt-get install -y python3 python3-pip python3-setuptools python3-wheel ninja-build + pip3 install meson + + echo "Installing glib 2.76.6: " + cd "/root/tmp" + git clone https://github.com/GNOME/glib.git + cd glib + git checkout 2.76.6 + meson build --prefix=/usr + ninja -C build/ + cd build/ + ninja install + cd "/root/tmp" + rm -rf glib + echo "finished installing glib" +} + + + #Throws an error and causes a build failure for all errors in the script #Custom Message describes where the error was thrown set -o errtrace @@ -110,6 +130,14 @@ utils_install_libhiredis_from_source utils_install_libmosquitto_from_source +utils_install_glib_from_source + +uname -a + +apt update +apt-get install git +git --version + echo "${PLATFORM}" # License and IP diff --git a/common/install_devel.sh b/common/install_devel.sh index caf75ba..a92a0f8 100755 --- a/common/install_devel.sh +++ b/common/install_devel.sh @@ -1,6 +1,5 @@ #!/bin/bash -# -# 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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -21,9 +20,6 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. - -# - utils_install_librdkafka_from_source() { # @{ librdkafka from source; @@ -82,6 +78,26 @@ utils_install_libmosquitto_from_source() } +utils_install_glib_from_source() +{ + echo "Installing Dependencies: " + apt-get install -y python3 python3-pip python3-setuptools python3-wheel ninja-build + pip3 install meson + + echo "Installing glib 2.76.6: " + cd "/root/tmp" + git clone https://github.com/GNOME/glib.git + cd glib + git checkout 2.76.6 + meson build --prefix=/usr + ninja -C build/ + cd build/ + ninja install + cd "/root/tmp" + rm -rf glib + echo "finished installing glib" +} + #Throws an error and causes a build failure for all errors in the script #Custom Message describes where the error was thrown @@ -101,6 +117,8 @@ utils_install_libhiredis_from_source utils_install_libmosquitto_from_source +utils_install_glib_from_source + # License and IP mv /opt/user_additional_install_devel.sh /opt/nvidia/deepstream/deepstream/user_additional_install.sh mv /opt/user_deepstream_python_apps_install.sh /opt/nvidia/deepstream/deepstream/user_deepstream_python_apps_install.sh diff --git a/common/install_runtime.sh b/common/install_runtime.sh index ed69c70..3b31213 100755 --- a/common/install_runtime.sh +++ b/common/install_runtime.sh @@ -1,6 +1,5 @@ #!/bin/bash -# -# 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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -21,8 +20,6 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -# - utils_install_librdkafka_from_source() { # @{ librdkafka from source; @@ -85,6 +82,30 @@ utils_install_libmosquitto_from_source() } +utils_install_glib_from_source() +{ + echo "Installing Dependencies: " + apt update + apt-get install -y python3 python3-pip python3-setuptools python3-wheel ninja-build + pip3 install meson + + echo "Installing glib 2.76.6: " + cd "/root/tmp" + git clone https://github.com/GNOME/glib.git + cd glib + git checkout 2.76.6 + meson build --prefix=/usr + ninja -C build/ + cd build/ + ninja install + cd "/root/tmp" + rm -rf glib + echo "finished installing glib" +} + + + + #Throws an error and causes a build failure for all errors in the script #Custom Message describes where the error was thrown set -o errtrace @@ -102,6 +123,12 @@ utils_install_libhiredis_from_source utils_install_libmosquitto_from_source +ARCH=`uname -m` +# if [ "$ARCH" == "x86_64" ]; then + utils_install_glib_from_source +# fi + + # License and IP mv /opt/user_additional_install_runtime.sh /opt/nvidia/deepstream/deepstream/user_additional_install.sh cp /root/tmp/LicenseAgreementContainer.pdf /opt/nvidia/deepstream/deepstream/ diff --git a/common/install_test5.sh b/common/install_test5.sh index 3cff4e5..4b1d08d 100755 --- a/common/install_test5.sh +++ b/common/install_test5.sh @@ -1,6 +1,5 @@ #!/bin/bash -# -# 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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -20,7 +19,6 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -# utils_install_librdkafka_from_source() { diff --git a/common/install_triton-devel.sh b/common/install_triton-devel.sh index 9f57cad..ba6fa6d 100755 --- a/common/install_triton-devel.sh +++ b/common/install_triton-devel.sh @@ -1,6 +1,5 @@ #!/bin/bash -# -# 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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -77,6 +76,26 @@ utils_install_libmosquitto_from_source() echo "finished installing libmosquitto" } +utils_install_glib_from_source() +{ + echo "Installing Dependencies: " + apt-get install -y python3 python3-pip python3-setuptools python3-wheel ninja-build + pip3 install meson + + echo "Installing glib 2.76.6: " + cd "/root/tmp" + git clone https://github.com/GNOME/glib.git + cd glib + git checkout 2.76.6 + meson build --prefix=/usr + ninja -C build/ + cd build/ + ninja install + cd "/root/tmp" + rm -rf glib + echo "finished installing glib" +} + #Throws an error and causes a build failure for all errors in the script @@ -96,6 +115,8 @@ utils_install_libhiredis_from_source utils_install_libmosquitto_from_source +utils_install_glib_from_source + cp /root/tmp/LicenseAgreementContainer.pdf /opt/nvidia/deepstream/deepstream/ mv /opt/user_additional_install_devel.sh /opt/nvidia/deepstream/deepstream/user_additional_install.sh diff --git a/common/install_triton.sh b/common/install_triton.sh index 42e6ed8..06ce20c 100755 --- a/common/install_triton.sh +++ b/common/install_triton.sh @@ -1,6 +1,5 @@ #!/bin/bash -# -# 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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -21,7 +20,6 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. - #=============================================================================== #IMPORTANT NOTE: This file is For Jetson only #=============================================================================== @@ -84,6 +82,31 @@ utils_install_libmosquitto_from_source() } +utils_install_glib_from_source() +{ + # ARCH=`uname -m` + # if [ "$ARCH" == "x86_64" ]; then + echo "Installing Dependencies: " + apt update + apt-get install -y python3 python3-pip python3-setuptools python3-wheel ninja-build + pip3 install meson + + echo "Installing glib 2.76.6: " + cd "/root/tmp" + git clone https://github.com/GNOME/glib.git + cd glib + git checkout 2.76.6 + meson build --prefix=/usr + ninja -C build/ + cd build/ + ninja install + cd "/root/tmp" + rm -rf glib + echo "finished installing glib" + # fi +} + + cd "/root/tmp" @@ -102,6 +125,8 @@ utils_install_libhiredis_from_source utils_install_libmosquitto_from_source +utils_install_glib_from_source + # License and IP mv /opt/user_additional_install_devel.sh /opt/nvidia/deepstream/deepstream/user_additional_install.sh mv /opt/user_deepstream_python_apps_install.sh /opt/nvidia/deepstream/deepstream/user_deepstream_python_apps_install.sh diff --git a/common/post_install_script.sh b/common/post_install_script.sh index 80b1888..7211f6b 100755 --- a/common/post_install_script.sh +++ b/common/post_install_script.sh @@ -1,5 +1,6 @@ #!/bin/bash -# 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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -20,5 +21,4 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. - # cp /root/tmp/LicenseAgreement.pdf /opt/nvidia/deepstream/deepstream/ diff --git a/common/version b/common/version index 4ae91f3..ae46f14 100644 --- a/common/version +++ b/common/version @@ -1,4 +1,4 @@ -version=6.4.0 +version=7.0.0 tag=gmc1 registry ?= nvcr.io/nvidian image_tag=$(version)-$(tag) diff --git a/jetson/Makefile b/jetson/Makefile index 816f18b..77e683d 100644 --- a/jetson/Makefile +++ b/jetson/Makefile @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a diff --git a/jetson/ubuntu_base_devel/Dockerfile b/jetson/ubuntu_base_devel/Dockerfile index ad1447d..3e3b325 100644 --- a/jetson/ubuntu_base_devel/Dockerfile +++ b/jetson/ubuntu_base_devel/Dockerfile @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -19,19 +19,21 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. + ARG L4T_VERSION -FROM nvcr.io/nvidia/tritonserver:23.11-py3-igpu +FROM nvcr.io/nvidia/tritonserver:24.04-py3-igpu - ADD vpi-lib-3.0.10-aarch64-l4t.deb /root - ADD vpi-dev-3.0.10-aarch64-l4t.deb /root +ADD vpi-lib-3.1.5-aarch64-l4t.deb /root +ADD vpi-dev-3.1.5-aarch64-l4t.deb /root # # Configure nvidia public apt repo # RUN apt-key adv --fetch-keys https://repo.download.nvidia.com/jetson/jetson-ota-public.asc -RUN echo "deb https://repo.download.nvidia.com/jetson/common r36.2 main" >> /etc/apt/sources.list +RUN echo "deb https://repo.download.nvidia.com/jetson/common r36.3 main" >> /etc/apt/sources.list + # GStreamer + deepstream devel dependencies RUN apt-get update && \ @@ -86,10 +88,12 @@ RUN apt-get update && \ locales \ libc6 \ libcurl3-gnutls \ + linux-libc-dev \ libc-dev-bin && \ rm -rf /var/lib/apt/lists/* && \ apt autoremove + RUN mkdir -p /opt/tritonclient/ && \ mkdir -p /tmp/temp_triton99 && \ mkdir -p /opt/proto && \ @@ -97,8 +101,8 @@ RUN mkdir -p /opt/tritonclient/ && \ mkdir -p /opt/half && \ mkdir -p /tmp/half99 && \ cd /tmp/temp_triton99 && \ - wget https://github.com/triton-inference-server/server/releases/download/v2.40.0/tritonserver2.40.0-igpu.tar.gz -nv && \ - tar xzf tritonserver2.40.0-igpu.tar.gz -C /opt/tritonclient/ --strip-components=2 tritonserver/clients/lib tritonserver/clients/include && \ + wget https://github.com/triton-inference-server/server/releases/download/v2.45.0/tritonserver2.45.0-igpu.tgz -nv && \ + tar xvf tritonserver2.45.0-igpu.tgz -C /opt/tritonclient/ --strip-components=2 tritonserver/clients/lib/ tritonserver/clients/include && \ cd /tmp/temp_proto99 && \ wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-aarch_64.zip -nv && \ /usr/bin/unzip /tmp/temp_proto99/protoc-3.19.4-linux-aarch_64.zip -d /opt/proto && \ @@ -116,10 +120,10 @@ RUN mkdir -p /lib/firmware RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - /root/vpi-dev-3.0.10-aarch64-l4t.deb \ - /root/vpi-lib-3.0.10-aarch64-l4t.deb && \ + /root/vpi-dev-3.1.5-aarch64-l4t.deb \ + /root/vpi-lib-3.1.5-aarch64-l4t.deb && \ rm -rf /var/lib/apt/lists/* && \ - rm -f /root/vpi-dev-3.0.10-aarch64-l4t.deb /root/vpi-lib-3.0.10-aarch64-l4t.deb && \ + rm -f /root/vpi-dev-3.1.5-aarch64-l4t.deb /root/vpi-lib-3.1.5-aarch64-l4t.deb && \ apt autoremove # patch igpu triton jetson base docker cuda 12.2 directory from jetpack @@ -127,11 +131,11 @@ RUN apt-get update && \ RUN mv /usr/local/cuda-12.2/lib64/libnvjpeg.so /usr/local/cuda-12.2/lib64/libnvjpeg.so.bak - # rsyslog into /etc/init.d/ (service can run) ADD deps/rsyslog /etc/init.d/ RUN chmod +x /etc/init.d/rsyslog + # workaround for directory rename from tegra to nvidia (symlink for jetson triton base docker) RUN ln -s /usr/lib/aarch64-linux-gnu/nvidia /usr/lib/aarch64-linux-gnu/tegra @@ -151,6 +155,7 @@ RUN rm -f /usr/lib/aarch64-linux-gnu/libmpg123.so* /usr/lib/aarch64-linux-gnu/li /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstopenh264.so /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvcodec.so + CMD ["/bin/bash"] WORKDIR /opt/nvidia/deepstream/deepstream @@ -161,6 +166,8 @@ ADD user_deepstream_python_apps_install.sh /opt/ # workaround for TRT missing symlinks RUN ln -s /usr/src/tensorrt/bin/trtexec /usr/bin/trtexec + + RUN ldconfig ENV LD_LIBRARY_PATH /opt/tritonserver/lib:/usr/local/cuda-12.2/lib64 diff --git a/jetson/ubuntu_base_runtime/Dockerfile b/jetson/ubuntu_base_runtime/Dockerfile index 7afe5e0..1c478e6 100644 --- a/jetson/ubuntu_base_runtime/Dockerfile +++ b/jetson/ubuntu_base_runtime/Dockerfile @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -19,6 +19,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. + ARG L4T_VERSION FROM nvcr.io/nvidia/l4t-tensorrt:r8.6.2-runtime @@ -28,11 +29,12 @@ FROM nvcr.io/nvidia/l4t-tensorrt:r8.6.2-runtime # RUN apt-key adv --fetch-keys https://repo.download.nvidia.com/jetson/jetson-ota-public.asc -RUN echo "deb https://repo.download.nvidia.com/jetson/common r36.2 main" >> /etc/apt/sources.list +RUN echo "deb https://repo.download.nvidia.com/jetson/common r36.3 main" >> /etc/apt/sources.list + -ADD vpi-lib-3.0.10-aarch64-l4t.deb /root -ADD vpi-dev-3.0.10-aarch64-l4t.deb /root +ADD vpi-dev-3.1.5-aarch64-l4t.deb /root +ADD vpi-lib-3.1.5-aarch64-l4t.deb /root # GStreamer + deepstream dependencies RUN apt-get update && \ @@ -56,28 +58,27 @@ ADD vpi-dev-3.0.10-aarch64-l4t.deb /root libssl-dev \ libcurl4-openssl-dev \ libcjson-dev \ + linux-libc-dev \ wget \ ca-certificates && \ rm -rf /var/lib/apt/lists/* && \ apt autoremove -# work-around for vpi tests -RUN mkdir -p /lib/firmware - -RUN apt-get update && \ +RUN mkdir -p /lib/firmware ; apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - /root/vpi-dev-3.0.10-aarch64-l4t.deb \ - /root/vpi-lib-3.0.10-aarch64-l4t.deb && \ + /root/vpi-dev-3.1.5-aarch64-l4t.deb \ + /root/vpi-lib-3.1.5-aarch64-l4t.deb && \ rm -rf /var/lib/apt/lists/* && \ - rm -f /root/vpi-dev-3.0.10-aarch64-l4t.deb /root/vpi-lib-3.0.10-aarch64-l4t.deb && \ + rm -f /root/vpi-dev-3.1.5-aarch64-l4t.deb /root/vpi-lib-3.1.5-aarch64-l4t.deb && \ apt autoremove # rsyslog into /etc/init.d/ (service can run) ADD deps/rsyslog /etc/init.d/ RUN chmod +x /etc/init.d/rsyslog + # IP requirement for removal RUN rm -f /usr/lib/aarch64-linux-gnu/libavresample* /usr/lib/aarch64-linux-gnu/libavutil* \ /usr/lib/aarch64-linux-gnu/libavcodec* /usr/lib/aarch64-linux-gnu/libavformat* \ @@ -103,7 +104,6 @@ ADD user_additional_install_runtime.sh /opt/ # workaround for directory change from tegra to nvidia RUN ln -s /usr/lib/aarch64-linux-gnu/nvidia /usr/lib/aarch64-linux-gnu/tegra - # Workaround for Cuda missing symlinks in FAT base docker RUN ln -s /usr/local/cuda-12.2/targets/aarch64-linux/lib/libcufft.so.11 /usr/local/cuda-12.2/targets/aarch64-linux/lib/libcufft.so RUN ln -s /usr/local/cuda-12.2/targets/aarch64-linux/lib/libcublas.so.12 /usr/local/cuda-12.2/targets/aarch64-linux/lib/libcublas.so @@ -118,6 +118,7 @@ RUN ln -s /usr/src/tensorrt/bin/trtexec /usr/bin/trtexec # Workaround for build # Nvinfer libs: + RUN ln -s /usr/lib/aarch64-linux-gnu/libnvparsers.so.8 /usr/lib/aarch64-linux-gnu/libnvparsers.so RUN ln -s /usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so.8 /usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so @@ -138,7 +139,6 @@ ENV NVIDIA_DRIVER_CAPABILITIES all ENV LD_PRELOAD /usr/lib/aarch64-linux-gnu/libgomp.so.1:/lib/aarch64-linux-gnu/libGLdispatch.so:$LD_PRELOAD # IP requirement for removal -# remove gstreamer1.0-libav (it is also in the base docker image) RUN DEBIAN_FRONTEND=noninteractive apt-get purge -y gstreamer1.0-libav # Clean up link to internal repo diff --git a/jetson/user_additional_install_devel.sh b/jetson/user_additional_install_devel.sh index 274de8d..ecd8d29 100755 --- a/jetson/user_additional_install_devel.sh +++ b/jetson/user_additional_install_devel.sh @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -19,6 +19,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. + # additional components the user can self install apt-get update apt-get install -y gstreamer1.0-libav diff --git a/jetson/user_additional_install_runtime.sh b/jetson/user_additional_install_runtime.sh index 3b6c59a..6ffb1f1 100755 --- a/jetson/user_additional_install_runtime.sh +++ b/jetson/user_additional_install_runtime.sh @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a diff --git a/jetson/user_deepstream_python_apps_install.sh b/jetson/user_deepstream_python_apps_install.sh index e6943db..8251675 100755 --- a/jetson/user_deepstream_python_apps_install.sh +++ b/jetson/user_deepstream_python_apps_install.sh @@ -1,5 +1,5 @@ #!/bin/bash -# 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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -60,6 +60,7 @@ apt-get install --reinstall -y gstreamer1.0-plugins-good gstreamer1.0-plugins-ba echo "Deleting GStreamer cache" rm -rf ~/.cache/gstreamer-1.0/ apt install -y python3-gi python3-dev python3-gst-1.0 python-gi-dev git meson python3 python3-pip python3.10-dev cmake g++ build-essential libglib2.0-dev libglib2.0-dev-bin libgstreamer1.0-dev libtool m4 autoconf automake libgirepository1.0-dev libcairo2-dev +pip3 install cuda-python cd /opt/nvidia/deepstream/deepstream/sources if [ -z "$remote_branch" ] then @@ -87,15 +88,16 @@ then apt-get install -y apt-transport-https ca-certificates -y update-ca-certificates cd 3rdparty/gstreamer/subprojects/gst-python/ - meson build - meson configure + # meson build + # meson configure + meson setup build cd build ninja ninja install cd /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps/bindings rm -rf build && mkdir build && cd build cmake .. -DPYTHON_MAJOR_VERSION=3 -DPYTHON_MINOR_VERSION=10 -DPIP_PLATFORM=linux_aarch64 -DDS_PATH=/opt/nvidia/deepstream/deepstream - make + make -j$(nproc) echo "###########################" echo "Installing built PyDS wheel" echo "###########################" diff --git a/x86_64/Makefile b/x86_64/Makefile index 33cbfef..b62f19a 100644 --- a/x86_64/Makefile +++ b/x86_64/Makefile @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a diff --git a/x86_64/Makefile_x86_triton b/x86_64/Makefile_x86_triton index bc85f0e..c9e2f25 100644 --- a/x86_64/Makefile_x86_triton +++ b/x86_64/Makefile_x86_triton @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -23,7 +23,7 @@ img_type = base test5 runtime devel its trtis triton-devel triton-devel-gc prefix = deepstream_x86 platform = x86_64 -ds_dir = /opt/nvidia/deepstream/deepstream-6.4 +ds_dir = /opt/nvidia/deepstream/deepstream-7.0 platform_build_arg = --build-arg TENSORRT_VERSION="8.5.3-1+cuda11.8" platform_build_arg += --build-arg CUDNN_VERSION="8.8.1.3-1+cuda12.0" platform_build_arg += --build-arg CUDA_VERSION="12.1.1" diff --git a/x86_64/triton_user_additional_install_devel.sh b/x86_64/triton_user_additional_install_devel.sh index 41294a6..483b7d5 100755 --- a/x86_64/triton_user_additional_install_devel.sh +++ b/x86_64/triton_user_additional_install_devel.sh @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a diff --git a/x86_64/triton_user_deepstream_python_apps_install.sh b/x86_64/triton_user_deepstream_python_apps_install.sh new file mode 100755 index 0000000..2caabd0 --- /dev/null +++ b/x86_64/triton_user_deepstream_python_apps_install.sh @@ -0,0 +1,157 @@ +#!/bin/bash +# SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: MIT +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + + +# User script to download and install PyDS from https://github.com/NVIDIA-AI-IOT/deepstream_python_apps +# -v option can be used to specify which version of PyDS to download and install +# -b option can be used to indicate that latest available bindings should be downloaded and installed + +function usage() { + echo "Usage: $0 -v PyDS-version -b (build-latest-bindings)" + echo " -v, --version The version of PyDS to download and install" + echo " OR " + echo " -b, --build-bindings Compile and install latest PyDS instead of downloading wheels" + echo " -r, --remote-branch Specify which branch of deepstream_python_apps to clone and build from" + echo "" + echo "Example: $0 --version 1.1.4" + echo "Example: $0 --build-bindings" + echo "Example: $0 --build-bindings -r master" + exit 1 +} + +while [[ "$#" > 0 ]]; do + case $1 in + -v|--version) version="$2"; shift 2;; + -r|--remote-branch) remote_branch="$2"; shift 2;; + -b|--build-bindings) build_bindings=1; shift 1;; + -h|--help) usage; shift 1;; + *) echo "Unknown parameter passed: $1"; exit 1 ;; + esac +done + +if [ -z "$version" ] && [ -z "$build_bindings" ]; then usage "The version of PyDS to download and install"; fi; + +cd /opt/nvidia/deepstream/deepstream +echo "####################################" +echo "Downloading necessary pre-requisites" +echo "####################################" +apt-get update +apt-get install -y gstreamer1.0-libav +apt-get install --reinstall -y gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libswresample-dev libavutil-dev libavutil56 libavcodec-dev libavcodec58 libavformat-dev libavformat58 libavfilter7 libde265-dev libde265-0 libx265-199 libx264-163 libvpx7 libmpeg2encpp-2.1-0 libmpeg2-4 libmpg123-0 +echo "Deleting GStreamer cache" +rm -rf ~/.cache/gstreamer-1.0/ +apt install -y python3-gi python3-dev python3-gst-1.0 python-gi-dev git meson \ + python3 python3-pip python3.10-dev cmake g++ build-essential libglib2.0-dev \ + libglib2.0-dev-bin libgstreamer1.0-dev libtool m4 autoconf automake libgirepository1.0-dev libcairo2-dev + +pip3 install cuda-python +cd /opt/nvidia/deepstream/deepstream/sources +if [ -z "$remote_branch" ] +then + remote_branch="master" + echo "#################################" + echo "Default sync branch set to master" + echo "#################################" +fi + +git clone -b "$remote_branch" https://github.com/NVIDIA-AI-IOT/deepstream_python_apps.git +if [ $? -eq 0 ]; then + echo "deepstream_python_apps cloned successfully from branch $remote_branch" +else + echo "deepstream_python_apps clone from branch $remote_branch FAILED! Exiting..." + exit 1 +fi + +if [ -z "$version" ] && [ $build_bindings == 1 ] +then + echo "############################" + echo "Building downloaded bindings" + echo "############################" + + cd /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps + git submodule update --init + apt-get install -y apt-transport-https ca-certificates -y + update-ca-certificates + cd 3rdparty/gstreamer/subprojects/gst-python/ + # meson build + # meson configure + meson setup build + cd build + ninja + ninja install + cd /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps/bindings + rm -rf build && mkdir build && cd build + platform=$(uname -m) + if [ $platform == "aarch64" ] + then + cmake .. -DPYTHON_MAJOR_VERSION=3 -DPYTHON_MINOR_VERSION=10 -DPIP_PLATFORM=linux_aarch64 -DDS_PATH=/opt/nvidia/deepstream/deepstream/ + else + cmake .. + fi + make -j$(nproc) + echo "###########################" + echo "Installing built PyDS wheel" + echo "###########################" + if [ $platform == "aarch64" ] + then + pip3 install ./pyds-1*_aarch64.whl + else + pip3 install ./pyds-1*_x86_64.whl + fi +elif [ -z "$build_bindings" ] && [[ ! -z $version ]] +then + echo "##############################" + echo "Pulling PyDS version: $version" + echo "##############################" + cd /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps + platform=$(uname -m) + if [ $platform == "aarch64" ] + then + URL="https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/releases/download/v$version/pyds-$version-py3-none-linux_aarch64.whl" + else + URL="https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/releases/download/v$version/pyds-$version-py3-none-linux_x86_64.whl" + fi + echo "url" + echo $URL + wget "$URL" + if [ $platform == "aarch64" ] + then + wheel_file="pyds-$version-py3-none-linux_aarch64.whl" + else + wheel_file="pyds-$version-py3-none-linux_x86_64.whl" + fi + if [ -f $wheel_file ] + then + echo "########################################################" + echo "Downloaded wheel $wheel_file" + echo "########################################################" + echo "#####################" + echo "Installing PyDS wheel" + echo "#####################" + pip3 install $wheel_file + else + echo "#########################################" + echo "PyDS wheel was not downloaded. Exiting..." + echo "#########################################" + exit 1 + fi +fi diff --git a/x86_64/trtserver_base_devel/Dockerfile b/x86_64/trtserver_base_devel/Dockerfile index a6ae05b..38ab65a 100644 --- a/x86_64/trtserver_base_devel/Dockerfile +++ b/x86_64/trtserver_base_devel/Dockerfile @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -19,7 +19,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -FROM nvcr.io/nvidia/tritonserver:23.08-py3 +FROM nvcr.io/nvidia/tritonserver:24.04-py3 ARG TENSORRT_VERSION ARG CUDNN_VERSION @@ -30,8 +30,6 @@ ARG BOOST_VERSION=1.71.0 # Removing unnecessary nvidia entries in sources.list RUN head -n -2 /etc/apt/sources.list > /tmp/tmp.txt && mv /tmp/tmp.txt /etc/apt/sources.list - - # install realsense sdk for 3d camera # instructions: https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE && \ @@ -50,6 +48,8 @@ RUN head -n -2 /etc/apt/sources.list > /tmp/tmp.txt && mv /tmp/tmp.txt /etc/apt/ libyaml-cpp-dev \ gnutls-bin + + RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ linux-libc-dev \ @@ -112,6 +112,7 @@ RUN head -n -2 /etc/apt/sources.list > /tmp/tmp.txt && mv /tmp/tmp.txt /etc/apt/ libc-bin \ libpmi2-0 \ libcurl4 \ + linux-libc-dev \ curl && \ rm -rf /var/lib/apt/lists/* && \ apt autoremove @@ -122,18 +123,41 @@ RUN pip3 install --upgrade pip # config file ADD deps/ofed-ucx.conf /root +# update CUDNN to 8.9.6 +# NOTE This should already be downloaded into x86_64 directory +ADD cudnn-local-repo-ubuntu2204-8.9.6.50_1.0-1_amd64.deb /tmp + + RUN mkdir -p /tmp/temp_trt && \ + cd /tmp/temp_trt && \ + ls -l /tmp/temp_trt/ && \ + mv /tmp/cudnn-local-repo-ubuntu2204-8.9.6.50_1.0-1_amd64.deb /tmp/temp_trt/ && \ + ls -l /tmp/temp_trt/ && \ + dpkg -i ./cudnn-local-repo-ubuntu2204-8.9.6.50_1.0-1_amd64.deb && \ + cp /var/cudnn-local-repo-ubuntu2204-8.9.6.50/cudnn-local-1998375D-keyring.gpg /usr/share/keyrings/ && \ + apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + libcudnn8-dev=8.9.6.50-1+cuda12.2 \ + libcudnn8=8.9.6.50-1+cuda12.2 && \ + cd /tmp && \ + dpkg --purge cudnn-local-repo-ubuntu2204-8.9.6.50 && \ + rm -rf temp_trt && \ + rm -rf /var/lib/apt/lists/* -# Mellanox OFED libraries: 5.7+ +# config file +ADD deps/ofed-ucx.conf /root + + +# Mellanox OFED libraries: 23.10+ RUN mkdir /opt/dev_ucx && \ - wget -O /opt/dev_ucx/MLNX_OFED_LINUX-5.7-1.0.2.0-ubuntu22.04-x86_64.tgz https://content.mellanox.com/ofed/MLNX_OFED-5.7-1.0.2.0/MLNX_OFED_LINUX-5.7-1.0.2.0-ubuntu22.04-x86_64.tgz --no-check-certificate --no-verbose && \ - mv /root/ofed-ucx.conf /opt/dev_ucx/ && \ + wget -O /opt/dev_ucx/MLNX_OFED_LINUX-23.10-1.1.9.0-ubuntu22.04-x86_64.tgz https://content.mellanox.com/ofed/MLNX_OFED-23.10-1.1.9.0/MLNX_OFED_LINUX-23.10-1.1.9.0-ubuntu22.04-x86_64.tgz --no-check-certificate --no-verbose && \ + wget -O /opt/dev_ucx/ofed-ucx.conf https://urm.nvidia.com/artifactory/sw-ds-generic/depend/ucx/ofed-ucx.conf --no-check-certificate --no-verbose && \ cd /opt/dev_ucx && \ - tar --no-same-owner -xf MLNX_OFED_LINUX-5.7-1.0.2.0-ubuntu22.04-x86_64.tgz && \ - cp /opt/dev_ucx/ofed-ucx.conf /opt/dev_ucx/MLNX_OFED_LINUX-5.7-1.0.2.0-ubuntu22.04-x86_64/ && \ - cd /opt/dev_ucx/MLNX_OFED_LINUX-5.7-1.0.2.0-ubuntu22.04-x86_64 && \ - ls -l /opt/dev_ucx/MLNX_OFED_LINUX-5.7-1.0.2.0-ubuntu22.04-x86_64 && \ - chmod +x /opt/dev_ucx/MLNX_OFED_LINUX-5.7-1.0.2.0-ubuntu22.04-x86_64/mlnxofedinstall && \ - /opt/dev_ucx/MLNX_OFED_LINUX-5.7-1.0.2.0-ubuntu22.04-x86_64/mlnxofedinstall --config /opt/dev_ucx/MLNX_OFED_LINUX-5.7-1.0.2.0-ubuntu22.04-x86_64/ofed-ucx.conf --without-fw-update -q --force + tar --no-same-owner -xf MLNX_OFED_LINUX-23.10-1.1.9.0-ubuntu22.04-x86_64.tgz && \ + cp /opt/dev_ucx/ofed-ucx.conf /opt/dev_ucx/MLNX_OFED_LINUX-23.10-1.1.9.0-ubuntu22.04-x86_64/ && \ + cd /opt/dev_ucx/MLNX_OFED_LINUX-23.10-1.1.9.0-ubuntu22.04-x86_64 && \ + ls -l /opt/dev_ucx/MLNX_OFED_LINUX-23.10-1.1.9.0-ubuntu22.04-x86_64 && \ + chmod +x /opt/dev_ucx/MLNX_OFED_LINUX-23.10-1.1.9.0-ubuntu22.04-x86_64/mlnxofedinstall && \ + /opt/dev_ucx/MLNX_OFED_LINUX-23.10-1.1.9.0-ubuntu22.04-x86_64/mlnxofedinstall --config /opt/dev_ucx/MLNX_OFED_LINUX-23.10-1.1.9.0-ubuntu22.04-x86_64/ofed-ucx.conf --without-fw-update -q --force # rsyslog into /etc/init.d/ (service can run) ADD deps/rsyslog /etc/init.d/ @@ -158,8 +182,8 @@ RUN mkdir -p /opt/tritonclient/ && \ mkdir -p /opt/half && \ mkdir -p /tmp/half99 && \ cd /tmp/temp_triton99 && \ - wget https://github.com/triton-inference-server/server/releases/download/v2.37.0/v2.37.0_ubuntu2204.clients.tar.gz -nv && \ - tar xzf v2.37.0_ubuntu2204.clients.tar.gz -C /opt/tritonclient/ lib include && \ + wget https://github.com/triton-inference-server/server/releases/download/v2.45.0/v2.45.0_ubuntu2204.clients.tar.gz -nv && \ + tar xzf v2.45.0_ubuntu2204.clients.tar.gz -C /opt/tritonclient/ lib include && \ cd /tmp/temp_proto99 && \ wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip -nv && \ /usr/bin/unzip /tmp/temp_proto99/protoc-3.19.4-linux-x86_64.zip -d /opt/proto && \ @@ -177,6 +201,7 @@ COPY trtserver_base_devel/10_nvidia.json /usr/share/glvnd/egl_vendor.d/10_nvidia COPY trtserver_base_devel/entrypoint.sh ${DS_DIR}/ +# ENV NVIDIA_DRIVER_CAPABILITIES $NVIDIA_DRIVER_CAPABILITIES,video,graphics ENV NVIDIA_DRIVER_CAPABILITIES $NVIDIA_DRIVER_CAPABILITIES,video,compute,graphics,utility ENV LD_LIBRARY_PATH /opt/tritonserver/lib:/usr/src/tensorrt/lib:/opt/riva/lib:/usr/local/cuda-12/lib64:$LD_LIBRARY_PATH @@ -192,11 +217,12 @@ RUN ln -s /usr/src/tensorrt/bin/trtexec /usr/bin/trtexec RUN ln -s /usr/lib/x86_64-linux-gnu/libnvidia-encode.so.1 /usr/lib/x86_64-linux-gnu/libnvidia-encode.so && \ ln -s /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1 /usr/lib/x86_64-linux-gnu/libnvidia-ml.so + ADD deps/gRPC_installation.sh /root/ RUN /root/gRPC_installation.sh -ENV PATH="${PATH}:${HOME}/.local/bin" -ENV LD_LIBARY_PATH="${LD_LIBRARY_PATH}:${HOME}/.local/lib" +ENV PATH="/opt/proto/bin:${PATH}:${HOME}/.local/bin" +ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${HOME}/.local/lib" ENV PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${HOME}/.local/lib/pkgconfig" @@ -219,7 +245,6 @@ RUN rm -f /usr/lib/x86_64-linux-gnu/libmpeg2.so* /usr/lib/x86_64-linux-gnu/libmp ADD user_additional_install_devel.sh /opt/ ADD user_deepstream_python_apps_install.sh /opt/ - RUN rm -f /root/gRPC_installation.sh /root/*deb && \ rm -rf /opt/dev_ucx /opt/dev_ucx2 && \ rm -rf /opt/tritonserver/backends/dali diff --git a/x86_64/ubuntu_base_runtime/Dockerfile b/x86_64/ubuntu_base_runtime/Dockerfile index 94bce02..1d48731 100644 --- a/x86_64/ubuntu_base_runtime/Dockerfile +++ b/x86_64/ubuntu_base_runtime/Dockerfile @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -19,10 +19,9 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. - ARG CUDA_VERSION -FROM nvcr.io/nvidia/cuda:12.2.0-runtime-ubuntu22.04 +FROM nvcr.io/nvidia/cuda:12.2.2-runtime-ubuntu22.04 ARG TENSORRT_VERSION ARG CUDNN_VERSION @@ -64,41 +63,65 @@ RUN apt-get update && \ gstreamer1.0-rtsp \ rsyslog \ git \ - openssl \ python3 \ libjsoncpp-dev \ gcc \ + g++ \ + make \ libjpeg-dev \ libxml2 \ + bzip2 \ zlib1g \ + linux-libc-dev \ tzdata && \ rm -rf /var/lib/apt/lists/* && \ apt autoremove +# remove tensorrt package install and force particular libraries/packages to a specific version +# libnvinfer8=8.6.1.6-1+cuda12.0 # Add TensorRT and CuDNN repo(s) -# NOTE This should already be downloaded into x86_64 directory +# NOTE These should already be downloaded into x86_64 directory ADD nv-tensorrt-local-repo-ubuntu2204-8.6.1-cuda-12.0_1.0-1_amd64.deb /tmp -ADD cudnn-local-repo-ubuntu2204-8.9.4.25_1.0-1_amd64.deb /tmp +ADD cudnn-local-repo-ubuntu2204-8.9.6.50_1.0-1_amd64.deb /tmp - RUN mkdir -p /tmp/temp_trt && \ +RUN mkdir -p /tmp/temp_trt && \ cd /tmp/temp_trt && \ mv /tmp/nv-tensorrt-local-repo-ubuntu2204-8.6.1-cuda-12.0_1.0-1_amd64.deb /tmp/temp_trt/ && \ ls -l /tmp/temp_trt/ && \ - mv /tmp/cudnn-local-repo-ubuntu2204-8.9.4.25_1.0-1_amd64.deb /tmp/temp_trt/ && \ + mv /tmp/cudnn-local-repo-ubuntu2204-8.9.6.50_1.0-1_amd64.deb /tmp/temp_trt/ && \ ls -l /tmp/temp_trt/ && \ dpkg -i /tmp/temp_trt/nv-tensorrt-local-repo-ubuntu2204-8.6.1-cuda-12.0_1.0-1_amd64.deb && \ cp /var/nv-tensorrt-local-repo-ubuntu2204-8.6.1-cuda-12.0/nv-tensorrt-local-42B2FC56-keyring.gpg /usr/share/keyrings/ && \ - dpkg -i ./cudnn-local-repo-ubuntu2204-8.9.4.25_1.0-1_amd64.deb && \ - cp /var/cudnn-local-repo-ubuntu2204-8.9.4.25/cudnn-local-3C3A81D3-keyring.gpg /usr/share/keyrings/ && \ + dpkg -i ./cudnn-local-repo-ubuntu2204-8.9.6.50_1.0-1_amd64.deb && \ + cp /var/cudnn-local-repo-ubuntu2204-8.9.6.50/cudnn-local-1998375D-keyring.gpg /usr/share/keyrings/ && \ apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - tensorrt \ - libcudnn8-dev=8.9.4.25-1+cuda12.2 \ - libcudnn8=8.9.4.25-1+cuda12.2 && \ + libnvinfer-lean8=8.6.1.6-1+cuda12.0 \ + libnvinfer-vc-plugin8=8.6.1.6-1+cuda12.0 \ + libnvinfer-headers-dev=8.6.1.6-1+cuda12.0 \ + libnvinfer-dev=8.6.1.6-1+cuda12.0 \ + libnvinfer-headers-plugin-dev=8.6.1.6-1+cuda12.0 \ + libnvinfer-plugin-dev=8.6.1.6-1+cuda12.0 \ + libnvonnxparsers-dev=8.6.1.6-1+cuda12.0 \ + libnvinfer-lean-dev=8.6.1.6-1+cuda12.0 \ + libnvparsers-dev=8.6.1.6-1+cuda12.0 \ + python3-libnvinfer-lean=8.6.1.6-1+cuda12.0 \ + python3-libnvinfer-dispatch=8.6.1.6-1+cuda12.0 \ + uff-converter-tf=8.6.1.6-1+cuda12.0 \ + onnx-graphsurgeon=8.6.1.6-1+cuda12.0 \ + libnvinfer-bin=8.6.1.6-1+cuda12.0 \ + libnvinfer-dispatch-dev=8.6.1.6-1+cuda12.0 \ + libnvinfer-dispatch8=8.6.1.6-1+cuda12.0 \ + libnvonnxparsers-dev=8.6.1.6-1+cuda12.0 \ + libnvonnxparsers8=8.6.1.6-1+cuda12.0 \ + libnvinfer-vc-plugin-dev=8.6.1.6-1+cuda12.0 \ + libnvinfer-samples=8.6.1.6-1+cuda12.0 \ + libcudnn8-dev=8.9.6.50-1+cuda12.2 \ + libcudnn8=8.9.6.50-1+cuda12.2 && \ cd /tmp && \ dpkg --purge nv-tensorrt-local-repo-ubuntu2204-8.6.1-cuda-12.0 && \ - dpkg --purge cudnn-local-repo-ubuntu2204-8.9.4.25 && \ + dpkg --purge cudnn-local-repo-ubuntu2204-8.9.6.50 && \ rm -rf temp_trt && \ rm -rf /var/lib/apt/lists/* @@ -122,15 +145,17 @@ RUN ln -s /usr/lib/x86_64-linux-gnu/libnvcuvid.so.1 /usr/lib/x86_64-linux-gnu/li ln -s /usr/lib/x86_64-linux-gnu/libnvidia-encode.so.1 /usr/lib/x86_64-linux-gnu/libnvidia-encode.so && \ ln -s /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1 /usr/lib/x86_64-linux-gnu/libnvidia-ml.so + ADD deps/gRPC_installation.sh /root/ RUN /root/gRPC_installation.sh ENV PATH="${PATH}:${HOME}/.local/bin" -ENV LD_LIBARY_PATH="${LD_LIBRARY_PATH}:${HOME}/.local/lib" +ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${HOME}/.local/lib" ENV PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:${HOME}/.local/lib/pkgconfig" # added wget so gRPC script could install +# RUN apt-get remove --purge -y wget RUN rm /root/gRPC_installation.sh && \ cd /tmp && \ rm -rf temp_cuda99 diff --git a/x86_64/user_additional_install_devel.sh b/x86_64/user_additional_install_devel.sh index f23e0b6..682f3db 100755 --- a/x86_64/user_additional_install_devel.sh +++ b/x86_64/user_additional_install_devel.sh @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a diff --git a/x86_64/user_additional_install_runtime.sh b/x86_64/user_additional_install_runtime.sh index f23e0b6..bfa56fa 100755 --- a/x86_64/user_additional_install_runtime.sh +++ b/x86_64/user_additional_install_runtime.sh @@ -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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -19,6 +19,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. + # additional components the user can self install apt-get update apt-get install -y gstreamer1.0-libav diff --git a/x86_64/user_deepstream_python_apps_install.sh b/x86_64/user_deepstream_python_apps_install.sh index 0316384..e3d854c 100755 --- a/x86_64/user_deepstream_python_apps_install.sh +++ b/x86_64/user_deepstream_python_apps_install.sh @@ -1,5 +1,5 @@ #!/bin/bash -# 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: MIT # # Permission is hereby granted, free of charge, to any person obtaining a @@ -20,7 +20,6 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. - # User script to download and install PyDS from https://github.com/NVIDIA-AI-IOT/deepstream_python_apps # -v option can be used to specify which version of PyDS to download and install # -b option can be used to indicate that latest available bindings should be downloaded and installed @@ -59,7 +58,11 @@ apt-get install -y gstreamer1.0-libav apt-get install --reinstall -y gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libswresample-dev libavutil-dev libavutil56 libavcodec-dev libavcodec58 libavformat-dev libavformat58 libavfilter7 libde265-dev libde265-0 libx265-199 libx264-163 libvpx7 libmpeg2encpp-2.1-0 libmpeg2-4 libmpg123-0 echo "Deleting GStreamer cache" rm -rf ~/.cache/gstreamer-1.0/ -apt install -y python3-gi python3-dev python3-gst-1.0 python-gi-dev git meson python3 python3-pip python3.10-dev cmake g++ build-essential libglib2.0-dev libglib2.0-dev-bin libgstreamer1.0-dev libtool m4 autoconf automake libgirepository1.0-dev libcairo2-dev +apt install -y python3-gi python3-dev python3-gst-1.0 python-gi-dev git meson \ + python3 python3-pip python3.10-dev cmake g++ build-essential libglib2.0-dev \ + libglib2.0-dev-bin libgstreamer1.0-dev libtool m4 autoconf automake libgirepository1.0-dev libcairo2-dev + +pip3 install cuda-python cd /opt/nvidia/deepstream/deepstream/sources if [ -z "$remote_branch" ] then @@ -82,47 +85,72 @@ then echo "############################" echo "Building downloaded bindings" echo "############################" + cd /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps git submodule update --init apt-get install -y apt-transport-https ca-certificates -y update-ca-certificates cd 3rdparty/gstreamer/subprojects/gst-python/ - meson build - meson configure + # meson build + # meson configure + meson setup build cd build ninja ninja install cd /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps/bindings rm -rf build && mkdir build && cd build - cmake .. + platform=$(uname -m) + if [ $platform == "aarch64" ] + then + cmake .. -DPYTHON_MAJOR_VERSION=3 -DPYTHON_MINOR_VERSION=10 -DPIP_PLATFORM=linux_aarch64 -DDS_PATH=/opt/nvidia/deepstream/deepstream/ + else + cmake .. + fi make -j$(nproc) echo "###########################" echo "Installing built PyDS wheel" echo "###########################" - pip3 install ./pyds-1*_x86_64.whl + if [ $platform == "aarch64" ] + then + pip3 install ./pyds-1*_aarch64.whl + else + pip3 install ./pyds-1*_x86_64.whl + fi elif [ -z "$build_bindings" ] && [[ ! -z $version ]] then echo "##############################" echo "Pulling PyDS version: $version" echo "##############################" cd /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps - URL="https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/releases/download/v$version/pyds-$version-py3-none-linux_x86_64.whl" + platform=$(uname -m) + if [ $platform == "aarch64" ] + then + URL="https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/releases/download/v$version/pyds-$version-py3-none-linux_aarch64.whl" + else + URL="https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/releases/download/v$version/pyds-$version-py3-none-linux_x86_64.whl" + fi echo "url" echo $URL wget "$URL" - if [ -f "pyds-$version-py3-none-linux_x86_64.whl" ] + if [ $platform == "aarch64" ] then + wheel_file="pyds-$version-py3-none-linux_aarch64.whl" + else + wheel_file="pyds-$version-py3-none-linux_x86_64.whl" + fi + if [ -f $wheel_file ] + then echo "########################################################" - echo "Downloaded wheel pyds-$version-py3-none-linux_x86_64.whl" + echo "Downloaded wheel $wheel_file" echo "########################################################" + echo "#####################" + echo "Installing PyDS wheel" + echo "#####################" + pip3 install $wheel_file else echo "#########################################" echo "PyDS wheel was not downloaded. Exiting..." echo "#########################################" exit 1 fi - echo "#####################" - echo "Installing PyDS wheel" - echo "#####################" - pip3 install pyds-$version-py3-none-linux_x86_64.whl fi