From 29bda4aed8e226a7542d68ab33f700e717f17cb6 Mon Sep 17 00:00:00 2001 From: Misha Chornyi Date: Mon, 25 Sep 2023 14:51:18 -0700 Subject: [PATCH] Revert "Update build instructions to support ORT 1.16.0 (#212)" This reverts commit 3136eba25703ca64ebbb2667ef3168aac5f47c09. --- tools/gen_ort_dockerfile.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/gen_ort_dockerfile.py b/tools/gen_ort_dockerfile.py index d38ac62..0e0b81a 100755 --- a/tools/gen_ort_dockerfile.py +++ b/tools/gen_ort_dockerfile.py @@ -236,6 +236,14 @@ def dockerfile_for_linux(output_file): cuda_archs ) + # Remove version info from libonnxruntime.so + # This makes it possible to replace ort binaries in released triton containers + # for experimentation, without having to build triton-ort backend. + df += """ +RUN sed -i 's/VERS_%s//' tools/ci_build/gen_def.py && (sed -i 's/% VERSION_STRING//' tools/ci_build/gen_def.py) +RUN sed -i 's/set_target_properties(onnxruntime PROPERTIES VERSION ${ORT_VERSION})//' cmake/onnxruntime.cmake +""" + df += """ RUN ./build.sh ${{COMMON_BUILD_ARGS}} --update --build {} """.format( @@ -324,11 +332,7 @@ def dockerfile_for_linux(output_file): ln -s libopenvino_onnx_frontend.so.${ONNXRUNTIME_OPENVINO_VERSION} libopenvino_onnx_frontend.so.${OV_SHORT_VERSION} && \ ln -s libopenvino_onnx_frontend.so.${ONNXRUNTIME_OPENVINO_VERSION} libopenvino_onnx_frontend.so) """ - # Linking compiled ONNX Runtime libraries to their corresponding versioned libraries - df += """ -RUN cd /opt/onnxruntime/lib \ - && ln -s libonnxruntime.so libonnxruntime.so.${ONNXRUNTIME_VERSION} -""" + df += """ RUN cd /opt/onnxruntime/lib && \ for i in `find . -mindepth 1 -maxdepth 1 -type f -name '*\.so*'`; do \ @@ -407,7 +411,7 @@ def dockerfile_for_windows(output_file): WORKDIR /workspace/onnxruntime ARG VS_DEVCMD_BAT="\BuildTools\VC\Auxiliary\Build\vcvars64.bat" RUN powershell Set-Content 'build.bat' -value 'call %VS_DEVCMD_BAT%',(Get-Content 'build.bat') -RUN build.bat --cmake_generator "Visual Studio 17 2022" --config Release --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=60;61;70;75;80;86;90" --skip_submodule_sync --parallel --build_shared_lib --update --build --build_dir /workspace/build {} +RUN build.bat --cmake_generator "Visual Studio 16 2019" --config Release --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=60;61;70;75;80;86;90" --skip_submodule_sync --parallel --build_shared_lib --update --build --build_dir /workspace/build {} """.format( ep_flags )