Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ install(
# that tar file. We copy over the libraries and other requirements
# prior to running this build and therefore these set of install
# commands are not needed.
if(TRITON_ONNXRUNTIME_DOCKER_BUILD)
if(TRITON_ONNXRUNTIME_DOCKER_BUILD OR DEFINED TRITON_ONNXRUNTIME_PACKAGE_URL)
install(
DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/onnxruntime/
Expand Down
2 changes: 1 addition & 1 deletion cmake/download_onnxruntime.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if(DEFINED TRITON_ONNXRUNTIME_PACKAGE_URL)

set(DOWNLOAD_PATH "${CMAKE_BINARY_DIR}/_deps/downloads/onnxruntime.zip")
set(EXTRACT_DIR "${CMAKE_BINARY_DIR}/_deps/downloads/onnxruntime")
set(EXTRACT_DIR "${CMAKE_BINARY_DIR}/onnxruntime")

message(NOTICE "Downloading onnxruntime: ${TRITON_ONNXRUNTIME_PACKAGE_URL}")

Expand Down
22 changes: 11 additions & 11 deletions tools/gen_ort_dockerfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
),
}


Expand Down Expand Up @@ -262,7 +266,7 @@ def dockerfile_for_linux(output_file):
if FLAGS.cudnn_home is not None:
ep_flags += ' --cudnn_home "{}"'.format(FLAGS.cudnn_home)
elif target_platform() == "igpu":
ep_flags += ' --cudnn_home "/usr/lib/aarch64-linux-gnu"'
ep_flags += ' --cudnn_home "/usr/include"'
if FLAGS.ort_tensorrt:
ep_flags += " --use_tensorrt"
if FLAGS.ort_version >= "1.12.1":
Expand All @@ -281,9 +285,9 @@ def dockerfile_for_linux(output_file):
ep_flags += (
" --skip_tests --cmake_extra_defines 'onnxruntime_BUILD_UNIT_TESTS=OFF'"
)
cuda_archs = "53;62;72;87"
cuda_archs = "87;101"
else:
cuda_archs = "75;80;86;90"
cuda_archs = "75;80;86;90;100;120"

df += """
WORKDIR /workspace/onnxruntime
Expand Down Expand Up @@ -395,7 +399,7 @@ def dockerfile_for_linux(output_file):
"""
df += """
RUN cd /opt/onnxruntime/lib && \
for i in `find . -mindepth 1 -maxdepth 1 -type f -name '*\.so*'`; do \
for i in `find . -mindepth 1 -maxdepth 1 -type f -name '*\\.so*'`; do \
patchelf --set-rpath '$ORIGIN' $i; \
done

Expand Down Expand Up @@ -476,9 +480,9 @@ def dockerfile_for_windows(output_file):

df += """
WORKDIR /workspace/onnxruntime
ARG VS_DEVCMD_BAT="\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
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=75;80;86;90" --skip_submodule_sync --parallel --build_shared_lib --compile_no_warning_as_error --skip_tests --update --build --build_dir /workspace/build {}
RUN build.bat --cmake_generator "Visual Studio 17 2022" --config Release --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=75;80;86;90;100;120" --skip_submodule_sync --parallel --build_shared_lib --compile_no_warning_as_error --skip_tests --update --build --build_dir /workspace/build {}
""".format(
ep_flags
)
Expand Down Expand Up @@ -559,12 +563,8 @@ def preprocess_gpu_flags():
FLAGS.tensorrt_home = "/tensorrt"
else:
if "CUDNN_VERSION" in os.environ:
version = None
m = re.match(r"([0-9]\.[0-9])\.[0-9]\.[0-9]", os.environ["CUDNN_VERSION"])
if m:
version = m.group(1)
if FLAGS.cudnn_home is None:
FLAGS.cudnn_home = "/usr/local/cudnn-{}/cuda".format(version)
FLAGS.cudnn_home = "/usr"

if FLAGS.cuda_home is None:
FLAGS.cuda_home = "/usr/local/cuda"
Expand Down
Loading