@@ -178,7 +178,6 @@ def dockerfile_for_linux(output_file):
178178         gnupg1
179179
180180RUN pip3 install patchelf==0.17.2 cmake==4.0.3 
181- 
182181""" 
183182
184183    if  FLAGS .ort_openvino  is  not   None :
@@ -268,11 +267,7 @@ def dockerfile_for_linux(output_file):
268267ARG ONNXRUNTIME_REPO 
269268ARG ONNXRUNTIME_BUILD_CONFIG 
270269
271- # Cherry-pick commit: https://github.com/microsoft/onnxruntime/commit/9dad9af9f9b48c05814d0c2d067d0565e8da6ce8 
272- RUN git clone -b rel-${ONNXRUNTIME_VERSION} --recursive ${ONNXRUNTIME_REPO} onnxruntime \\  
273-     && cd onnxruntime \\  
274-     && git cherry-pick -n 9dad9af9f9b48c05814d0c2d067d0565e8da6ce8 \\  
275-     && sed -i 's/5ea4d05e62d7f954a46b3213f9b2535bdd866803/51982be81bbe52572b54180454df11a3ece9a934/g' cmake/deps.txt 
270+ RUN git clone -b rel-${ONNXRUNTIME_VERSION} --recursive ${ONNXRUNTIME_REPO} onnxruntime 
276271        """ 
277272
278273    if  FLAGS .onnx_tensorrt_tag  !=  "" :
@@ -356,38 +351,30 @@ def dockerfile_for_linux(output_file):
356351# Copy all artifacts needed by the backend to /opt/onnxruntime 
357352# 
358353WORKDIR /opt/onnxruntime 
359- 
360- RUN mkdir -p /opt/onnxruntime && \  
361-      cp /workspace/onnxruntime/LICENSE /opt/onnxruntime && \ 
362-      cat /workspace/onnxruntime/cmake/external/onnx/VERSION_NUMBER > /opt/onnxruntime/ort_onnx_version.txt
354+ RUN cp /workspace/onnxruntime/LICENSE . \\  
355+     && cat /workspace/onnxruntime/cmake/external/onnx/VERSION_NUMBER > ort_onnx_version.txt 
363356
364357# ONNX Runtime headers, libraries and binaries 
365- RUN mkdir -p /opt/onnxruntime/include && \  
366-      cp /workspace/onnxruntime/include/onnxruntime/core/session/onnxruntime_c_api.h \ 
367-         /opt/onnxruntime/include && \ 
368-      cp /workspace/onnxruntime/include/onnxruntime/core/session/onnxruntime_session_options_config_keys.h \ 
369-         /opt/onnxruntime/include && \ 
370-      cp /workspace/onnxruntime/include/onnxruntime/core/providers/cpu/cpu_provider_factory.h \ 
371-         /opt/onnxruntime/include
358+ WORKDIR /opt/onnxruntime/include 
359+ RUN cp /workspace/onnxruntime/include/onnxruntime/core/session/onnxruntime_c_api.h . \\  
360+     && cp /workspace/onnxruntime/include/onnxruntime/core/session/onnxruntime_session_options_config_keys.h . \\  
361+     && cp /workspace/onnxruntime/include/onnxruntime/core/providers/cpu/cpu_provider_factory.h . \\  
362+     && cp /workspace/onnxruntime/include/onnxruntime/core/session/onnxruntime_ep_c_api.h . 
372363
373- RUN mkdir -p /opt/onnxruntime/lib && \  
374-      cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/libonnxruntime_providers_shared.so \ 
375-         /opt/onnxruntime/lib && \ 
376-      cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/libonnxruntime.so \ 
377-         /opt/onnxruntime/lib
364+ WORKDIR /opt/onnxruntime/lib 
365+ RUN cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/libonnxruntime_providers_shared.so . \\  
366+     && cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/libonnxruntime.so . 
378367""" 
379368    if  target_platform () ==  "igpu" :
380369        df  +=  """ 
381370RUN mkdir -p /opt/onnxruntime/bin 
382371""" 
383372    else :
384373        df  +=  """ 
385- RUN mkdir -p /opt/onnxruntime/bin && \  
386-      cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/onnxruntime_perf_test \ 
387-         /opt/onnxruntime/bin && \ 
388-      cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/onnx_test_runner \ 
389-         /opt/onnxruntime/bin && \ 
390-      (cd /opt/onnxruntime/bin && chmod a+x *)
374+ WORKDIR /opt/onnxruntime/bin 
375+ RUN cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/onnxruntime_perf_test . \\  
376+     && cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/onnx_test_runner . \\  
377+     && chmod a+x * 
391378""" 
392379
393380    if  FLAGS .enable_gpu :
0 commit comments