Skip to content

Commit a16388e

Browse files
authored
Build Updates for Ubuntu24.04 (#282)
* update cmake version * update versions for u24 * add compile_no_warning_as_error flag * remove libtbb copy * remove werror * add back libtbb * remove pip flag * add pip flag env var * Revert "add back libtbb" This reverts commit 26649c2. * include patch version in cmake install
1 parent 56ce169 commit a16388e

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ target_compile_features(triton-onnxruntime-backend PRIVATE cxx_std_${TRITON_MIN_
236236
target_compile_options(
237237
triton-onnxruntime-backend PRIVATE
238238
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
239-
-Wall -Wextra -Wno-unused-parameter -Wno-type-limits -Werror>
239+
-Wall -Wextra -Wno-unused-parameter -Wno-type-limits>
240240
$<$<CXX_COMPILER_ID:MSVC>:/Wall /D_WIN32_WINNT=0x0A00 /EHsc /Zc:preprocessor>
241241
)
242242

tools/gen_ort_dockerfile.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def dockerfile_for_linux(output_file):
9494
df += """
9595
# Ensure apt-get won't prompt for selecting options
9696
ENV 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,9 +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
160+
RUN python3 -m pip install psutil
161+
159162
"""
160163
if FLAGS.enable_gpu:
161164
df += """
@@ -185,10 +188,10 @@ def dockerfile_for_linux(output_file):
185188
df += """
186189
# Step 1: Download and install core components
187190
# 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 && \
191+
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 && \
189192
tar -xf openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \
190193
mkdir -p ${INTEL_OPENVINO_DIR} && \
191-
mv l_openvino_toolkit_ubuntu22_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64/* ${INTEL_OPENVINO_DIR} && \
194+
mv l_openvino_toolkit_ubuntu24_${OPENVINO_VERSION_WITH_BUILD_NUMBER}_x86_64/* ${INTEL_OPENVINO_DIR} && \
192195
rm openvino_${ONNXRUNTIME_OPENVINO_VERSION}.tgz && \
193196
(cd ${INTEL_OPENVINO_DIR}/install_dependencies && \
194197
./install_openvino_dependencies.sh -y) && \
@@ -197,9 +200,9 @@ def dockerfile_for_linux(output_file):
197200
# Step 2: Configure the environment
198201
# Ref: https://docs.openvino.ai/2024/get-started/install-openvino/install-openvino-archive-linux.html#step-2-configure-the-environment
199202
ENV OpenVINO_DIR=$INTEL_OPENVINO_DIR/runtime/cmake
200-
ENV LD_LIBRARY_PATH $INTEL_OPENVINO_DIR/runtime/lib/intel64:$LD_LIBRARY_PATH
203+
ENV LD_LIBRARY_PATH=$INTEL_OPENVINO_DIR/runtime/lib/intel64:$LD_LIBRARY_PATH
201204
ENV 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
205+
ENV PYTHONPATH=$INTEL_OPENVINO_DIR/python/python3.10:$INTEL_OPENVINO_DIR/python/python3:$PYTHONPATH
203206
"""
204207

205208
## 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):
287290
df += """
288291
WORKDIR /workspace/onnxruntime
289292
ARG 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='{}' "
293+
--compile_no_warning_as_error --build_dir /workspace/build --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES='{}' "
291294
""".format(
292295
cuda_archs
293296
)
@@ -371,8 +374,7 @@ def dockerfile_for_linux(output_file):
371374
cp ${INTEL_OPENVINO_DIR}/runtime/lib/intel64/libopenvino_ir_frontend.so.${ONNXRUNTIME_OPENVINO_VERSION} \
372375
/opt/onnxruntime/lib && \
373376
cp ${INTEL_OPENVINO_DIR}/runtime/lib/intel64/libopenvino_onnx_frontend.so.${ONNXRUNTIME_OPENVINO_VERSION} \
374-
/opt/onnxruntime/lib && \
375-
cp /usr/lib/x86_64-linux-gnu/libtbb.so.* /opt/onnxruntime/lib
377+
/opt/onnxruntime/lib
376378
377379
RUN OV_SHORT_VERSION=`echo ${ONNXRUNTIME_OPENVINO_VERSION} | awk '{ split($0,a,"."); print substr(a[1],3) a[2] a[3] }'` && \
378380
(cd /opt/onnxruntime/lib && \

0 commit comments

Comments
 (0)