Skip to content

Commit 2cb255e

Browse files
Update ARGS
1 parent 1a45b9c commit 2cb255e

File tree

1 file changed

+25
-22
lines changed

1 file changed

+25
-22
lines changed

Dockerfile.redhat

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ ARG BASE_IMAGE=registry.access.redhat.com/ubi9/ubi:9.5
2424

2525
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
2626

27-
ARG JOBS=8
28-
ARG VERBOSE_LOGS=OFF
29-
ARG LTO_ENABLE=OFF
30-
ARG LTO_CXX_FLAGS=""
31-
ARG LTO_LD_FLAGS="-Wl,-z,relro"
27+
ARG JOBS=16
28+
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"
3232

3333
# hadolint ignore=DL3041
3434
RUN echo -e "max_parallel_downloads=8\nretries=50" >> /etc/dnf/dnf.conf && \
@@ -101,13 +101,14 @@ RUN if [ "$VERBOSE_LOGS" == "ON" ] ; then export VERBOSE=1 ; fi && ./install_ope
101101

102102
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
103103
FROM base_build as build
104-
ARG BASE_IMAGE
104+
ARG BASE_IMAGE=registry.access.redhat.com/ubi9/ubi:9.6
105105

106106
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
107107

108-
ARG JOBS=40
109-
ARG VERBOSE_LOGS=OFF
110-
ARG LTO_ENABLE=OFF
108+
ARG JOBS=16
109+
ARG VERBOSE_LOGS=ON
110+
ARG LTO_ENABLE=ON
111+
111112

112113
# hadolint ignore=DL3041
113114
RUN dnf install -y https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/opencl-headers-3.0-6.20201007gitd65bcc5.el9.noarch.rpm && \
@@ -145,6 +146,7 @@ RUN python3 --version && python3 -m pip install "numpy<2.0.0" --no-cache-dir &&
145146
python3 --version && python3 -m pip install "Jinja2==3.1.6" "MarkupSafe==3.0.2" --no-cache-dir
146147

147148
# Set up Bazel
149+
148150
ENV BAZEL_VERSION 6.1.1
149151
WORKDIR /bazel
150152
RUN curl -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36" -fSsL -O https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \
@@ -157,15 +159,15 @@ RUN dnf install -y https://github.com/linux-test-project/lcov/releases/download
157159

158160
ENV TF_SYSTEM_LIBS="curl"
159161
ENV TEST_LOG="/root/.cache/bazel/_bazel_root/bc57d4817a53cab8c785464da57d1983/execroot/ovms/bazel-out/test.log"
160-
ARG ov_source_branch=master
161-
ARG ov_contrib_branch=master
162-
ARG ov_source_org=openvinotoolkit
163-
ARG ov_contrib_org=openvinotoolkit
162+
ARG ov_source_branch=releases/2025/1
163+
ARG ov_contrib_branch=releases/2025/1
164+
ARG ov_source_org=opendatahub-io
165+
ARG ov_contrib_org=opendatahub-io
164166
ARG ov_use_binary=0
165167
ARG DLDT_PACKAGE_URL
166168
ARG TEMP_DIR=/tmp/openvino_installer
167169
ARG CMAKE_BUILD_TYPE=Release
168-
ARG debug_bazel_flags="--strip=always --config=mp_on_py_on --//:distro=redhat"
170+
ARG debug_bazel_flags="--strip=always --define MEDIAPIPE_DISABLE=0 --define PYTHON_DISABLE=0 --config=mp_on_py_on --verbose_failures --//:distro=redhat --local_ram_resources=23552 --local_cpu_resources=16"
169171

170172
################### BUILD OPENVINO FROM SOURCE - buildarg ov_use_binary=0 ############################
171173
# hadolint ignore=DL3041
@@ -222,7 +224,7 @@ RUN if [ -f /opt/intel/openvino/samples/cpp/build_samples.sh ]; then /opt/intel
222224
ENV OpenVINO_DIR=/opt/intel/openvino/runtime/cmake
223225
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/intel/openvino/runtime/lib/intel64/:/opt/opencv/lib/:/opt/intel/openvino/runtime/3rdparty/tbb/lib/
224226

