Skip to content

Commit a3d1a0d

Browse files
committed
Format
1 parent 33aa258 commit a3d1a0d

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

tools/gen_ort_dockerfile.py

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def dockerfile_for_linux(output_file):
165165
166166
# Step 2: Configure the environment
167167
# Ref: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-archive-linux.html#step-2-configure-the-environment
168+
# `InferenceEngine_DIR` and `ngraph_DIR` are required only for OV 2023.3.0. Can be removed for 2024.0.0 and above.
168169
ENV InferenceEngine_DIR=$INTEL_OPENVINO_DIR/runtime/cmake
169170
ENV ngraph_DIR=$INTEL_OPENVINO_DIR/runtime/cmake
170171
ENV OpenVINO_DIR=$INTEL_OPENVINO_DIR/runtime/cmake
@@ -179,43 +180,40 @@ def dockerfile_for_linux(output_file):
179180
# From ORT 1.9 onwards we will switch back to using rel-* branches
180181
if FLAGS.ort_version == "1.8.1":
181182
df += """
182-
#
183-
# ONNX Runtime build
184-
#
185-
ARG ONNXRUNTIME_VERSION
186-
ARG ONNXRUNTIME_REPO
187-
ARG ONNXRUNTIME_BUILD_CONFIG
188-
189-
RUN git clone -b tensorrt-8.0 --recursive ${ONNXRUNTIME_REPO} onnxruntime && \
190-
(cd onnxruntime && git submodule update --init --recursive)
183+
#
184+
# ONNX Runtime build
185+
#
186+
ARG ONNXRUNTIME_VERSION
187+
ARG ONNXRUNTIME_REPO
188+
ARG ONNXRUNTIME_BUILD_CONFIG
191189
190+
RUN git clone -b tensorrt-8.0 --recursive ${ONNXRUNTIME_REPO} onnxruntime && \
191+
(cd onnxruntime && git submodule update --init --recursive)
192192
"""
193193
# Use the tensorrt-8.5ea branch to use Tensor RT 8.5a to use the built-in tensorrt parser
194194
elif FLAGS.ort_version == "1.12.1":
195195
df += """
196-
#
197-
# ONNX Runtime build
198-
#
199-
ARG ONNXRUNTIME_VERSION
200-
ARG ONNXRUNTIME_REPO
201-
ARG ONNXRUNTIME_BUILD_CONFIG
202-
203-
RUN git clone -b tensorrt-8.5ea --recursive ${ONNXRUNTIME_REPO} onnxruntime && \
204-
(cd onnxruntime && git submodule update --init --recursive)
196+
#
197+
# ONNX Runtime build
198+
#
199+
ARG ONNXRUNTIME_VERSION
200+
ARG ONNXRUNTIME_REPO
201+
ARG ONNXRUNTIME_BUILD_CONFIG
205202
203+
RUN git clone -b tensorrt-8.5ea --recursive ${ONNXRUNTIME_REPO} onnxruntime && \
204+
(cd onnxruntime && git submodule update --init --recursive)
206205
"""
207206
else:
208207
df += """
209-
#
210-
# ONNX Runtime build
211-
#
212-
ARG ONNXRUNTIME_VERSION
213-
ARG ONNXRUNTIME_REPO
214-
ARG ONNXRUNTIME_BUILD_CONFIG
215-
216-
RUN git clone -b rel-${ONNXRUNTIME_VERSION} --recursive ${ONNXRUNTIME_REPO} onnxruntime && \
217-
(cd onnxruntime && git submodule update --init --recursive)
208+
#
209+
# ONNX Runtime build
210+
#
211+
ARG ONNXRUNTIME_VERSION
212+
ARG ONNXRUNTIME_REPO
213+
ARG ONNXRUNTIME_BUILD_CONFIG
218214
215+
RUN git clone -b rel-${ONNXRUNTIME_VERSION} --recursive ${ONNXRUNTIME_REPO} onnxruntime && \
216+
(cd onnxruntime && git submodule update --init --recursive)
219217
"""
220218

221219
if FLAGS.onnx_tensorrt_tag != "":

0 commit comments

Comments
 (0)