From 09bfe69f467e415b26c01bed33784f5b4f2209cf Mon Sep 17 00:00:00 2001 From: Kyle McGill Date: Mon, 10 Feb 2025 22:01:40 -0800 Subject: [PATCH 1/7] adding openvino 2024.6.0 to the version map --- tools/gen_ort_dockerfile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/gen_ort_dockerfile.py b/tools/gen_ort_dockerfile.py index 20725b9..7d333a2 100755 --- a/tools/gen_ort_dockerfile.py +++ b/tools/gen_ort_dockerfile.py @@ -60,6 +60,11 @@ "2024.5", # OpenVINO short version "2024.5.0.17288.7975fa5da0c", # OpenVINO version with build number ), + "2024.6.0": ( + "2024.6", # OpenVINO short version + "2024.6.0.17404.4c0f47d2335", # OpenVINO version with build number + ), + } From 2a9e70cd90b7e6c3060d760dc191c44f263bfede Mon Sep 17 00:00:00 2001 From: Kyle McGill Date: Fri, 14 Feb 2025 12:10:37 -0800 Subject: [PATCH 2/7] bumping version of openvino to 2025.0.0 --- tools/gen_ort_dockerfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/gen_ort_dockerfile.py b/tools/gen_ort_dockerfile.py index 7d333a2..f456882 100755 --- a/tools/gen_ort_dockerfile.py +++ b/tools/gen_ort_dockerfile.py @@ -60,9 +60,9 @@ "2024.5", # OpenVINO short version "2024.5.0.17288.7975fa5da0c", # OpenVINO version with build number ), - "2024.6.0": ( - "2024.6", # OpenVINO short version - "2024.6.0.17404.4c0f47d2335", # OpenVINO version with build number + "2025.0.0": ( + "2025.0", # OpenVINO short version + "2025.0.0.17942.1f68be9f594", # OpenVINO version with build number ), } From 0617a235f32924af7980a1961a340ce860a39b00 Mon Sep 17 00:00:00 2001 From: Kyle McGill Date: Fri, 14 Feb 2025 14:49:25 -0800 Subject: [PATCH 3/7] fix openvino toolkit filename based on release --- tools/gen_ort_dockerfile.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/gen_ort_dockerfile.py b/tools/gen_ort_dockerfile.py index f456882..3e3e68b 100755 --- a/tools/gen_ort_dockerfile.py +++ b/tools/gen_ort_dockerfile.py @@ -183,13 +183,21 @@ def dockerfile_for_linux(output_file): OPENVINO_VERSION_MAP[FLAGS.ort_openvino][1], ) + # Openvino changed the filename of the toolkit in 2025.0.0 so we need to detect this for + # the release we want to install + openvino_toolkit_filename = "UNKNOWN" + if OPENVINO_VERSION_MAP[FLAGS.ort_openvino[0]].split(".")[0] >= "2025": + openvino_toolkit_filename = "openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64.tgz" + else: + openvino_toolkit_filename = "l_openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64.tgz" + df += """ # Step 1: Download and install core components # Ref: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-archive-linux.html#step-1-download-and-install-the-openvino-core-components -RUN curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_SHORT_VERSION}/linux/l_openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64.tgz --output openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \ +RUN curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_SHORT_VERSION}/linux/{} --output openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \ tar -xf openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \ mkdir -p ${INTEL_OPENVINO_DIR} && \ - mv l_openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64/* ${INTEL_OPENVINO_DIR} && \ + mv {}/* ${INTEL_OPENVINO_DIR} && \ rm openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \ (cd ${INTEL_OPENVINO_DIR}/install_dependencies && \ ./install_openvino_dependencies.sh -y) && \ @@ -201,7 +209,10 @@ def dockerfile_for_linux(output_file): ENV LD_LIBRARY_PATH=$INTEL_OPENVINO_DIR/runtime/lib/intel64:$LD_LIBRARY_PATH ENV PKG_CONFIG_PATH=$INTEL_OPENVINO_DIR/runtime/lib/intel64/pkgconfig ENV PYTHONPATH=$INTEL_OPENVINO_DIR/python/python3.12:$INTEL_OPENVINO_DIR/python/python3:$PYTHONPATH -""" +""".format( + openvino_toolkit_filename, + openvino_toolkit_filename + ) ## TEMPORARY: Using the tensorrt-8.0 branch until ORT 1.9 release to enable ORT backend with TRT 8.0 support. # For ORT versions 1.8.0 and below the behavior will remain same. For ORT version 1.8.1 we will From 7ace38eee980b84317443c607580dc11061d589f Mon Sep 17 00:00:00 2001 From: Kyle McGill Date: Mon, 17 Feb 2025 13:43:43 -0800 Subject: [PATCH 4/7] typo --- tools/gen_ort_dockerfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/gen_ort_dockerfile.py b/tools/gen_ort_dockerfile.py index 3e3e68b..a4cd6d6 100755 --- a/tools/gen_ort_dockerfile.py +++ b/tools/gen_ort_dockerfile.py @@ -186,7 +186,7 @@ def dockerfile_for_linux(output_file): # Openvino changed the filename of the toolkit in 2025.0.0 so we need to detect this for # the release we want to install openvino_toolkit_filename = "UNKNOWN" - if OPENVINO_VERSION_MAP[FLAGS.ort_openvino[0]].split(".")[0] >= "2025": + if OPENVINO_VERSION_MAP[FLAGS.ort_openvino][0].split(".")[0] >= "2025": openvino_toolkit_filename = "openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64.tgz" else: openvino_toolkit_filename = "l_openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64.tgz" From bcd37a6bd886116882a3bb7c49fcbee3c66aba02 Mon Sep 17 00:00:00 2001 From: Kyle McGill Date: Mon, 17 Feb 2025 13:50:56 -0800 Subject: [PATCH 5/7] escaping brackets for generating the onnxruntime dockerfile --- tools/gen_ort_dockerfile.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/gen_ort_dockerfile.py b/tools/gen_ort_dockerfile.py index a4cd6d6..5cf8d9a 100755 --- a/tools/gen_ort_dockerfile.py +++ b/tools/gen_ort_dockerfile.py @@ -194,14 +194,14 @@ def dockerfile_for_linux(output_file): df += """ # Step 1: Download and install core components # Ref: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-archive-linux.html#step-1-download-and-install-the-openvino-core-components -RUN curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_SHORT_VERSION}/linux/{} --output openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \ - tar -xf openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \ - mkdir -p ${INTEL_OPENVINO_DIR} && \ - mv {}/* ${INTEL_OPENVINO_DIR} && \ - rm openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \ - (cd ${INTEL_OPENVINO_DIR}/install_dependencies && \ +RUN curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/${{OPENVINO_SHORT_VERSION}}/linux/{} --output openvino_${{ONNXRUNTIME_OPENVINO_VERSION}}.tgz && \ + tar -xf openvino_${{ONNXRUNTIME_OPENVINO_VERSION}}.tgz && \ + mkdir -p ${{INTEL_OPENVINO_DIR}} && \ + mv {}/* ${{INTEL_OPENVINO_DIR}} && \ + rm openvino_${{ONNXRUNTIME_OPENVINO_VERSION}}.tgz && \ + (cd ${{INTEL_OPENVINO_DIR}}/install_dependencies && \ ./install_openvino_dependencies.sh -y) && \ - ln -s ${INTEL_OPENVINO_DIR} ${INTEL_OPENVINO_DIR}/../openvino_`echo ${ONNXRUNTIME_OPENVINO_VERSION} | awk '{print substr($0,0,4)}'` + ln -s ${{INTEL_OPENVINO_DIR}} ${{INTEL_OPENVINO_DIR}}/../openvino_`echo ${{ONNXRUNTIME_OPENVINO_VERSION}} | awk '{{print substr($0,0,4)}}'` # Step 2: Configure the environment # Ref: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-archive-linux.html#step-2-configure-the-environment From 272273ab3ed6b2f92d0df1f8f60e2541d8ec8fab Mon Sep 17 00:00:00 2001 From: Kyle McGill Date: Mon, 17 Feb 2025 14:49:58 -0800 Subject: [PATCH 6/7] fixup --- tools/gen_ort_dockerfile.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/gen_ort_dockerfile.py b/tools/gen_ort_dockerfile.py index 5cf8d9a..f8ff3c9 100755 --- a/tools/gen_ort_dockerfile.py +++ b/tools/gen_ort_dockerfile.py @@ -185,11 +185,14 @@ def dockerfile_for_linux(output_file): # Openvino changed the filename of the toolkit in 2025.0.0 so we need to detect this for # the release we want to install - openvino_toolkit_filename = "UNKNOWN" + openvino_folder_name = "UNKNOWN_FOLDER_NAME" + openvino_toolkit_filename = "UNKNOWN_FILENAME" if OPENVINO_VERSION_MAP[FLAGS.ort_openvino][0].split(".")[0] >= "2025": - openvino_toolkit_filename = "openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64.tgz" + openvino_folder_name = "openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64" + openvino_toolkit_filename = openvino_folder_name + ".tgz" else: - openvino_toolkit_filename = "l_openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64.tgz" + openvino_folder_name = "l_openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64" + openvino_toolkit_filename = openvino_folder_name + ".tgz" df += """ # Step 1: Download and install core components @@ -211,7 +214,7 @@ def dockerfile_for_linux(output_file): ENV PYTHONPATH=$INTEL_OPENVINO_DIR/python/python3.12:$INTEL_OPENVINO_DIR/python/python3:$PYTHONPATH """.format( openvino_toolkit_filename, - openvino_toolkit_filename + openvino_folder_name ) ## TEMPORARY: Using the tensorrt-8.0 branch until ORT 1.9 release to enable ORT backend with TRT 8.0 support. From 371bdc7e74dcb2761427ec0bf5ef19a24d924589 Mon Sep 17 00:00:00 2001 From: Kyle McGill Date: Tue, 4 Mar 2025 12:52:16 -0800 Subject: [PATCH 7/7] pre-commit --- tools/gen_ort_dockerfile.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/gen_ort_dockerfile.py b/tools/gen_ort_dockerfile.py index f8ff3c9..76009e2 100755 --- a/tools/gen_ort_dockerfile.py +++ b/tools/gen_ort_dockerfile.py @@ -64,7 +64,6 @@ "2025.0", # OpenVINO short version "2025.0.0.17942.1f68be9f594", # OpenVINO version with build number ), - } @@ -183,12 +182,14 @@ def dockerfile_for_linux(output_file): OPENVINO_VERSION_MAP[FLAGS.ort_openvino][1], ) - # Openvino changed the filename of the toolkit in 2025.0.0 so we need to detect this for + # Openvino changed the filename of the toolkit in 2025.0.0 so we need to detect this for # the release we want to install openvino_folder_name = "UNKNOWN_FOLDER_NAME" openvino_toolkit_filename = "UNKNOWN_FILENAME" if OPENVINO_VERSION_MAP[FLAGS.ort_openvino][0].split(".")[0] >= "2025": - openvino_folder_name = "openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64" + openvino_folder_name = ( + "openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64" + ) openvino_toolkit_filename = openvino_folder_name + ".tgz" else: openvino_folder_name = "l_openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64" @@ -213,8 +214,7 @@ def dockerfile_for_linux(output_file): ENV PKG_CONFIG_PATH=$INTEL_OPENVINO_DIR/runtime/lib/intel64/pkgconfig ENV PYTHONPATH=$INTEL_OPENVINO_DIR/python/python3.12:$INTEL_OPENVINO_DIR/python/python3:$PYTHONPATH """.format( - openvino_toolkit_filename, - openvino_folder_name + openvino_toolkit_filename, openvino_folder_name ) ## TEMPORARY: Using the tensorrt-8.0 branch until ORT 1.9 release to enable ORT backend with TRT 8.0 support.