Skip to content

Commit 0617a23

Browse files
committed
fix openvino toolkit filename based on release
1 parent 2a9e70c commit 0617a23

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

tools/gen_ort_dockerfile.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,21 @@ def dockerfile_for_linux(output_file):
183183
OPENVINO_VERSION_MAP[FLAGS.ort_openvino][1],
184184
)
185185

186+
# Openvino changed the filename of the toolkit in 2025.0.0 so we need to detect this for
187+
# the release we want to install
188+
openvino_toolkit_filename = "UNKNOWN"
189+
if OPENVINO_VERSION_MAP[FLAGS.ort_openvino[0]].split(".")[0] >= "2025":
190+
openvino_toolkit_filename = "openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64.tgz"
191+
else:
192+
openvino_toolkit_filename = "l_openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64.tgz"
193+
186194
df += """
187195
# Step 1: Download and install core components
188196
# Ref: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-archive-linux.html#step-1-download-and-install-the-openvino-core-components
189-
RUN curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_SHORT_VERSION}/linux/l_openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64.tgz --output openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \
197+
RUN curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_SHORT_VERSION}/linux/{} --output openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \
190198
tar -xf openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \
191199
mkdir -p ${INTEL_OPENVINO_DIR} && \
192-
mv l_openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64/* ${INTEL_OPENVINO_DIR} && \
200+
mv {}/* ${INTEL_OPENVINO_DIR} && \
193201
rm openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \
194202
(cd ${INTEL_OPENVINO_DIR}/install_dependencies && \
195203
./install_openvino_dependencies.sh -y) && \
@@ -201,7 +209,10 @@ def dockerfile_for_linux(output_file):
201209
ENV LD_LIBRARY_PATH=$INTEL_OPENVINO_DIR/runtime/lib/intel64:$LD_LIBRARY_PATH
202210
ENV PKG_CONFIG_PATH=$INTEL_OPENVINO_DIR/runtime/lib/intel64/pkgconfig
203211
ENV PYTHONPATH=$INTEL_OPENVINO_DIR/python/python3.12:$INTEL_OPENVINO_DIR/python/python3:$PYTHONPATH
204-
"""
212+
""".format(
213+
openvino_toolkit_filename,
214+
openvino_toolkit_filename
215+
)
205216

206217
## TEMPORARY: Using the tensorrt-8.0 branch until ORT 1.9 release to enable ORT backend with TRT 8.0 support.
207218
# For ORT versions 1.8.0 and below the behavior will remain same. For ORT version 1.8.1 we will

0 commit comments

Comments
 (0)