Skip to content

Commit c49cd9a

Browse files
committed
Update 'gen_ort_dockerfile.py' fil to meet changes in ONNX Runtime 1.20.x
1 parent 5f6bce7 commit c49cd9a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tools/gen_ort_dockerfile.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def dockerfile_for_linux(output_file):
277277

278278
df += """
279279
WORKDIR /workspace/onnxruntime
280-
ARG COMMON_BUILD_ARGS="--config ${{ONNXRUNTIME_BUILD_CONFIG}} --skip_submodule_sync --parallel --build_shared_lib \
280+
ARG COMMON_BUILD_ARGS="--config ${{ONNXRUNTIME_BUILD_CONFIG}} --skip_submodule_sync --parallel 2 --build_shared_lib \
281281
--compile_no_warning_as_error --build_dir /workspace/build --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES='{}' "
282282
""".format(
283283
cuda_archs
@@ -559,13 +559,13 @@ def preprocess_gpu_flags():
559559
print("error: linux build requires --cudnn-home and --cuda-home")
560560

561561
if FLAGS.tensorrt_home is None:
562-
if target_platform() == "rhel":
563-
if platform.machine().lower() == "aarch64":
564-
FLAGS.tensorrt_home = "/usr/local/cuda/targets/sbsa-linux/"
565-
else:
566-
FLAGS.tensorrt_home = "/usr/local/cuda/targets/x86_64-linux/"
567-
else:
568-
FLAGS.tensorrt_home = "/usr/src/tensorrt"
562+
if target_platform() == "rhel":
563+
if platform.machine().lower() == "aarch64":
564+
FLAGS.tensorrt_home = "/usr/local/cuda/targets/sbsa-linux/"
565+
else:
566+
FLAGS.tensorrt_home = "/usr/local/cuda/targets/x86_64-linux/"
567+
else:
568+
FLAGS.tensorrt_home = "/usr/src/tensorrt"
569569

570570

571571
if __name__ == "__main__":
@@ -595,7 +595,7 @@ def preprocess_gpu_flags():
595595
"--target-platform",
596596
required=False,
597597
default=None,
598-
help='Target for build, can be "linux", "windows", "rhel", or "igpu". If not specified, build targets the current platform.',
598+
help='Target for build, can be "linux", "windows" or "igpu". If not specified, build targets the current platform.',
599599
)
600600

601601
parser.add_argument(
@@ -654,4 +654,4 @@ def preprocess_gpu_flags():
654654
FLAGS.ort_openvino = None
655655
dockerfile_for_windows(FLAGS.output)
656656
else:
657-
dockerfile_for_linux(FLAGS.output)
657+
dockerfile_for_linux(FLAGS.output)

0 commit comments

Comments
 (0)