Skip to content

Commit f58118c

Browse files
authored
Advance upstreams to 25.02 (#298)
* adding openvino 2024.6.0 to the version map * bumping version of openvino to 2025.0.0 * fix openvino toolkit filename based on release * typo * escaping brackets for generating the onnxruntime dockerfile * fixup * pre-commit
1 parent 98ef865 commit f58118c

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

tools/gen_ort_dockerfile.py

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
"2024.5", # OpenVINO short version
6161
"2024.5.0.17288.7975fa5da0c", # OpenVINO version with build number
6262
),
63+
"2025.0.0": (
64+
"2025.0", # OpenVINO short version
65+
"2025.0.0.17942.1f68be9f594", # OpenVINO version with build number
66+
),
6367
}
6468

6569

@@ -194,25 +198,40 @@ def dockerfile_for_linux(output_file):
194198
OPENVINO_VERSION_MAP[FLAGS.ort_openvino][1],
195199
)
196200

201+
# Openvino changed the filename of the toolkit in 2025.0.0 so we need to detect this for
202+
# the release we want to install
203+
openvino_folder_name = "UNKNOWN_FOLDER_NAME"
204+
openvino_toolkit_filename = "UNKNOWN_FILENAME"
205+
if OPENVINO_VERSION_MAP[FLAGS.ort_openvino][0].split(".")[0] >= "2025":
206+
openvino_folder_name = (
207+
"openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64"
208+
)
209+
openvino_toolkit_filename = openvino_folder_name + ".tgz"
210+
else:
211+
openvino_folder_name = "l_openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64"
212+
openvino_toolkit_filename = openvino_folder_name + ".tgz"
213+
197214
df += """
198215
# Step 1: Download and install core components
199216
# Ref: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-archive-linux.html#step-1-download-and-install-the-openvino-core-components
200-
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 && \
201-
tar -xf openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \
202-
mkdir -p ${INTEL_OPENVINO_DIR} && \
203-
mv l_openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64/* ${INTEL_OPENVINO_DIR} && \
204-
rm openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \
205-
(cd ${INTEL_OPENVINO_DIR}/install_dependencies && \
217+
RUN curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/${{OPENVINO_SHORT_VERSION}}/linux/{} --output openvino_${{ONNXRUNTIME_OPENVINO_VERSION}}.tgz && \
218+
tar -xf openvino_${{ONNXRUNTIME_OPENVINO_VERSION}}.tgz && \
219+
mkdir -p ${{INTEL_OPENVINO_DIR}} && \
220+
mv {}/* ${{INTEL_OPENVINO_DIR}} && \
221+
rm openvino_${{ONNXRUNTIME_OPENVINO_VERSION}}.tgz && \
222+
(cd ${{INTEL_OPENVINO_DIR}}/install_dependencies && \
206223
./install_openvino_dependencies.sh -y) && \
207-
ln -s ${INTEL_OPENVINO_DIR} ${INTEL_OPENVINO_DIR}/../openvino_`echo ${ONNXRUNTIME_OPENVINO_VERSION} | awk '{print substr($0,0,4)}'`
224+
ln -s ${{INTEL_OPENVINO_DIR}} ${{INTEL_OPENVINO_DIR}}/../openvino_`echo ${{ONNXRUNTIME_OPENVINO_VERSION}} | awk '{{print substr($0,0,4)}}'`
208225
209226
# Step 2: Configure the environment
210227
# Ref: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-archive-linux.html#step-2-configure-the-environment
211228
ENV OpenVINO_DIR=$INTEL_OPENVINO_DIR/runtime/cmake
212229
ENV LD_LIBRARY_PATH=$INTEL_OPENVINO_DIR/runtime/lib/intel64:$LD_LIBRARY_PATH
213230
ENV PKG_CONFIG_PATH=$INTEL_OPENVINO_DIR/runtime/lib/intel64/pkgconfig
214231
ENV PYTHONPATH=$INTEL_OPENVINO_DIR/python/python3.12:$INTEL_OPENVINO_DIR/python/python3:$PYTHONPATH
215-
"""
232+
""".format(
233+
openvino_toolkit_filename, openvino_folder_name
234+
)
216235

217236
## TEMPORARY: Using the tensorrt-8.0 branch until ORT 1.9 release to enable ORT backend with TRT 8.0 support.
218237
# 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)