From 7bb865423a72cc26a1efcdedb31b45b3b126583b Mon Sep 17 00:00:00 2001 From: Dariusz Trawinski Date: Tue, 10 Oct 2023 14:08:46 +0200 Subject: [PATCH 1/5] use parameter for the sample file location --- Dockerfile.openvino | 4 ++-- Makefile | 2 ++ ci/testOnCommit.groovy | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile.openvino b/Dockerfile.openvino index e92d1d84483..620a8fae2fe 100644 --- a/Dockerfile.openvino +++ b/Dockerfile.openvino @@ -182,8 +182,8 @@ RUN cd flatbuffers && mkdir build && cd build && cmake -G "Unix Makefiles" -DCMA ## End of base image FROM base as build - -RUN wget -O video.mp4 "https://www.pexels.com/download/video/3044127/?fps=24.0&h=1080&w=1920" +ARG SAMPLE_VIDEO=https://www.pexels.com/download/video/3044127/?fps=24.0&h=1080&w=1920 +RUN wget -O video.mp4 "$(SAMPLE_VIDEO)" COPY . /mediapipe/ # BUILD examples diff --git a/Makefile b/Makefile index f58bc044783..3c57dbd7182 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ HTTPS_PROXY := "$(https_proxy)" OVMS_MEDIA_DOCKER_IMAGE ?= mediapipe_ovms OVMS_MEDIA_IMAGE_TAG ?= latest OVMS_BRANCH ?= "mediapipe_integration" +SAMPLE_VIDEO ?= "https://www.pexels.com/download/video/3044127/?fps=24.0&h=1080&w=1920" JOBS ?= $(shell python3 -c 'import multiprocessing as mp; print(mp.cpu_count())') DLDT_PACKAGE_URL ?= https://storage.openvinotoolkit.org/repositories/openvino/packages/2023.0/linux/l_openvino_toolkit_ubuntu20_2023.0.0.10926.b4452d56304_x86_64.tgz @@ -29,6 +30,7 @@ docker_build: --build-arg DLDT_PACKAGE_URL=$(DLDT_PACKAGE_URL) \ --build-arg JOBS=$(JOBS) . \ --build-arg OVMS_BRANCH=$(OVMS_BRANCH) \ + --build-arg SAMPLE_VIDEO=$(SAMPLE_VIDEO) \ -t $(OVMS_MEDIA_DOCKER_IMAGE):$(OVMS_MEDIA_IMAGE_TAG) tests: run_unit_tests run_hello_world run_hello_ovms diff --git a/ci/testOnCommit.groovy b/ci/testOnCommit.groovy index c98f47ce85a..77d2a422e63 100644 --- a/ci/testOnCommit.groovy +++ b/ci/testOnCommit.groovy @@ -14,7 +14,7 @@ pipeline { } stage("build image") { steps { - sh script: "make docker_build OVMS_MEDIA_IMAGE_TAG=${shortCommit}" + sh script: "make docker_build OVMS_MEDIA_IMAGE_TAG=${shortCommit}" SAMPLE_VIDEO=http://s3.toolbox.iotg.sclab.intel.com/video-samples/video.mp4 } } stage("unit tests") { From 0ccbfcf149dbc186acade7a2fe5121487b57454f Mon Sep 17 00:00:00 2001 From: Dariusz Trawinski Date: Tue, 10 Oct 2023 14:21:12 +0200 Subject: [PATCH 2/5] fix --- Makefile | 2 +- ci/testOnCommit.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3c57dbd7182..57f0b7b23c0 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ docker_build: --build-arg DLDT_PACKAGE_URL=$(DLDT_PACKAGE_URL) \ --build-arg JOBS=$(JOBS) . \ --build-arg OVMS_BRANCH=$(OVMS_BRANCH) \ - --build-arg SAMPLE_VIDEO=$(SAMPLE_VIDEO) \ + --build-arg SAMPLE_VIDEO="$(SAMPLE_VIDEO)" \ -t $(OVMS_MEDIA_DOCKER_IMAGE):$(OVMS_MEDIA_IMAGE_TAG) tests: run_unit_tests run_hello_world run_hello_ovms diff --git a/ci/testOnCommit.groovy b/ci/testOnCommit.groovy index 77d2a422e63..b6e8b1d3769 100644 --- a/ci/testOnCommit.groovy +++ b/ci/testOnCommit.groovy @@ -14,7 +14,7 @@ pipeline { } stage("build image") { steps { - sh script: "make docker_build OVMS_MEDIA_IMAGE_TAG=${shortCommit}" SAMPLE_VIDEO=http://s3.toolbox.iotg.sclab.intel.com/video-samples/video.mp4 + sh script: "make docker_build OVMS_MEDIA_IMAGE_TAG=${shortCommit} SAMPLE_VIDEO=http://s3.toolbox.iotg.sclab.intel.com/video-samples/video.mp4" } } stage("unit tests") { From 1b35d9f06e0823770bb7a683837824bb3ccacc60 Mon Sep 17 00:00:00 2001 From: Dariusz Trawinski Date: Tue, 10 Oct 2023 15:06:37 +0200 Subject: [PATCH 3/5] fix param --- Dockerfile.openvino | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.openvino b/Dockerfile.openvino index 620a8fae2fe..46196cfaffa 100644 --- a/Dockerfile.openvino +++ b/Dockerfile.openvino @@ -183,7 +183,7 @@ RUN cd flatbuffers && mkdir build && cd build && cmake -G "Unix Makefiles" -DCMA FROM base as build ARG SAMPLE_VIDEO=https://www.pexels.com/download/video/3044127/?fps=24.0&h=1080&w=1920 -RUN wget -O video.mp4 "$(SAMPLE_VIDEO)" +RUN wget -O video.mp4 ${SAMPLE_VIDEO} COPY . /mediapipe/ # BUILD examples diff --git a/Makefile b/Makefile index 57f0b7b23c0..850eea97849 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ HTTPS_PROXY := "$(https_proxy)" OVMS_MEDIA_DOCKER_IMAGE ?= mediapipe_ovms OVMS_MEDIA_IMAGE_TAG ?= latest OVMS_BRANCH ?= "mediapipe_integration" -SAMPLE_VIDEO ?= "https://www.pexels.com/download/video/3044127/?fps=24.0&h=1080&w=1920" +SAMPLE_VIDEO ?= https://www.pexels.com/download/video/3044127/?fps=24.0&h=1080&w=1920 JOBS ?= $(shell python3 -c 'import multiprocessing as mp; print(mp.cpu_count())') DLDT_PACKAGE_URL ?= https://storage.openvinotoolkit.org/repositories/openvino/packages/2023.0/linux/l_openvino_toolkit_ubuntu20_2023.0.0.10926.b4452d56304_x86_64.tgz From 874ccb8f1f0da85b48fafd414fb1f36906b4b81e Mon Sep 17 00:00:00 2001 From: Dariusz Trawinski Date: Tue, 10 Oct 2023 15:22:40 +0200 Subject: [PATCH 4/5] change branch --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 850eea97849..cd442c37af1 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ HTTP_PROXY := "$(http_proxy)" HTTPS_PROXY := "$(https_proxy)" OVMS_MEDIA_DOCKER_IMAGE ?= mediapipe_ovms OVMS_MEDIA_IMAGE_TAG ?= latest -OVMS_BRANCH ?= "mediapipe_integration" +OVMS_BRANCH ?= main SAMPLE_VIDEO ?= https://www.pexels.com/download/video/3044127/?fps=24.0&h=1080&w=1920 JOBS ?= $(shell python3 -c 'import multiprocessing as mp; print(mp.cpu_count())') DLDT_PACKAGE_URL ?= https://storage.openvinotoolkit.org/repositories/openvino/packages/2023.0/linux/l_openvino_toolkit_ubuntu20_2023.0.0.10926.b4452d56304_x86_64.tgz From 93040edbe8233fea9b7e3277aa2a83dec1d0d15e Mon Sep 17 00:00:00 2001 From: Dariusz Trawinski Date: Tue, 10 Oct 2023 15:55:21 +0200 Subject: [PATCH 5/5] no proxy --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cd442c37af1..85c3e448bde 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ HTTP_PROXY := "$(http_proxy)" HTTPS_PROXY := "$(https_proxy)" +NO_PROXY := "$(no_proxy)" OVMS_MEDIA_DOCKER_IMAGE ?= mediapipe_ovms OVMS_MEDIA_IMAGE_TAG ?= latest OVMS_BRANCH ?= main @@ -26,7 +27,7 @@ DLDT_PACKAGE_URL ?= https://storage.openvinotoolkit.org/repositories/openvino/pa # Targets to use outside running mediapipe_ovms container docker_build: docker build -f Dockerfile.openvino \ - --build-arg http_proxy=$(HTTP_PROXY) --build-arg https_proxy=$(HTTPS_PROXY) \ + --build-arg http_proxy=$(HTTP_PROXY) --build-arg https_proxy=$(HTTPS_PROXY) --build-arg no_proxy=$(NO_PROXY) \ --build-arg DLDT_PACKAGE_URL=$(DLDT_PACKAGE_URL) \ --build-arg JOBS=$(JOBS) . \ --build-arg OVMS_BRANCH=$(OVMS_BRANCH) \