Skip to content

Commit cb7a2f7

Browse files
Update Dockerfile.redhat
1 parent b53b2f8 commit cb7a2f7

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

Dockerfile.redhat

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,13 @@ SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
2626

2727
ARG JOBS=16
2828
ARG VERBOSE_LOGS=ON
29-
#ARG LTO_ENABLE=ON
30-
#ARG LTO_CXX_FLAGS="-flto=auto -ffat-lto-objects -march=haswell"
31-
#ARG LTO_LD_FLAGS="-flto=auto -ffat-lto-objects"
32-
#RUN echo "$LTO_CXX_FLAGS"
33-
#ARG LTO_CXX_FLAGS=-flto=auto\ -ffat-lto-objects\ -march=haswell
34-
#RUN echo "$LTO_CXX_FLAGS"
29+
ARG LTO_ENABLE=ON
30+
ARG LTO_CXX_FLAGS="-flto=auto -ffat-lto-objects -march=haswell"
31+
ARG LTO_LD_FLAGS="-flto=auto -ffat-lto-objects"
3532

36-
ARG LTO_ENABLE=OFF
37-
ARG LTO_CXX_FLAGS=""
38-
ARG LTO_LD_FLAGS="-Wl,-z,relro"
33+
#ARG LTO_ENABLE=OFF
34+
#ARG LTO_CXX_FLAGS=""
35+
#ARG LTO_LD_FLAGS="-Wl,-z,relro"
3936

4037
# hadolint ignore=DL3041
4138
RUN echo -e "max_parallel_downloads=8\nretries=50" >> /etc/dnf/dnf.conf && \
@@ -115,8 +112,8 @@ ARG BASE_IMAGE=registry.access.redhat.com/ubi9/ubi:9.6
115112
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
116113

117114
ARG JOBS=16
118-
ARG VERBOSE_LOGS=OFF
119-
ARG LTO_ENABLE=OFF
115+
ARG VERBOSE_LOGS=ON
116+
ARG LTO_ENABLE=ON
120117

121118
# hadolint ignore=DL3041
122119
RUN dnf install -y https://rpmfind.net/linux/almalinux/8.10/PowerTools/x86_64/os/Packages/opencl-headers-2.2-1.20180306gite986688.el8.noarch.rpm && \
@@ -198,7 +195,16 @@ COPY openvino-lto.patch .
198195
RUN if [ "$ov_use_binary" == "0" ]; then patch -p1 < openvino-lto.patch ; rm -f openvino-lto.patch ; fi
199196
WORKDIR /openvino/build
200197
RUN if [ "$ov_use_binary" == "0" ] && [[ $debug_bazel_flags == *"PYTHON_DISABLE=1"* ]]; then true ; else exit 0 ; fi ; if ! [[ $debug_bazel_flags == *"PYTHON_DISABLE=1"* ]]; then true ; else exit 0 ; fi ; cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCMAKE_VERBOSE_MAKEFILE="${VERBOSE_LOGS}" -DENABLE_LTO=${LTO_ENABLE} -DENABLE_PYTHON=ON -DENABLE_INTEL_NPU=OFF -DENABLE_SAMPLES=0 -DCMAKE_CXX_FLAGS=" -Wno-error=parentheses ${LTO_CXX_FLAGS} " -DCMAKE_SHARED_LINKER_FLAGS="${LTO_LD_FLAGS}" ..
201-
RUN if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; cmake -DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" -DCMAKE_VERBOSE_MAKEFILE="${VERBOSE_LOGS}" -DENABLE_LTO=${LTO_ENABLE} -DENABLE_SAMPLES=0 -DENABLE_INTEL_NPU=OFF -DCMAKE_CXX_FLAGS=" -Wno-error=parentheses ${LTO_CXX_FLAGS} " -DCMAKE_SHARED_LINKER_FLAGS="${LTO_LD_FLAGS}" ..
198+
#RUN if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; cmake -DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" -DCMAKE_VERBOSE_MAKEFILE="${VERBOSE_LOGS}" -DENABLE_LTO=${LTO_ENABLE} -DENABLE_SAMPLES=0 -DENABLE_INTEL_NPU=OFF -DCMAKE_CXX_FLAGS=" -Wno-error=parentheses ${LTO_CXX_FLAGS} " -DCMAKE_SHARED_LINKER_FLAGS="${LTO_LD_FLAGS}" ..
199+
RUN if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; cmake \
200+
-DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" \
201+
-DCMAKE_VERBOSE_MAKEFILE="${VERBOSE_LOGS}" \
202+
-DENABLE_LTO=${LTO_ENABLE} \
203+
-DENABLE_SAMPLES=0 \
204+
-DENABLE_INTEL_NPU=OFF \
205+
-DCMAKE_CXX_FLAGS="-Wno-error=parentheses -flto -ffat-lto-objects -march=haswell" \
206+
-DCMAKE_SHARED_LINKER_FLAGS="-flto -ffat-lto-objects" \
207+
202208
RUN if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; make --jobs=$JOBS
203209
RUN if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; make install
204210
RUN if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; \

0 commit comments

Comments
 (0)