Skip to content

Commit

Permalink
Update build instructions to support ORT 1.16.0 (#212)
Browse files Browse the repository at this point in the history
* Update ORT generator version

* Linking against ORT version
  • Loading branch information
mc-nv authored Sep 8, 2023
1 parent 4b88138 commit 3136eba
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tools/gen_ort_dockerfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,6 @@ 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(
Expand Down Expand Up @@ -332,7 +324,11 @@ 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 \
Expand Down Expand Up @@ -411,7 +407,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 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 {}
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 {}
""".format(
ep_flags
)
Expand Down

0 comments on commit 3136eba

Please sign in to comment.