@@ -94,6 +94,7 @@ def dockerfile_for_linux(output_file):
9494    df  +=  """ 
9595# Ensure apt-get won't prompt for selecting options 
9696ENV DEBIAN_FRONTEND=noninteractive 
97+ ENV PIP_BREAK_SYSTEM_PACKAGES=1 
9798
9899# The Onnx Runtime dockerfile is the collection of steps in 
99100# https://github.com/microsoft/onnxruntime/tree/master/dockerfiles 
@@ -153,19 +154,11 @@ def dockerfile_for_linux(output_file):
153154    && . /etc/os-release \\  
154155    && 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 \\  
155156    && apt-get update -q=2 \\  
156-     && apt-get install -y --no-install-recommends cmake=3.27.7 * cmake-data=3.27.7 * \\  
157+     && apt-get install -y --no-install-recommends cmake=3.28.3 * cmake-data=3.28.3 * \\  
157158    && cmake --version 
158159
159- """ 
160-     if  FLAGS .enable_gpu :
161-         df  +=  """ 
162- # Allow configure to pick up cuDNN where it expects it. 
163- # (Note: $CUDNN_VERSION is defined by base image) 
164- RUN _CUDNN_VERSION=$(echo $CUDNN_VERSION | cut -d. -f1-2) && \  
165-      mkdir -p /usr/local/cudnn-$_CUDNN_VERSION/cuda/include && \ 
166-      ln -s /usr/include/cudnn.h /usr/local/cudnn-$_CUDNN_VERSION/cuda/include/cudnn.h && \ 
167-      mkdir -p /usr/local/cudnn-$_CUDNN_VERSION/cuda/lib64 && \ 
168-      ln -s /etc/alternatives/libcudnn_so /usr/local/cudnn-$_CUDNN_VERSION/cuda/lib64/libcudnn.so
160+ RUN python3 -m pip install psutil 
161+ 
169162""" 
170163
171164    if  FLAGS .ort_openvino  is  not   None :
@@ -185,10 +178,10 @@ def dockerfile_for_linux(output_file):
185178        df  +=  """ 
186179# Step 1: Download and install core components 
187180# Ref: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-archive-linux.html#step-1-download-and-install-the-openvino-core-components 
188- 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 && \  
181+ RUN curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_SHORT_VERSION}/linux/l_openvino_toolkit_ubuntu24_ ${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64.tgz --output openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \  
189182     tar -xf openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \ 
190183     mkdir -p ${INTEL_OPENVINO_DIR} && \ 
191-      mv l_openvino_toolkit_ubuntu22_ ${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64/* ${INTEL_OPENVINO_DIR} && \ 
184+      mv l_openvino_toolkit_ubuntu24_ ${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64/* ${INTEL_OPENVINO_DIR} && \ 
192185     rm openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \ 
193186     (cd ${INTEL_OPENVINO_DIR}/install_dependencies && \ 
194187         ./install_openvino_dependencies.sh -y) && \ 
@@ -197,9 +190,9 @@ def dockerfile_for_linux(output_file):
197190# Step 2: Configure the environment 
198191# Ref: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-archive-linux.html#step-2-configure-the-environment 
199192ENV OpenVINO_DIR=$INTEL_OPENVINO_DIR/runtime/cmake 
200- ENV LD_LIBRARY_PATH  $INTEL_OPENVINO_DIR/runtime/lib/intel64:$LD_LIBRARY_PATH 
193+ ENV LD_LIBRARY_PATH= $INTEL_OPENVINO_DIR/runtime/lib/intel64:$LD_LIBRARY_PATH 
201194ENV PKG_CONFIG_PATH=$INTEL_OPENVINO_DIR/runtime/lib/intel64/pkgconfig 
202- ENV PYTHONPATH  $INTEL_OPENVINO_DIR/python/python3.10 :$INTEL_OPENVINO_DIR/python/python3:$PYTHONPATH 
195+ ENV PYTHONPATH= $INTEL_OPENVINO_DIR/python/python3.12 :$INTEL_OPENVINO_DIR/python/python3:$PYTHONPATH 
203196""" 
204197
205198    ## TEMPORARY: Using the tensorrt-8.0 branch until ORT 1.9 release to enable ORT backend with TRT 8.0 support. 
@@ -287,7 +280,7 @@ def dockerfile_for_linux(output_file):
287280    df  +=  """ 
288281WORKDIR /workspace/onnxruntime 
289282ARG COMMON_BUILD_ARGS="--config ${{ONNXRUNTIME_BUILD_CONFIG}} --skip_submodule_sync --parallel --build_shared_lib \  
290-      --build_dir /workspace/build --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES='{}' "
283+      --compile_no_warning_as_error -- build_dir /workspace/build --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES='{}' "
291284""" .format (
292285        cuda_archs 
293286    )
@@ -358,7 +351,7 @@ def dockerfile_for_linux(output_file):
358351RUN cp /workspace/onnxruntime/include/onnxruntime/core/providers/openvino/openvino_provider_factory.h \  
359352        /opt/onnxruntime/include
360353
361- RUN apt-get update && apt-get install -y --no-install-recommends libtbb2  
354+ RUN apt-get update && apt-get install -y --no-install-recommends libtbb12  
362355
363356RUN cp /workspace/build/${ONNXRUNTIME_BUILD_CONFIG}/libonnxruntime_providers_openvino.so \  
364357        /opt/onnxruntime/lib && \ 
@@ -394,7 +387,7 @@ def dockerfile_for_linux(output_file):
394387""" 
395388    df  +=  """ 
396389RUN cd /opt/onnxruntime/lib && \  
397-      for i in `find . -mindepth 1 -maxdepth 1 -type f -name '*\.so*'`; do \ 
390+      for i in `find . -mindepth 1 -maxdepth 1 -type f -name '*\\  .so*'`; do \ 
398391         patchelf --set-rpath '$ORIGIN' $i; \ 
399392     done
400393
@@ -475,7 +468,7 @@ def dockerfile_for_windows(output_file):
475468
476469    df  +=  """ 
477470WORKDIR /workspace/onnxruntime 
478- ARG VS_DEVCMD_BAT="\BuildTools\VC\Auxiliary\Build\v cvars64.bat" 
471+ ARG VS_DEVCMD_BAT="\\  BuildTools\\  VC\\  Auxiliary\\  Build\ \ vcvars64.bat" 
479472RUN powershell Set-Content 'build.bat' -value 'call %VS_DEVCMD_BAT%',(Get-Content 'build.bat') 
480473RUN build.bat --cmake_generator "Visual Studio 17 2022" --config Release --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=75;80;86;90" --skip_submodule_sync --parallel --build_shared_lib --compile_no_warning_as_error --skip_tests --update --build --build_dir /workspace/build {} 
481474""" .format (
@@ -558,12 +551,8 @@ def preprocess_gpu_flags():
558551            FLAGS .tensorrt_home  =  "/tensorrt" 
559552    else :
560553        if  "CUDNN_VERSION"  in  os .environ :
561-             version  =  None 
562-             m  =  re .match (r"([0-9]\.[0-9])\.[0-9]\.[0-9]" , os .environ ["CUDNN_VERSION" ])
563-             if  m :
564-                 version  =  m .group (1 )
565554            if  FLAGS .cudnn_home  is  None :
566-                 FLAGS .cudnn_home  =  "/usr/local/cudnn-{}/cuda"  . format ( version ) 
555+                 FLAGS .cudnn_home  =  "/usr"  
567556
568557        if  FLAGS .cuda_home  is  None :
569558            FLAGS .cuda_home  =  "/usr/local/cuda" 
0 commit comments