225-
ARG ov_tokenizers_branch=master
227+
ARG ov_tokenizers_branch=releases/2025/1
226228
# hadolint ignore=DL3003
227229
RUN git clone https://github.com/openvinotoolkit/openvino_tokenizers.git /openvino_tokenizers && cd /openvino_tokenizers && git checkout $ov_tokenizers_branch && git submodule update --init --recursive
228230
WORKDIR /openvino_tokenizers/build
@@ -281,7 +283,7 @@ ENV PYTHONPATH=/opt/intel/openvino/python:/ovms/bazel-bin/src/python/binding
281283

282284
WORKDIR /ovms
283285

284-
ARG PROJECT_VERSION="2025.1"
286+
ARG PROJECT_VERSION="2025.1.0"
285287
LABEL description="OpenVINO Model Server"
286288
ARG minitrace_flags
287289

@@ -323,8 +325,8 @@ RUN python3 -c "import json; m={'PROJECT_VERSION':'${PROJECT_VERSION}','OPENVINO
323325

324326
FROM $BUILD_IMAGE as capi-build
325327
# C api shared library
326-
ARG CAPI_FLAGS="--strip=always --config=mp_off_py_off --//:distro=redhat"
327-
ARG JOBS=40
328+
ARG CAPI_FLAGS="--strip=always --config=mp_off_py_off --verbose_failures --//:distro=redhat --local_ram_resources=23552 --local_cpu_resources=16 --subcommands"
329+
ARG JOBS=16
328330
RUN bazel build --jobs $JOBS ${CAPI_FLAGS} //src:ovms_shared
329331

330332
# C api app with bazel
@@ -353,7 +355,8 @@ WORKDIR /
353355
ARG BASE_OS=redhat
354356
ARG ov_use_binary=0
355357
ARG FUZZER_BUILD=0
356-
ARG debug_bazel_flags="--strip=always --config=mp_on_py_on --//:distro=redhat"
358+
ARG debug_bazel_flags="--strip=always --define MEDIAPIPE_DISABLE=0 --define PYTHON_DISABLE=0 --config=mp_on_py_on --verbose_failures --//:distro=redhat --local_ram_resources=23552 --local_cpu_resources=16"
359+
357360
COPY --from=capi-build /ovms_release/lib/libovms_shared.so /ovms_release/lib/
358361
COPY create_package.sh /
359362
RUN ./create_package.sh ; if ! [[ $debug_bazel_flags == *"_py_off"* ]]; then \
@@ -378,11 +381,11 @@ LABEL "description"="OpenVINO(TM) Model Server is a solution for serving AI mode
378381
LABEL "maintainer"="[email protected]"
379382
ARG INSTALL_RPMS_FROM_URL=
380383
ARG INSTALL_DRIVER_VERSION="23.22.26516"
381-
ARG GPU=0
382-
ARG debug_bazel_flags=
384+
ARG GPU=1
385+
ARG debug_bazel_flags="--strip=always --define MEDIAPIPE_DISABLE=0 --define PYTHON_DISABLE=0 --config=mp_on_py_on --verbose_failures --//:distro=redhat --local_ram_resources=23552 --local_cpu_resources=16"
383386
LABEL bazel-build-flags=${debug_bazel_flags}
384387
LABEL supported-devices="CPU=1 GPU=${GPU}"
385-
ARG RELEASE_BASE_IMAGE
388+
ARG RELEASE_BASE_IMAGE=registry.access.redhat.com/ubi9-minimal:9.6
386389
LABEL base-image=${RELEASE_BASE_IMAGE}
387390

388391
ENV PYTHONPATH=/ovms/lib/python:/ovms/python_deps

0 commit comments

Comments
 (0)