diff --git a/CMakeLists.txt b/CMakeLists.txt index 35fb474..94d396d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,7 +236,7 @@ target_compile_features(triton-onnxruntime-backend PRIVATE cxx_std_${TRITON_MIN_ target_compile_options( triton-onnxruntime-backend PRIVATE $<$,$,$>: - -Wall -Wextra -Wno-unused-parameter -Wno-type-limits -Werror> + -Wall -Wextra -Wno-unused-parameter -Wno-type-limits> $<$:/Wall /D_WIN32_WINNT=0x0A00 /EHsc /Zc:preprocessor> ) diff --git a/tools/gen_ort_dockerfile.py b/tools/gen_ort_dockerfile.py index 2e8271e..ce33f03 100755 --- a/tools/gen_ort_dockerfile.py +++ b/tools/gen_ort_dockerfile.py @@ -94,6 +94,7 @@ def dockerfile_for_linux(output_file): df += """ # Ensure apt-get won't prompt for selecting options ENV DEBIAN_FRONTEND=noninteractive +ENV PIP_BREAK_SYSTEM_PACKAGES=1 # The Onnx Runtime dockerfile is the collection of steps in # https://github.com/microsoft/onnxruntime/tree/master/dockerfiles @@ -153,9 +154,11 @@ def dockerfile_for_linux(output_file): && . /etc/os-release \\ && 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 \\ && apt-get update -q=2 \\ - && apt-get install -y --no-install-recommends cmake=3.27.7* cmake-data=3.27.7* \\ + && apt-get install -y --no-install-recommends cmake=3.28.3* cmake-data=3.28.3* \\ && cmake --version +RUN python3 -m pip install psutil + """ if FLAGS.enable_gpu: df += """ @@ -185,10 +188,10 @@ def dockerfile_for_linux(output_file): df += """ # Step 1: Download and install core components # Ref: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-archive-linux.html#step-1-download-and-install-the-openvino-core-components -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 && \ +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 && \ tar -xf openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \ mkdir -p ${INTEL_OPENVINO_DIR} && \ - mv l_openvino_toolkit_ubuntu22_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64/* ${INTEL_OPENVINO_DIR} && \ + mv l_openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64/* ${INTEL_OPENVINO_DIR} && \ rm openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \ (cd ${INTEL_OPENVINO_DIR}/install_dependencies && \ ./install_openvino_dependencies.sh -y) && \ @@ -197,9 +200,9 @@ def dockerfile_for_linux(output_file): # Step 2: Configure the environment # Ref: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-archive-linux.html#step-2-configure-the-environment ENV OpenVINO_DIR=$INTEL_OPENVINO_DIR/runtime/cmake -ENV LD_LIBRARY_PATH $INTEL_OPENVINO_DIR/runtime/lib/intel64:$LD_LIBRARY_PATH +ENV LD_LIBRARY_PATH=$INTEL_OPENVINO_DIR/runtime/lib/intel64:$LD_LIBRARY_PATH ENV PKG_CONFIG_PATH=$INTEL_OPENVINO_DIR/runtime/lib/intel64/pkgconfig -ENV PYTHONPATH $INTEL_OPENVINO_DIR/python/python3.10:$INTEL_OPENVINO_DIR/python/python3:$PYTHONPATH +ENV PYTHONPATH=$INTEL_OPENVINO_DIR/python/python3.10:$INTEL_OPENVINO_DIR/python/python3:$PYTHONPATH """ ## TEMPORARY: Using the tensorrt-8.0 branch until ORT 1.9 release to enable ORT backend with TRT 8.0 support. @@ -287,7 +290,7 @@ def dockerfile_for_linux(output_file): df += """ WORKDIR /workspace/onnxruntime ARG COMMON_BUILD_ARGS="--config ${{ONNXRUNTIME_BUILD_CONFIG}} --skip_submodule_sync --parallel --build_shared_lib \ - --build_dir /workspace/build --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES='{}' " + --compile_no_warning_as_error --build_dir /workspace/build --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES='{}' " """.format( cuda_archs ) @@ -371,8 +374,7 @@ def dockerfile_for_linux(output_file): cp ${INTEL_OPENVINO_DIR}/runtime/lib/intel64/libopenvino_ir_frontend.so.${ONNXRUNTIME_OPENVINO_VERSION} \ /opt/onnxruntime/lib && \ cp ${INTEL_OPENVINO_DIR}/runtime/lib/intel64/libopenvino_onnx_frontend.so.${ONNXRUNTIME_OPENVINO_VERSION} \ - /opt/onnxruntime/lib && \ - cp /usr/lib/x86_64-linux-gnu/libtbb.so.* /opt/onnxruntime/lib + /opt/onnxruntime/lib RUN OV_SHORT_VERSION=`echo ${ONNXRUNTIME_OPENVINO_VERSION} | awk '{ split($0,a,"."); print substr(a[1],3) a[2] a[3] }'` && \ (cd /opt/onnxruntime/lib && \