From c49cd9a5ea7943ae8510ab64110d2a6be4f012d1 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Tue, 3 Dec 2024 11:51:12 -0800 Subject: [PATCH 1/4] Update 'gen_ort_dockerfile.py' fil to meet changes in ONNX Runtime 1.20.x --- tools/gen_ort_dockerfile.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/gen_ort_dockerfile.py b/tools/gen_ort_dockerfile.py index 7f4d90d..fb05c82 100755 --- a/tools/gen_ort_dockerfile.py +++ b/tools/gen_ort_dockerfile.py @@ -277,7 +277,7 @@ def dockerfile_for_linux(output_file): df += """ WORKDIR /workspace/onnxruntime -ARG COMMON_BUILD_ARGS="--config ${{ONNXRUNTIME_BUILD_CONFIG}} --skip_submodule_sync --parallel --build_shared_lib \ +ARG COMMON_BUILD_ARGS="--config ${{ONNXRUNTIME_BUILD_CONFIG}} --skip_submodule_sync --parallel 2 --build_shared_lib \ --compile_no_warning_as_error --build_dir /workspace/build --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES='{}' " """.format( cuda_archs @@ -559,13 +559,13 @@ def preprocess_gpu_flags(): print("error: linux build requires --cudnn-home and --cuda-home") if FLAGS.tensorrt_home is None: - if target_platform() == "rhel": - if platform.machine().lower() == "aarch64": - FLAGS.tensorrt_home = "/usr/local/cuda/targets/sbsa-linux/" - else: - FLAGS.tensorrt_home = "/usr/local/cuda/targets/x86_64-linux/" - else: - FLAGS.tensorrt_home = "/usr/src/tensorrt" + if target_platform() == "rhel": + if platform.machine().lower() == "aarch64": + FLAGS.tensorrt_home = "/usr/local/cuda/targets/sbsa-linux/" + else: + FLAGS.tensorrt_home = "/usr/local/cuda/targets/x86_64-linux/" + else: + FLAGS.tensorrt_home = "/usr/src/tensorrt" if __name__ == "__main__": @@ -595,7 +595,7 @@ def preprocess_gpu_flags(): "--target-platform", required=False, default=None, - help='Target for build, can be "linux", "windows", "rhel", or "igpu". If not specified, build targets the current platform.', + help='Target for build, can be "linux", "windows" or "igpu". If not specified, build targets the current platform.', ) parser.add_argument( @@ -654,4 +654,4 @@ def preprocess_gpu_flags(): FLAGS.ort_openvino = None dockerfile_for_windows(FLAGS.output) else: - dockerfile_for_linux(FLAGS.output) + dockerfile_for_linux(FLAGS.output) \ No newline at end of file From 029339b9f02e58868a7c262d16bbc08f88d78617 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Tue, 3 Dec 2024 17:21:48 -0800 Subject: [PATCH 2/4] remove psutils --- 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 fb05c82..6566825 100755 --- a/tools/gen_ort_dockerfile.py +++ b/tools/gen_ort_dockerfile.py @@ -277,7 +277,7 @@ def dockerfile_for_linux(output_file): df += """ WORKDIR /workspace/onnxruntime -ARG COMMON_BUILD_ARGS="--config ${{ONNXRUNTIME_BUILD_CONFIG}} --skip_submodule_sync --parallel 2 --build_shared_lib \ +ARG COMMON_BUILD_ARGS="--config ${{ONNXRUNTIME_BUILD_CONFIG}} --skip_submodule_sync --parallel --build_shared_lib \ --compile_no_warning_as_error --build_dir /workspace/build --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES='{}' " """.format( cuda_archs From 987f8401da29d49d99e08cc1fbbc4fc2aeacf7c0 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Thu, 5 Dec 2024 15:06:30 -0800 Subject: [PATCH 3/4] Add OpenVINO version --- tools/gen_ort_dockerfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/gen_ort_dockerfile.py b/tools/gen_ort_dockerfile.py index 6566825..20f4386 100755 --- a/tools/gen_ort_dockerfile.py +++ b/tools/gen_ort_dockerfile.py @@ -56,6 +56,10 @@ "2024.4", # OpenVINO short version "2024.4.0.16579.c3152d32c9c", # OpenVINO version with build number ), + "2024.5.0": ( + "2024.5", # OpenVINO short version + "2024.5.0.17288.7975fa5da0c", # OpenVINO version with build number + ), } From 7ae81720fe14d5e774161c5d7b4525afc0658d40 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Tue, 10 Dec 2024 16:39:50 -0800 Subject: [PATCH 4/4] Fix pre-commit issues --- tools/gen_ort_dockerfile.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/gen_ort_dockerfile.py b/tools/gen_ort_dockerfile.py index 20f4386..82f9554 100755 --- a/tools/gen_ort_dockerfile.py +++ b/tools/gen_ort_dockerfile.py @@ -563,13 +563,13 @@ def preprocess_gpu_flags(): print("error: linux build requires --cudnn-home and --cuda-home") if FLAGS.tensorrt_home is None: - if target_platform() == "rhel": - if platform.machine().lower() == "aarch64": - FLAGS.tensorrt_home = "/usr/local/cuda/targets/sbsa-linux/" - else: - FLAGS.tensorrt_home = "/usr/local/cuda/targets/x86_64-linux/" - else: - FLAGS.tensorrt_home = "/usr/src/tensorrt" + if target_platform() == "rhel": + if platform.machine().lower() == "aarch64": + FLAGS.tensorrt_home = "/usr/local/cuda/targets/sbsa-linux/" + else: + FLAGS.tensorrt_home = "/usr/local/cuda/targets/x86_64-linux/" + else: + FLAGS.tensorrt_home = "/usr/src/tensorrt" if __name__ == "__main__": @@ -599,7 +599,7 @@ def preprocess_gpu_flags(): "--target-platform", required=False, default=None, - help='Target for build, can be "linux", "windows" or "igpu". If not specified, build targets the current platform.', + help='Target for build, can be "linux", "windows", "rhel", or "igpu". If not specified, build targets the current platform.', ) parser.add_argument( @@ -658,4 +658,4 @@ def preprocess_gpu_flags(): FLAGS.ort_openvino = None dockerfile_for_windows(FLAGS.output) else: - dockerfile_for_linux(FLAGS.output) \ No newline at end of file + dockerfile_for_linux(FLAGS.output)