@@ -210,6 +210,8 @@ def dockerfile_for_linux(output_file):
210210 ep_flags += ' --cuda_home "{}"' .format (FLAGS .cuda_home )
211211 if FLAGS .cudnn_home is not None :
212212 ep_flags += ' --cudnn_home "{}"' .format (FLAGS .cudnn_home )
213+ elif target_platform () == "igpu" :
214+ ep_flags += ' --cudnn_home "/usr/lib/aarch64-linux-gnu"'
213215 if FLAGS .ort_tensorrt :
214216 ep_flags += " --use_tensorrt"
215217 if FLAGS .ort_version >= "1.12.1" :
@@ -224,7 +226,11 @@ def dockerfile_for_linux(output_file):
224226 if FLAGS .ort_openvino is not None :
225227 ep_flags += " --use_openvino CPU_FP32"
226228
227- cuda_archs = "60;61;70;75;80;86;90"
229+ if target_platform () == "igpu" :
230+ ep_flags += " --skip_tests --cmake_extra_defines 'onnxruntime_BUILD_UNIT_TESTS=OFF'"
231+ cuda_archs = "53;62;72;87"
232+ else :
233+ cuda_archs = "60;61;70;75;80;86;90"
228234
229235 df += """
230236WORKDIR /workspace/onnxruntime
@@ -264,14 +270,21 @@ def dockerfile_for_linux(output_file):
264270 /opt/onnxruntime/lib && \
265271 cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/libonnxruntime.so \
266272 /opt/onnxruntime/lib
267-
273+ """
274+ if target_platform () == "igpu" :
275+ df += """
276+ RUN mkdir -p /opt/onnxruntime/bin
277+ """
278+ else :
279+ df += """
268280RUN mkdir -p /opt/onnxruntime/bin && \
269281 cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/onnxruntime_perf_test \
270282 /opt/onnxruntime/bin && \
271283 cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/onnx_test_runner \
272284 /opt/onnxruntime/bin && \
273285 (cd /opt/onnxruntime/bin && chmod a+x *)
274286"""
287+
275288 if FLAGS .enable_gpu :
276289 df += """
277290RUN cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/libonnxruntime_providers_cuda.so \
@@ -334,6 +347,13 @@ def dockerfile_for_linux(output_file):
334347 done
335348
336349# For testing copy ONNX custom op library and model
350+ """
351+ if target_platform () == "igpu" :
352+ df += """
353+ RUN mkdir -p /opt/onnxruntime/test
354+ """
355+ else :
356+ df += """
337357RUN mkdir -p /opt/onnxruntime/test && \
338358 cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/libcustom_op_library.so \
339359 /opt/onnxruntime/test && \
@@ -533,7 +553,7 @@ def preprocess_gpu_flags():
533553 "--target-platform" ,
534554 required = False ,
535555 default = None ,
536- help = 'Target for build, can be "ubuntu ", "windows" or "jetpack ". If not specified, build targets the current platform.' ,
556+ help = 'Target for build, can be "linux ", "windows" or "igpu ". If not specified, build targets the current platform.' ,
537557 )
538558
539559 parser .add_argument (
0 commit comments