diff --git a/.gitignore b/.gitignore index c404eb8cb8..ec63443e4b 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ bazel-ovms-c bazel-testlogs __pycache__ .workspace +.gitconfig *user_config* *.swp dist/ diff --git a/Dockerfile.redhat b/Dockerfile.redhat index 6f494632a7..0e447a2f1f 100644 --- a/Dockerfile.redhat +++ b/Dockerfile.redhat @@ -48,13 +48,10 @@ RUN echo -e "max_parallel_downloads=8\nretries=50" >> /etc/dnf/dnf.conf && \ wget && \ dnf clean all -## WA for authentication issues with git over HTTP/2 -RUN git config --global http.version HTTP/1.1 - ####### Azure SDK (modern azure-sdk-for-cpp: azure-core, azure-storage-blobs, azure-storage-files-shares) ARG SDL_OPS="-Wl,-z,relro,-z,now,-z,noexecstack -Wall -Wextra -Wimplicit-fallthrough -fPIE -pie -fstack-protector-strong -fexceptions -fasynchronous-unwind-tables -fcf-protection -fpic -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -Wall -Wno-unknown-pragmas -Wno-error=sign-compare -fno-delete-null-pointer-checks -fwrapv -fstack-clash-protection -Wformat -Wformat-security -Werror=format-security -s -D_GLIBCXX_USE_CXX11_ABI=1 -Wuninitialized" WORKDIR /azure-sdk-for-cpp -RUN git clone --depth 1 --branch azure-storage-blobs_12.18.0 https://github.com/Azure/azure-sdk-for-cpp.git . && \ +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false git clone --depth 1 --branch azure-storage-blobs_12.18.0 https://github.com/Azure/azure-sdk-for-cpp.git . && \ echo "# no-op: use system libcurl and openssl" > /azure-sdk-toolchain.cmake && \ cmake -S sdk/core/azure-core -B build/azure-core \ -DCMAKE_TOOLCHAIN_FILE=/azure-sdk-toolchain.cmake \ @@ -107,7 +104,7 @@ COPY third_party/pugixml /ovms/third_party/pugixml # Build and install pugixml # hadolint ignore=DL3003 -RUN git clone -b v1.13 https://github.com/zeux/pugixml && \ +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false git clone -b v1.13 https://github.com/zeux/pugixml && \ cd pugixml && \ patch -p1 < /ovms/third_party/pugixml/pugixml_v1.13_flags.patch && \ cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_VERBOSE_MAKEFILE=${VERBOSE_LOGS} \ @@ -207,7 +204,7 @@ ARG SDL_OPS="-Wl,-z,relro,-z,now,-z,noexecstack -fPIE -pie -fstack-protector-str RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && dnf install -y gflags-devel gflags json-devel fdupes && \ dnf clean all # hadolint ignore=DL3003 -RUN if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; git clone https://github.com/$ov_source_org/openvino.git /openvino && cd /openvino && git checkout $ov_source_branch && git submodule update --init --recursive +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; git clone https://github.com/$ov_source_org/openvino.git /openvino && cd /openvino && git checkout $ov_source_branch && git submodule update --init --recursive RUN if [ "$ov_use_binary" == "0" ]; then true ; else exit 0 ; fi ; if ! [[ $debug_bazel_flags == *"py_off"* ]]; then true ; else exit 0 ; fi ; pip3.12 install --no-cache-dir -r /openvino/src/bindings/python/wheel/requirements-dev.txt WORKDIR /openvino/build RUN if [ "$ov_use_binary" == "0" ]; then true ; else exit 0 ; fi ; \ @@ -255,7 +252,7 @@ WORKDIR /openvino_tokenizers/ ARG ov_tokenizers_branch=85be884a69f10270703f81f970a5ee596a4c8df7 ARG ov_tokenizers_org=openvinotoolkit # hadolint ignore=DL3003 -RUN git clone https://github.com/$ov_tokenizers_org/openvino_tokenizers.git /openvino_tokenizers && cd /openvino_tokenizers && git checkout $ov_tokenizers_branch && git submodule update --init --recursive && \ +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false git clone https://github.com/$ov_tokenizers_org/openvino_tokenizers.git /openvino_tokenizers && cd /openvino_tokenizers && git checkout $ov_tokenizers_branch && git submodule update --init --recursive && \ sed -i '/openvino~=/d' /openvino_tokenizers/pyproject.toml && \ sed -i '/requires-python/d' /openvino_tokenizers/pyproject.toml && \ cd /openvino_tokenizers && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE="${VERBOSE_LOGS}" -DCMAKE_CXX_FLAGS=" ${SDL_OPS} ${LTO_CXX_FLAGS} " -DCMAKE_SHARED_LINKER_FLAGS="${LTO_LD_FLAGS}" -S ./ -B ./build/ && cmake --build ./build/ --parallel $JOBS && cp -vP /openvino_tokenizers/build/src/lib*.so /opt/intel/openvino/runtime/lib/intel64/ && \ @@ -268,7 +265,7 @@ WORKDIR /openvino_genai/ ARG ov_genai_branch=master ARG ov_genai_org=openvinotoolkit # hadolint ignore=DL3003 -RUN if [ "$ov_use_binary" == "0" ]; then true ; else exit 0 ; fi ; \ +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false if [ "$ov_use_binary" == "0" ]; then true ; else exit 0 ; fi ; \ git clone https://github.com/$ov_genai_org/openvino.genai /openvino_genai && cd /openvino_genai && git checkout $ov_genai_branch && git submodule update --init --recursive && \ cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCMAKE_CXX_FLAGS=" ${SDL_OPS} ${LTO_CXX_FLAGS} " -DCMAKE_SHARED_LINKER_FLAGS="${LTO_LD_FLAGS}" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DENABLE_SYSTEM_ICU="True" -DBUILD_TOKENIZERS=OFF -DENABLE_SAMPLES=OFF -DENABLE_TOOLS=OFF -DENABLE_TESTS=OFF -DENABLE_XGRAMMAR=ON -S ./ -B ./build/ && \ cmake --build ./build/ --parallel $JOBS && cp -vP /openvino_genai/build/openvino_genai/lib*.so* /opt/intel/openvino/runtime/lib/intel64/ && \ @@ -304,7 +301,7 @@ COPY package.json /ovms/ RUN cp -v /etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt ARG KONFLUX=1 # This is a workaround to avoid bazel fetching dependencies during build, which causes issues in Konflux. Should be disabled when building outside of Konflux to speed up the build by using bazel cache and avoid fetching dependencies which are already cached. -RUN if [ "$KONFLUX" == "0" ] ; then true ; else exit 0 ; fi ; \ +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false if [ "$KONFLUX" == "0" ] ; then true ; else exit 0 ; fi ; \ bazel build --jobs=$JOBS ${debug_bazel_flags} //:ovms_dependencies @com_google_googletest//:gtest COPY src/ /ovms/src/ @@ -335,13 +332,13 @@ RUN rm -f /usr/lib64/cmake/OpenSSL/OpenSSLConfig.cmake # Builds unit tests together with ovms server in one step # It speeds up CI when tests are executed outside of the image building # hadolint ignore=SC2046 -RUN bazel build --jobs=$JOBS ${debug_bazel_flags} ${minitrace_flags} //src:ovms $(if [ "$OPTIMIZE_BUILDING_TESTS" == "1" ] ; then echo -n //src:ovms_test; fi) +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false bazel build --jobs=$JOBS ${debug_bazel_flags} ${minitrace_flags} //src:ovms $(if [ "$OPTIMIZE_BUILDING_TESTS" == "1" ] ; then echo -n //src:ovms_test; fi) # espeak-ng is built as a separate step, independent of the OVMS binary. # Set ESPEAK=0 to skip the espeak build. ARG ESPEAK=1 # hadolint ignore=DL3059 -RUN if [ "$ESPEAK" == "1" ]; then bazel build --jobs=$JOBS ${debug_bazel_flags} //third_party:espeak_ng //third_party:espeak_ng_data; fi +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false if [ "$ESPEAK" == "1" ]; then bazel build --jobs=$JOBS ${debug_bazel_flags} //third_party:espeak_ng //third_party:espeak_ng_data; fi # Tests execution COPY ci/check_coverage.bat /ovms/ @@ -369,14 +366,14 @@ ARG CAPI_FLAGS="--strip=always --config=mp_off_py_off --//:distro=redhat" ARG JOBS=40 ARG LTO_ENABLE=OFF WORKDIR /ovms -RUN bazel build --jobs $JOBS ${CAPI_FLAGS} //src:ovms_shared +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false bazel build --jobs $JOBS ${CAPI_FLAGS} //src:ovms_shared # C api app with bazel # hadolint ignore=DL3059 -RUN bazel build --jobs $JOBS ${CAPI_FLAGS} //src:capi_cpp_example +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false bazel build --jobs $JOBS ${CAPI_FLAGS} //src:capi_cpp_example # C-API benchmark app -RUN bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && ./bazel-bin/src/capi_benchmark --niter 2 --nstreams 1 --servable_name "dummy" +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && ./bazel-bin/src/capi_benchmark --niter 2 --nstreams 1 --servable_name "dummy" # C-api C/C++ app with gcc COPY MakefileCapi /ovms/ RUN make -f MakefileCapi cpp CAPI_FLAGS="${CAPI_FLAGS}" && \ diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index d84024f135..07d867881f 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -50,13 +50,10 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ WORKDIR / -## WA for authentication issues with git over HTTP/2 -RUN git config --global http.version HTTP/1.1 - ####### Azure SDK (modern azure-sdk-for-cpp: azure-core, azure-storage-blobs, azure-storage-files-shares) ARG SDL_OPS="-Wl,-z,relro,-z,now,-z,noexecstack -Wall -Wextra -Wimplicit-fallthrough -fPIE -pie -fstack-protector-strong -fexceptions -fasynchronous-unwind-tables -fcf-protection -fpic -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -Wall -Wno-unknown-pragmas -Wno-error=sign-compare -fno-delete-null-pointer-checks -fwrapv -fstack-clash-protection -Wformat -Wformat-security -Werror=format-security -s -D_GLIBCXX_USE_CXX11_ABI=1 -Wuninitialized" WORKDIR /azure-sdk-for-cpp -RUN git clone --depth 1 --branch azure-storage-blobs_12.18.0 https://github.com/Azure/azure-sdk-for-cpp.git . && \ +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false git clone --depth 1 --branch azure-storage-blobs_12.18.0 https://github.com/Azure/azure-sdk-for-cpp.git . && \ echo "# no-op: use system libcurl and openssl" > /azure-sdk-toolchain.cmake && \ cmake -S sdk/core/azure-core -B build/azure-core \ -DCMAKE_TOOLCHAIN_FILE=/azure-sdk-toolchain.cmake \ @@ -175,7 +172,7 @@ ENV TEST_LOG="/root/.cache/bazel/_bazel_root/bc57d4817a53cab8c785464da57d1983/ex ################### BUILD OPENVINO FROM SOURCE - buildarg ov_use_binary=0 ############################ ARG SDL_OPS="-Wl,-z,relro,-z,now,-z,noexecstack -fPIE -pie -fstack-protector-strong -fexceptions -fasynchronous-unwind-tables -fcf-protection -fpic -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -Wno-unknown-pragmas -Wno-error=sign-compare -fno-delete-null-pointer-checks -fwrapv -fstack-clash-protection -Wformat -Wformat-security -s -D_GLIBCXX_USE_CXX11_ABI=1 -Wuninitialized" # hadolint ignore=DL3003 -RUN if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; git clone https://github.com/$ov_source_org/openvino.git /openvino && cd /openvino && git checkout $ov_source_branch && git submodule update --init --recursive +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; git clone https://github.com/$ov_source_org/openvino.git /openvino && cd /openvino && git checkout $ov_source_branch && git submodule update --init --recursive WORKDIR /openvino/build RUN if [ "$ov_use_binary" == "0" ]; then \ if [[ $debug_bazel_flags == *"py_off"* ]]; then \ @@ -222,7 +219,7 @@ WORKDIR /openvino_tokenizers/ ARG ov_tokenizers_branch=master ARG ov_tokenizers_org=openvinotoolkit # hadolint ignore=DL3003 -RUN git clone https://github.com/$ov_tokenizers_org/openvino_tokenizers.git /openvino_tokenizers && cd /openvino_tokenizers && git checkout $ov_tokenizers_branch && git submodule update --init --recursive +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false git clone https://github.com/$ov_tokenizers_org/openvino_tokenizers.git /openvino_tokenizers && cd /openvino_tokenizers && git checkout $ov_tokenizers_branch && git submodule update --init --recursive RUN if ! [[ $debug_bazel_flags == *"_py_off"* ]]; then \ mkdir -p /opt/intel/openvino/python/openvino_tokenizers/lib ; \ cp -r python/* /opt/intel/openvino/python/ ; \ @@ -243,7 +240,7 @@ ARG ov_genai_branch=master ARG ov_genai_org=openvinotoolkit WORKDIR /openvino_genai/ # hadolint ignore=DL3003 -RUN if [ "$ov_use_binary" == "0" ]; then \ +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false if [ "$ov_use_binary" == "0" ]; then \ git clone https://github.com/$ov_genai_org/openvino.genai /openvino_genai && cd /openvino_genai && git checkout $ov_genai_branch && git submodule update --init --recursive && \ cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCMAKE_CXX_FLAGS=" ${SDL_OPS} " -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DENABLE_SYSTEM_ICU="True" -DBUILD_TOKENIZERS=OFF -DENABLE_SAMPLES=OFF -DENABLE_TOOLS=OFF -DENABLE_TESTS=OFF -DENABLE_XGRAMMAR=ON -S ./ -B ./build/ && \ cmake --build ./build/ --parallel $JOBS && cp /openvino_genai/build/openvino_genai/lib*.so* /opt/intel/openvino/runtime/lib/intel64/ && \ @@ -295,12 +292,12 @@ RUN if [ "$BASE_OS" == "ubuntu24" ] ; then update-alternatives --install /usr/bi # prebuild dependencies before copying sources & test dependencies for caching # hadolint ignore=DL3059 -RUN bazel build --jobs=$JOBS ${debug_bazel_flags} //:ovms_dependencies @com_google_googletest//:gtest +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false bazel build --jobs=$JOBS ${debug_bazel_flags} //:ovms_dependencies @com_google_googletest//:gtest COPY src/ /ovms/src/ # hadolint ignore=DL3059 -RUN bazel build --jobs=$JOBS ${debug_bazel_flags} @org_tensorflow//tensorflow/core:framework +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false bazel build --jobs=$JOBS ${debug_bazel_flags} @org_tensorflow//tensorflow/core:framework # hadolint ignore=DL3059 RUN if [ "$BASE_OS" == "ubuntu24" ] ; then update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 2; fi @@ -342,13 +339,13 @@ ARG OPTIMIZE_BUILDING_TESTS=0 # Builds unit tests together with ovms server in one step # It speeds up CI when tests are executed outside of the image building # hadolint ignore=SC2046 -RUN if [ "$FUZZER_BUILD" == "0" ]; then bazel build --jobs=$JOBS ${debug_bazel_flags} ${minitrace_flags} //src:ovms $(if [ "${OPTIMIZE_BUILDING_TESTS}" == "1" ] ; then echo -n //src:ovms_test; fi); fi; +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false if [ "$FUZZER_BUILD" == "0" ]; then bazel build --jobs=$JOBS ${debug_bazel_flags} ${minitrace_flags} //src:ovms $(if [ "${OPTIMIZE_BUILDING_TESTS}" == "1" ] ; then echo -n //src:ovms_test; fi); fi; # espeak-ng is built as a separate step, independent of the OVMS binary. # Set ESPEAK=0 to skip the espeak build. ARG ESPEAK=1 # hadolint ignore=DL3059 -RUN if [ "$ESPEAK" == "1" ]; then bazel build --jobs=$JOBS ${debug_bazel_flags} //third_party:espeak_ng //third_party:espeak_ng_data; fi +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false if [ "$ESPEAK" == "1" ]; then bazel build --jobs=$JOBS ${debug_bazel_flags} //third_party:espeak_ng //third_party:espeak_ng_data; fi ARG RUN_TESTS=0 RUN if [ "$RUN_TESTS" == "1" ] ; then mkdir -p demos/common/export_models/ && mv export_model.py demos/common/export_models/ && ./prepare_llm_models.sh /ovms/src/test/llm_testing docker && ./run_unit_tests.sh ; fi @@ -371,15 +368,15 @@ ARG CAPI_FLAGS="--strip=always --config mp_off_py_off --//:distro=ubuntu" ARG JOBS=40 ARG FUZZER_BUILD=0 WORKDIR /ovms -RUN bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:ovms_shared +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:ovms_shared # C-API benchmark app -RUN if [ "$FUZZER_BUILD" == "0" ]; then bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && ./bazel-bin/src/capi_benchmark --niter 2 --nstreams 1 --servable_name "dummy"; fi; +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false if [ "$FUZZER_BUILD" == "0" ]; then bazel build --jobs=$JOBS ${CAPI_FLAGS} //src:capi_benchmark && ./bazel-bin/src/capi_benchmark --niter 2 --nstreams 1 --servable_name "dummy"; fi; ARG FUZZER_BUILD=0 # C api app with bazel # hadolint ignore=DL3059 -RUN if [ "$FUZZER_BUILD" == "0" ]; then bazel build ${CAPI_FLAGS} --jobs $JOBS //src:capi_cpp_example; fi; +RUN --mount=type=secret,id=gitconfig,target=/root/.gitconfig,required=false if [ "$FUZZER_BUILD" == "0" ]; then bazel build ${CAPI_FLAGS} --jobs $JOBS //src:capi_cpp_example; fi; # C-api C/C++ app with gcc COPY MakefileCapi /ovms/ diff --git a/Makefile b/Makefile index aebb6bbdf8..1e87362fa6 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,7 @@ endif JOBS ?= $(CORES_TOTAL) + # Image on which OVMS is compiled. If DIST_OS is not set, it's also used for a release image. # Currently supported BASE_OS values are: ubuntu24 ubuntu22 redhat BASE_OS ?= ubuntu24 @@ -213,6 +214,15 @@ TEST_PATH ?= tests/functional/ VERBOSE_LOGS ?= OFF +ifneq ($(TOKEN),) +GIT_CONFIG_FILE := .gitconfig +GIT_CONFIG_SECRET = --secret id=gitconfig,src=$(GIT_CONFIG_FILE) +BUILDX = buildx + +$(GIT_CONFIG_FILE): + @git config --file $@ url."https://x-access-token:$(TOKEN)@github.com/".insteadOf https://github.com/ +endif + BUILD_ARGS = --build-arg http_proxy=$(HTTP_PROXY)\ --build-arg https_proxy=$(HTTPS_PROXY)\ --build-arg no_proxy=$(NO_PROXY)\ @@ -243,13 +253,16 @@ BUILD_ARGS = --build-arg http_proxy=$(HTTP_PROXY)\ --build-arg CAPI_FLAGS=$(CAPI_FLAGS)\ --build-arg VERBOSE_LOGS=$(VERBOSE_LOGS)\ --build-arg KONFLUX=$(KONFLUX)\ - --build-arg ESPEAK=$(ESPEAK) + --build-arg ESPEAK=$(ESPEAK)\ + $(GIT_CONFIG_SECRET) .PHONY: default docker_build \ default: docker_build +ovms_builder_image targz_package ovms_release_images release_image: $(GIT_CONFIG_FILE) + venv:$(ACTIVATE) @echo $(BUILD_ARGS) @echo -n "Using venv " diff --git a/WORKSPACE b/WORKSPACE index 03569375ee..9025b73caa 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -177,7 +177,7 @@ http_archive( git_repository( name = "mediapipe", remote = "https://github.com/openvinotoolkit/mediapipe", - commit = "12e8d511cfbc5f471c498278a65a02dd250963e8", # top of mediapipe main branch as of 26.11.2025 + commit = "e57eca54b6190aa482c14ddc8b53a4e7d4088ce3", # top of mediapipe main branch as of 26.11.2025 ) # DEV mediapipe 1 source - adjust local repository path for build @@ -197,8 +197,10 @@ http_archive( # Node dependencies http_archive( name = "build_bazel_rules_nodejs", - sha256 = "5aae76dced38f784b58d9776e4ab12278bc156a9ed2b1d9fcd3e39921dc88fda", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.7.1/rules_nodejs-5.7.1.tar.gz"], + sha256 = "d3476f6dc146766d3f35aa8aa39e65df6467ed7dc8dfdcabf9b7cad464516cd5", + strip_prefix = "rules_nodejs-5.7.1", + type = "tar.gz", + urls = ["https://codeload.github.com/bazelbuild/rules_nodejs/tar.gz/refs/tags/5.7.1"], ) load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies") @@ -580,10 +582,12 @@ new_local_repository( path = "third_party/mediapipe_calculators", ) -git_repository( +http_archive( name = "nlohmann_json", - remote = "https://github.com/nlohmann/json/", - tag = "v3.11.3", + sha256 = "0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406", + strip_prefix = "json-3.11.3", + type = "tar.gz", + url = "https://codeload.github.com/nlohmann/json/tar.gz/refs/tags/v3.11.3", ) # for rest client in unit tests (server_test.cpp) git_repository( diff --git a/ci/build_test_OnCommit.groovy b/ci/build_test_OnCommit.groovy index 1952349275..4da7ac5500 100644 --- a/ci/build_test_OnCommit.groovy +++ b/ci/build_test_OnCommit.groovy @@ -231,15 +231,17 @@ pipeline { sh "echo build --remote_cache=${env.OVMS_BAZEL_REMOTE_CACHE_URL} > .user.bazelrc" sh "echo test:linux --test_env https_proxy=${env.HTTPS_PROXY} >> .user.bazelrc" sh "echo test:linux --test_env http_proxy=${env.HTTP_PROXY} >> .user.bazelrc" - sh "make ovms_builder_image RUN_TESTS=${runTestsFlag} OPTIMIZE_BUILDING_TESTS=1 OVMS_CPP_IMAGE_TAG=${shortCommit} BUILD_IMAGE=openvino/model_server-build:${shortCommit}" + withCredentials([usernamePassword(credentialsId: 'workflow_lab_mediapipe', usernameVariable: 'GIT_USERNAME', passwordVariable: 'TOKEN')]) { + sh "make ovms_builder_image RUN_TESTS=${runTestsFlag} OPTIMIZE_BUILDING_TESTS=1 OVMS_CPP_IMAGE_TAG=${shortCommit} BUILD_IMAGE=openvino/model_server-build:${shortCommit}" - // release_image - sh "make release_image RUN_TESTS=0 GPU=1 NPU=1 OVMS_CPP_IMAGE_TAG=${shortCommit} BUILD_IMAGE=openvino/model_server-build:${shortCommit}" - sh "make run_lib_files_test OVMS_CPP_IMAGE_TAG=${shortCommit}" - if ( test_doc_files_linux ) { - sh "docker save openvino/model_server:${shortCommit} | gzip > ovms_release_image.tar.gz" - stash name: 'ovms-release-image', includes: 'ovms_release_image.tar.gz' - sh "rm -f ovms_release_image.tar.gz" + // release_image + sh "make release_image RUN_TESTS=0 GPU=1 NPU=1 OVMS_CPP_IMAGE_TAG=${shortCommit} BUILD_IMAGE=openvino/model_server-build:${shortCommit}" + sh "make run_lib_files_test OVMS_CPP_IMAGE_TAG=${shortCommit}" + if ( test_doc_files_linux ) { + sh "docker save openvino/model_server:${shortCommit} | gzip > ovms_release_image.tar.gz" + stash name: 'ovms-release-image', includes: 'ovms_release_image.tar.gz' + sh "rm -f ovms_release_image.tar.gz" + } } } } diff --git a/third_party/opencv/install_opencv.sh b/third_party/opencv/install_opencv.sh index 3d0cebd151..36d5f1dea6 100755 --- a/third_party/opencv/install_opencv.sh +++ b/third_party/opencv/install_opencv.sh @@ -56,11 +56,11 @@ fi current_working_dir=$(pwd) -cd $work_dir -rm -rf $opencv_branch $work_dir/opencv_repo -rm -rf $opencv_branch $work_dir/opencv_contrib_repo -git clone https://github.com/opencv/opencv.git --depth 1 -b $opencv_branch $work_dir/opencv_repo -git clone https://github.com/opencv/opencv_contrib.git --depth 1 -b $opencv_branch $work_dir/opencv_contrib_repo +cd "$work_dir" +rm -rf "$work_dir/opencv_repo" "$work_dir/opencv_contrib_repo" +mkdir -p "$work_dir/opencv_repo" "$work_dir/opencv_contrib_repo" +curl -fLsS "https://github.com/opencv/opencv/archive/refs/tags/${opencv_branch}.tar.gz" | tar -xz --strip-components=1 -C "$work_dir/opencv_repo" +curl -fLsS "https://github.com/opencv/opencv_contrib/archive/refs/tags/${opencv_branch}.tar.gz" | tar -xz --strip-components=1 -C "$work_dir/opencv_contrib_repo" cd $work_dir/opencv_repo mkdir -p $work_dir/opencv_repo/build cd $work_dir/opencv_repo/build