@@ -177,19 +177,7 @@ def dockerfile_for_linux(output_file):
177
177
gnupg \
178
178
gnupg1
179
179
180
- RUN pip3 install patchelf==0.17.2
181
-
182
- # Install dependencies from
183
- # onnxruntime/dockerfiles/scripts/install_common_deps.sh.
184
- RUN apt update -q=2 \\
185
- && apt install -y gpg wget \\
186
- && wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null \\
187
- && . /etc/os-release \\
188
- && echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $UBUNTU_CODENAME main" | tee /etc/apt/sources.list.d/kitware.list >/dev/null \\
189
- && apt-get update -q=2 \\
190
- && apt-get install -y --no-install-recommends cmake=3.28.3* cmake-data=3.28.3* \\
191
- && cmake --version
192
-
180
+ RUN pip3 install patchelf==0.17.2 cmake==4.0.3
193
181
"""
194
182
195
183
if FLAGS .ort_openvino is not None :
@@ -279,11 +267,7 @@ def dockerfile_for_linux(output_file):
279
267
ARG ONNXRUNTIME_REPO
280
268
ARG ONNXRUNTIME_BUILD_CONFIG
281
269
282
- # Cherry-pick commit: https://github.com/microsoft/onnxruntime/commit/9dad9af9f9b48c05814d0c2d067d0565e8da6ce8
283
- RUN git clone -b rel-${ONNXRUNTIME_VERSION} --recursive ${ONNXRUNTIME_REPO} onnxruntime \\
284
- && cd onnxruntime \\
285
- && git cherry-pick -n 9dad9af9f9b48c05814d0c2d067d0565e8da6ce8 \\
286
- && sed -i 's/5ea4d05e62d7f954a46b3213f9b2535bdd866803/51982be81bbe52572b54180454df11a3ece9a934/g' cmake/deps.txt
270
+ RUN git clone -b main --recursive ${ONNXRUNTIME_REPO} onnxruntime
287
271
"""
288
272
289
273
if FLAGS .onnx_tensorrt_tag != "" :
@@ -367,38 +351,30 @@ def dockerfile_for_linux(output_file):
367
351
# Copy all artifacts needed by the backend to /opt/onnxruntime
368
352
#
369
353
WORKDIR /opt/onnxruntime
370
-
371
- RUN mkdir -p /opt/onnxruntime && \
372
- cp /workspace/onnxruntime/LICENSE /opt/onnxruntime && \
373
- 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
374
356
375
357
# ONNX Runtime headers, libraries and binaries
376
- RUN mkdir -p /opt/onnxruntime/include && \
377
- cp /workspace/onnxruntime/include/onnxruntime/core/session/onnxruntime_c_api.h \
378
- /opt/onnxruntime/include && \
379
- cp /workspace/onnxruntime/include/onnxruntime/core/session/onnxruntime_session_options_config_keys.h \
380
- /opt/onnxruntime/include && \
381
- cp /workspace/onnxruntime/include/onnxruntime/core/providers/cpu/cpu_provider_factory.h \
382
- /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 .
383
363
384
- RUN mkdir -p /opt/onnxruntime/lib && \
385
- cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/libonnxruntime_providers_shared.so \
386
- /opt/onnxruntime/lib && \
387
- cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/libonnxruntime.so \
388
- /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 .
389
367
"""
390
368
if target_platform () == "igpu" :
391
369
df += """
392
370
RUN mkdir -p /opt/onnxruntime/bin
393
371
"""
394
372
else :
395
373
df += """
396
- RUN mkdir -p /opt/onnxruntime/bin && \
397
- cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/onnxruntime_perf_test \
398
- /opt/onnxruntime/bin && \
399
- cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/onnx_test_runner \
400
- /opt/onnxruntime/bin && \
401
- (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 *
402
378
"""
403
379
404
380
if FLAGS .enable_gpu :
0 commit comments