|
1 | 1 | #!/usr/bin/env python3
|
2 |
| -# Copyright 2020-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 2 | +# Copyright 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
3 | 3 | #
|
4 | 4 | # Redistribution and use in source and binary forms, with or without
|
5 | 5 | # modification, are permitted provided that the following conditions
|
|
43 | 43 | ),
|
44 | 44 | }
|
45 | 45 |
|
| 46 | +OPENVINO_VERSION_MAP = { |
| 47 | + "2023.3.0": ( |
| 48 | + "2023.3", # OpenVINO short version |
| 49 | + "2023.3.0.13775.ceeafaf64f3", # OpenVINO version with build number |
| 50 | + ), |
| 51 | + "2024.0.0": ( |
| 52 | + "2024.0", # OpenVINO short version |
| 53 | + "2024.0.0.14509.34caeefd078", # OpenVINO version with build number |
| 54 | + ), |
| 55 | + "2024.1.0": ( |
| 56 | + "2024.1", # OpenVINO short version |
| 57 | + "2024.1.0.15008.f4afc983258", # OpenVINO version with build number |
| 58 | + ), |
| 59 | +} |
| 60 | + |
46 | 61 |
|
47 | 62 | def target_platform():
|
48 | 63 | if FLAGS.target_platform is not None:
|
@@ -127,20 +142,29 @@ def dockerfile_for_linux(output_file):
|
127 | 142 | # Install OpenVINO
|
128 | 143 | ARG ONNXRUNTIME_OPENVINO_VERSION
|
129 | 144 | ENV INTEL_OPENVINO_DIR /opt/intel/openvino_${ONNXRUNTIME_OPENVINO_VERSION}
|
| 145 | +""" |
| 146 | + df += """ |
| 147 | +ARG OPENVINO_SHORT_VERSION={} |
| 148 | +ARG OPENVINO_VERSION_WITH_BUILD_NUMBER={} |
| 149 | +""".format( |
| 150 | + OPENVINO_VERSION_MAP[FLAGS.ort_openvino][0], |
| 151 | + OPENVINO_VERSION_MAP[FLAGS.ort_openvino][1], |
| 152 | + ) |
130 | 153 |
|
| 154 | + df += """ |
131 | 155 | # Step 1: Download and install core components
|
132 |
| -# Ref: https://docs.openvino.ai/2023.3/openvino_docs_install_guides_installing_openvino_from_archive_linux.html#step-1-download-and-install-the-openvino-core-components |
133 |
| -RUN curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2023.3/linux/l_openvino_toolkit_ubuntu22_2023.3.0.13775.ceeafaf64f3_x86_64.tgz --output openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \ |
| 156 | +# Ref: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-archive-linux.html#step-1-download-and-install-the-openvino-core-components |
| 157 | +RUN curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_SHORT_VERSION}/linux/l_openvino_toolkit_ubuntu22_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64.tgz --output openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \ |
134 | 158 | tar -xf openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \
|
135 | 159 | mkdir -p ${INTEL_OPENVINO_DIR} && \
|
136 |
| - mv l_openvino_toolkit_ubuntu22_2023.3.0.13775.ceeafaf64f3_x86_64/* ${INTEL_OPENVINO_DIR} && \ |
| 160 | + mv l_openvino_toolkit_ubuntu22_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64/* ${INTEL_OPENVINO_DIR} && \ |
137 | 161 | rm openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \
|
138 | 162 | (cd ${INTEL_OPENVINO_DIR}/install_dependencies && \
|
139 | 163 | ./install_openvino_dependencies.sh -y) && \
|
140 | 164 | ln -s ${INTEL_OPENVINO_DIR} ${INTEL_OPENVINO_DIR}/../openvino_`echo ${ONNXRUNTIME_OPENVINO_VERSION} | awk '{print substr($0,0,4)}'`
|
141 | 165 |
|
142 | 166 | # Step 2: Configure the environment
|
143 |
| -# Ref: https://docs.openvino.ai/2023.3/openvino_docs_install_guides_installing_openvino_from_archive_linux.html#step-2-configure-the-environment |
| 167 | +# Ref: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-archive-linux.html#step-2-configure-the-environment |
144 | 168 | ENV InferenceEngine_DIR=$INTEL_OPENVINO_DIR/runtime/cmake
|
145 | 169 | ENV ngraph_DIR=$INTEL_OPENVINO_DIR/runtime/cmake
|
146 | 170 | ENV OpenVINO_DIR=$INTEL_OPENVINO_DIR/runtime/cmake
|
|
0 commit comments