Skip to content

Commit 2be37f7

Browse files
authored
Upadate default branch post 24.12 (#290)
* Update README and versions for 2.53.0 / 24.12 (#288) * Update 'gen_ort_dockerfile.py' fil to meet changes in ONNX Runtime 1.20.x * remove psutils * Update reformating * restore description * Update OpenVINO to 2024.5 (#287) * Update 'gen_ort_dockerfile.py' fil to meet changes in ONNX Runtime 1.20.x * remove psutils * Add OpenVINO version * Fix pre-commit issues * Extract archive in different location (#289) * Extract archive in different location * Revert "Extract archive in different location" This reverts commit e57256a. * Update installation instructions * Reapply "Extract archive in different location" This reverts commit 59e24e4.
1 parent d646603 commit 2be37f7

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ install(
418418
# that tar file. We copy over the libraries and other requirements
419419
# prior to running this build and therefore these set of install
420420
# commands are not needed.
421-
if(TRITON_ONNXRUNTIME_DOCKER_BUILD)
421+
if(TRITON_ONNXRUNTIME_DOCKER_BUILD OR DEFINED TRITON_ONNXRUNTIME_PACKAGE_URL)
422422
install(
423423
DIRECTORY
424424
${CMAKE_CURRENT_BINARY_DIR}/onnxruntime/

cmake/download_onnxruntime.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
if(DEFINED TRITON_ONNXRUNTIME_PACKAGE_URL)
22

33
set(DOWNLOAD_PATH "${CMAKE_BINARY_DIR}/_deps/downloads/onnxruntime.zip")
4-
set(EXTRACT_DIR "${CMAKE_BINARY_DIR}/_deps/downloads/onnxruntime")
4+
set(EXTRACT_DIR "${CMAKE_BINARY_DIR}/onnxruntime")
55

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

tools/gen_ort_dockerfile.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
"2024.4", # OpenVINO short version
5757
"2024.4.0.16579.c3152d32c9c", # OpenVINO version with build number
5858
),
59+
"2024.5.0": (
60+
"2024.5", # OpenVINO short version
61+
"2024.5.0.17288.7975fa5da0c", # OpenVINO version with build number
62+
),
5963
}
6064

6165

@@ -157,16 +161,6 @@ def dockerfile_for_linux(output_file):
157161
&& apt-get install -y --no-install-recommends cmake=3.28.3* cmake-data=3.28.3* \\
158162
&& cmake --version
159163
160-
"""
161-
if FLAGS.enable_gpu:
162-
df += """
163-
# Allow configure to pick up cuDNN where it expects it.
164-
# (Note: $CUDNN_VERSION is defined by base image)
165-
RUN _CUDNN_VERSION=$(echo $CUDNN_VERSION | cut -d. -f1-2) && \
166-
mkdir -p /usr/local/cudnn-$_CUDNN_VERSION/cuda/include && \
167-
ln -s /usr/include/cudnn.h /usr/local/cudnn-$_CUDNN_VERSION/cuda/include/cudnn.h && \
168-
mkdir -p /usr/local/cudnn-$_CUDNN_VERSION/cuda/lib64 && \
169-
ln -s /etc/alternatives/libcudnn_so /usr/local/cudnn-$_CUDNN_VERSION/cuda/lib64/libcudnn.so
170164
"""
171165

172166
if FLAGS.ort_openvino is not None:
@@ -395,7 +389,7 @@ def dockerfile_for_linux(output_file):
395389
"""
396390
df += """
397391
RUN cd /opt/onnxruntime/lib && \
398-
for i in `find . -mindepth 1 -maxdepth 1 -type f -name '*\.so*'`; do \
392+
for i in `find . -mindepth 1 -maxdepth 1 -type f -name '*\\.so*'`; do \
399393
patchelf --set-rpath '$ORIGIN' $i; \
400394
done
401395
@@ -476,7 +470,7 @@ def dockerfile_for_windows(output_file):
476470

477471
df += """
478472
WORKDIR /workspace/onnxruntime
479-
ARG VS_DEVCMD_BAT="\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
473+
ARG VS_DEVCMD_BAT="\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat"
480474
RUN powershell Set-Content 'build.bat' -value 'call %VS_DEVCMD_BAT%',(Get-Content 'build.bat')
481475
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 {}
482476
""".format(
@@ -559,12 +553,8 @@ def preprocess_gpu_flags():
559553
FLAGS.tensorrt_home = "/tensorrt"
560554
else:
561555
if "CUDNN_VERSION" in os.environ:
562-
version = None
563-
m = re.match(r"([0-9]\.[0-9])\.[0-9]\.[0-9]", os.environ["CUDNN_VERSION"])
564-
if m:
565-
version = m.group(1)
566556
if FLAGS.cudnn_home is None:
567-
FLAGS.cudnn_home = "/usr/local/cudnn-{}/cuda".format(version)
557+
FLAGS.cudnn_home = "/usr"
568558

569559
if FLAGS.cuda_home is None:
570560
FLAGS.cuda_home = "/usr/local/cuda"
@@ -611,6 +601,7 @@ def preprocess_gpu_flags():
611601
default=None,
612602
help='Target for build, can be "linux", "windows", "rhel", or "igpu". If not specified, build targets the current platform.',
613603
)
604+
614605
parser.add_argument(
615606
"--cuda-version", type=str, required=False, help="Version for CUDA."
616607
)

0 commit comments

Comments
 (0)