smart-edge-open / edgeapps

Applications that can be onboarded to an Intel® Smart Edge Open edge node.
Apache License 2.0
51 stars 74 forks source link

Issue installing OpenVINO consumer application. #70

Closed jafilippini closed 3 years ago

jafilippini commented 3 years ago

Hi team!,

we are trying to set up our first sample application in OpenNESS, OpenVINO, following the steps indicated on this github repository link: https://github.com/open-ness/specs/blob/master/doc/applications/openness_openvino.md

We were able set up fine the Client Simulator and OpenVINO Producer applications. But we have a problem installing the OpenVINO Consumer Application. The deployment fails on the step 39. When it tries to run “ RUN git config --global http.proxy $http_proxy “. The command output is: “The command '/bin/sh -c git config --global http.proxy $http_proxy' returned a non-zero code: 1”.

Below we paste the whole output.

Could you help us guiding us how we can solve this initial issue?.

Thanks!. Julián F.

Console output:

[root@node02 consumer]# pwd /home/edgeapps/applications/openvino/consumer

[root@node02 consumer]# ./build-image.sh Sending build context to Docker daemon 42.5kB Step 1/42 : FROM ubuntu:20.04 ---> 9873176a8ff5 Step 2/42 : ENV http_proxy=$http_proxy ---> Using cache ---> 1d0a21f01f33 Step 3/42 : ENV https_proxy=$https_proxy ---> Using cache ---> c1d76b44d0c7 Step 4/42 : ENV no_proxy=$no_proxy,eaa.openness,analytics.openness ---> Using cache ---> 701a141f32e6 Step 5/42 : ENV DEBIAN_FRONTEND=noninteractive ---> Using cache ---> 5f03a1903b2d Step 6/42 : ENV OPENVINO_TASKSET_CPU=7 ---> Using cache ---> f0ead192bee7 Step 7/42 : ARG OPENVINO_LINK=https://registrationcenter-download.intel.com/akdlm/irc_nas/17062/l_openvino_toolkit_p_2021.1.110.tgz ---> Using cache ---> 1090f828420e Step 8/42 : ARG YEAR=2021 ---> Using cache ---> c3cbbda32d3a Step 9/42 : ARG OPENVINO_DEMOSDIR=/opt/intel/openvino$YEAR/deployment_tools/open_model_zoo/demos ---> Using cache ---> 9649f7793326 Step 10/42 : ARG MODELROOT=/opt/intel/openvino$YEAR/deployment_tools/open_model_zoo/tools/downloader ---> Using cache ---> bf2921a38331 Step 11/42 : ENV APPDIR=/opt/intel/openvino$YEAR/deployment_tools/inference_engine/demos/python_demos/object_detection_demo_ssd_async/ ---> Using cache ---> 131a1165bd0b Step 12/42 : RUN apt-get update && apt-get -y install iputils-ping && apt-get -y install build-essential gcc g++ cmake && apt-get -y install cpio && apt-get -y install sudo && apt-get -y install unzip && apt-get -y install wget && apt-get -y install lsb-core && apt-get -y install autoconf libtool && apt-get -y install ffmpeg x264 && apt-get -y install git && apt-get -y install python3-pip && apt-get -y install nginx libnginx-mod-rtmp libjson-c-dev && apt-get -y install util-linux && apt-get -y install libusb-1.0-0-dev libudev-dev libssl-dev libboost-program-options1.71-dev libboost-thread1.71 libboost-filesystem1.71 ---> Using cache ---> 72fce8cfe382 Step 13/42 : RUN cd /tmp && wget $OPENVINO_LINK && tar xf l_openvino_toolkit.tgz && cd l_openvino_toolkit && sed -i 's/decline/accept/g' silent.cfg && ./install_openvino_dependencies.sh && ./install.sh -s silent.cfg && rm -rf /tmp/l_openvinotoolkit ---> Using cache ---> 8bb7034cb293 Step 14/42 : RUN pip3 install numpy ---> Using cache ---> ce305e7eca91 Step 15/42 : COPY nginx.conf /etc/nginx/nginx.conf ---> Using cache ---> 79b5a8fee3b0 Step 16/42 : RUN chmod +s /usr/sbin/nginx ---> Using cache ---> 370668d9dbac Step 17/42 : RUN cd /tmp && wget https://github.com/libusb/libusb/archive/v1.0.22.zip && unzip v1.0.22.zip && cd libusb-1.0.22 && ./bootstrap.sh && ./configure --disable-udev --enable-shared && make -j4 && make install && rm -rf /tmp/1.0.22 ---> Using cache ---> 6b214ee2b0b7 Step 18/42 : RUN useradd -ms /bin/bash -G video,users,www-data openvino && chown -R openvino /home/openvino ---> Using cache ---> 7a0a9ea7cd32 Step 19/42 : COPY cmd/ /home/openvino ---> Using cache ---> 162df37c1014 Step 20/42 : ADD start.sh /home/openvino ---> Using cache ---> b9f0e06233fc Step 21/42 : RUN chown -R openvino:openvino /opt/intel/openvino ---> Using cache ---> 101c9231cc9c Step 22/42 : RUN chown -R openvino:openvino /home/openvino/* ---> Using cache ---> d3fd41734c40 Step 23/42 : RUN chmod 0777 /etc/hosts ---> Using cache ---> c0aa4544b482 Step 24/42 : USER openvino ---> Using cache ---> 5cbf498db786 Step 25/42 : RUN echo "source /opt/intel/openvino$YEAR/bin/setupvars.sh" >> ~/.bashrc ---> Using cache ---> 2fb5b5da4423 Step 26/42 : RUN bash -c "source ~/.bashrc" ---> Using cache ---> daf1421dabd2 Step 27/42 : ADD object_detection_demo_ssd_async.patch $APP_DIR ---> Using cache ---> b4b319340a22 Step 28/42 : RUN cd $APP_DIR && patch -p0 object_detection_demo_ssd_async.py object_detection_demo_ssd_async.patch ---> Using cache ---> 20d1d5871d9e Step 29/42 : RUN cd $MODEL_ROOT && python3 -mpip install --user -r ./requirements.in && ./downloader.py --name pedestrian-detection-adas-0002 && ./downloader.py --name vehicle-detection-adas-0002 ---> Using cache ---> 369be183ebe3 Step 30/42 : RUN cp -r $MODEL_ROOT/intel/vehicle-detection-adas-0002 $APP_DIR/ && cp -r $MODEL_ROOT/intel/pedestrian-detection-adas-0002 $APP_DIR/ ---> Using cache ---> 3d66dfe00297 Step 31/42 : RUN cd /tmp && wget https://dl.google.com/go/go1.15.linux-amd64.tar.gz && tar -xvf go1.15.linux-amd64.tar.gz ---> Using cache ---> 01ab39592ec4 Step 32/42 : ENV OPENVINOROOT=/opt/intel/openvino$YEAR ---> Using cache ---> 4689facf64e7 Step 33/42 : ENV GOPATH=/home/openvino/go ---> Using cache ---> 8889983556b6 Step 34/42 : ENV GOROOT=/tmp/go ---> Using cache ---> 913783e47c31 Step 35/42 : ENV GO111MODULE=on ---> Using cache ---> aae2d47bb477 Step 36/42 : ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH ---> Using cache ---> 679fd530e0a2 Step 37/42 : RUN mkdir $GOPATH ---> Using cache ---> be964332b69f Step 38/42 : WORKDIR /home/openvino ---> Using cache ---> bd06db562782 Step 39/42 : RUN git config --global http.proxy $http_proxy ---> Running in 955946df7c67 The command '/bin/sh -c git config --global http.proxy $http_proxy' returned a non-zero code: 1 [root@node02 consumer]#

cjnolan commented 3 years ago

Hi @jafilippini could you check if the http_proxy variable is set in your environment please? It is passed to the consumer build script and is used for this command.

jafilippini commented 3 years ago

Hi @cjnolan, thanks for your answer, I copy below the ENV variables of the edge node host where we are trying to deploy the Consumer Application. I do not find any variables called: http_proxy, https_proxy or no_proxy.

Could you give us an advise about what we should do?

Thanks!. Julián


[root@node02 ~]# printenv XDG_SESSION_ID=199 HOSTNAME=node02 SELINUX_ROLE_REQUESTED= TERM=xterm SHELL=/bin/bash HISTSIZE=1000 SSH_CLIENT=172.20.247.90 57790 22 SELINUX_USE_CURRENT_RANGE= SSH_TTY=/dev/pts/0 GOPRIVATE=github.com/open-ness USER=root LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=01;36:.au=01;36:.flac=01;36:.mid=01;36:.midi=01;36:.mka=01;36:.mp3=01;36:.mpc=01;36:.ogg=01;36:.ra=01;36:.wav=01;36:.axa=01;36:.oga=01;36:.spx=01;36:*.xspf=01;36: OVN_NB_DB=unix:/var/run/ovn/ovnnb_db.sock MAIL=/var/spool/mail/root PATH=/root/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin PWD=/root LANG=en_US.UTF-8 SELINUX_LEVEL_REQUESTED= HISTCONTROL=ignoredups SHLVL=1 HOME=/root GOROOT=/usr/local/go LOGNAME=root CVS_RSH=ssh SSH_CONNECTION=172.20.247.90 57790 172.29.14.234 22 GOPATH=/root/go LESSOPEN=||/usr/bin/lesspipe.sh %s XDG_RUNTIMEDIR=/run/user/0 =/usr/bin/printenv [root@node02 ~]#


ttzeng commented 3 years ago

@jafilippini , if your edge node, where you built the openvino-cons-app docker image, has direct Internet connection, I think you should comment out that git config command in the Dockerfile.

jafilippini commented 3 years ago

Hi @ttzeng, thanks for your answer!. I have commented that line. But now receive the following error during the image building: ….. Step 40/41 : RUN go build main.go openvino.go eaa_interface.go ---> Running in 9ec7716a899d . # command-line-arguments ./openvino.go:97:2: undefined: wg note: module requires Go 1.16 The command '/bin/sh -c go build main.go openvino.go eaa_interface.go' returned a non-zero code: 2 [root@node02 consumer]# …...

Below we paste the whole output.

We appreciate your value help. Thanks!. Julián F.

Console output:

[root@node02 consumer]# [root@node02 consumer]# [root@node02 consumer]# ./build-image.sh Sending build context to Docker daemon 42.5kB Step 1/41 : FROM ubuntu:20.04 ---> 9873176a8ff5 Step 2/41 : ENV http_proxy=$http_proxy ---> Using cache ---> 1d0a21f01f33 Step 3/41 : ENV https_proxy=$https_proxy ---> Using cache ---> c1d76b44d0c7 Step 4/41 : ENV no_proxy=$no_proxy,eaa.openness,analytics.openness ---> Using cache ---> 701a141f32e6 Step 5/41 : ENV DEBIAN_FRONTEND=noninteractive ---> Using cache ---> 5f03a1903b2d Step 6/41 : ENV OPENVINO_TASKSET_CPU=7 ---> Using cache ---> f0ead192bee7 Step 7/41 : ARG OPENVINO_LINK=https://registrationcenter-download.intel.com/akdlm/irc_nas/17062/l_openvino_toolkit_p_2021.1.110.tgz ---> Using cache ---> 1090f828420e Step 8/41 : ARG YEAR=2021 ---> Using cache ---> c3cbbda32d3a Step 9/41 : ARG OPENVINO_DEMOSDIR=/opt/intel/openvino$YEAR/deployment_tools/open_model_zoo/demos ---> Using cache ---> 9649f7793326 Step 10/41 : ARG MODELROOT=/opt/intel/openvino$YEAR/deployment_tools/open_model_zoo/tools/downloader ---> Using cache ---> bf2921a38331 Step 11/41 : ENV APPDIR=/opt/intel/openvino$YEAR/deployment_tools/inference_engine/demos/python_demos/object_detection_demo_ssd_async/ ---> Using cache ---> 131a1165bd0b Step 12/41 : RUN apt-get update && apt-get -y install build-essential gcc g++ cmake && apt-get -y install cpio && apt-get -y install sudo && apt-get -y install unzip && apt-get -y install wget && apt-get -y install lsb-core && apt-get -y install autoconf libtool && apt-get -y install ffmpeg x264 && apt-get -y install git && apt-get -y install python3-pip && apt-get -y install nginx libnginx-mod-rtmp libjson-c-dev && apt-get -y install util-linux && apt-get -y install libusb-1.0-0-dev libudev-dev libssl-dev libboost-program-options1.71-dev libboost-thread1.71 libboost-filesystem1.71 ---> Using cache ---> be3b7c81c4b8 Step 13/41 : RUN cd /tmp && wget $OPENVINO_LINK && tar xf l_openvino_toolkit.tgz && cd l_openvino_toolkit && sed -i 's/decline/accept/g' silent.cfg && ./install_openvino_dependencies.sh && ./install.sh -s silent.cfg && rm -rf /tmp/l_openvinotoolkit ---> Using cache ---> d9be810e1397 Step 14/41 : RUN pip3 install numpy ---> Using cache ---> d55631626b8f Step 15/41 : COPY nginx.conf /etc/nginx/nginx.conf ---> Using cache ---> a082990e9220 Step 16/41 : RUN chmod +s /usr/sbin/nginx ---> Using cache ---> 70abdc8fea8d Step 17/41 : RUN cd /tmp && wget https://github.com/libusb/libusb/archive/v1.0.22.zip && unzip v1.0.22.zip && cd libusb-1.0.22 && ./bootstrap.sh && ./configure --disable-udev --enable-shared && make -j4 && make install && rm -rf /tmp/1.0.22 ---> Using cache ---> 07807cae6e70 Step 18/41 : RUN useradd -ms /bin/bash -G video,users,www-data openvino && chown -R openvino /home/openvino ---> Using cache ---> 00f294e8cbc0 Step 19/41 : COPY cmd/ /home/openvino ---> Using cache ---> 5650fd04e26c Step 20/41 : ADD start.sh /home/openvino ---> Using cache ---> 4533742a403b Step 21/41 : RUN chown -R openvino:openvino /opt/intel/openvino ---> Using cache ---> 28b8dc2c2002 Step 22/41 : RUN chown -R openvino:openvino /home/openvino/* ---> Using cache ---> 9a4e7cfc9197 Step 23/41 : RUN chmod 0777 /etc/hosts ---> Using cache ---> 8d23e60ac564 Step 24/41 : USER openvino ---> Using cache ---> fd8c85004208 Step 25/41 : RUN echo "source /opt/intel/openvino$YEAR/bin/setupvars.sh" >> ~/.bashrc ---> Using cache ---> a39915f6e1b7 Step 26/41 : RUN bash -c "source ~/.bashrc" ---> Using cache ---> a62d08229923 Step 27/41 : ADD object_detection_demo_ssd_async.patch $APP_DIR ---> Using cache ---> b37f1f529d8b Step 28/41 : RUN cd $APP_DIR && patch -p0 object_detection_demo_ssd_async.py object_detection_demo_ssd_async.patch ---> Using cache ---> d0b9add699f2 Step 29/41 : RUN cd $MODEL_ROOT && python3 -mpip install --user -r ./requirements.in && ./downloader.py --name pedestrian-detection-adas-0002 && ./downloader.py --name vehicle-detection-adas-0002 ---> Using cache ---> b2638e1f7186 Step 30/41 : RUN cp -r $MODEL_ROOT/intel/vehicle-detection-adas-0002 $APP_DIR/ && cp -r $MODEL_ROOT/intel/pedestrian-detection-adas-0002 $APP_DIR/ ---> Using cache ---> 959a71a062b9 Step 31/41 : RUN cd /tmp && wget https://dl.google.com/go/go1.15.linux-amd64.tar.gz && tar -xvf go1.15.linux-amd64.tar.gz ---> Using cache ---> 64423f1b5104 Step 32/41 : ENV OPENVINOROOT=/opt/intel/openvino$YEAR ---> Using cache ---> 0b298125c57c Step 33/41 : ENV GOPATH=/home/openvino/go ---> Using cache ---> 505d9e0813d3 Step 34/41 : ENV GOROOT=/tmp/go ---> Using cache ---> 310e1c849194 Step 35/41 : ENV GO111MODULE=on ---> Using cache ---> ab3ade636582 Step 36/41 : ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH ---> Using cache ---> 9124cada7655 Step 37/41 : RUN mkdir $GOPATH ---> Using cache ---> 35eb000d058c Step 38/41 : WORKDIR /home/openvino ---> Using cache ---> 7165602114c9 Step 39/41 : RUN go get github.com/gorilla/websocket ---> Using cache ---> 142829406673 Step 40/41 : RUN go build main.go openvino.go eaa_interface.go ---> Running in 9ec7716a899d . # command-line-arguments ./openvino.go:97:2: undefined: wg note: module requires Go 1.16 The command '/bin/sh -c go build main.go openvino.go eaa_interface.go' returned a non-zero code: 2 [root@node02 consumer]# [root@node02 consumer]#

ttzeng commented 3 years ago

@jafilippini, according to the error, it seems you have to define the variable wg with var wg sync.WaitGroup before the wg.Wait() statement. Please also add "sync" module to the import section at the beginning.

jafilippini commented 3 years ago

Hi @ttzeng, effectively the definition of the var wg is abscent on the openvino.go file when the image is built. To solve, due I do not know from where docket takes the openfile.go file, I initially created a auxiliary container without the las lines of the original Dockerfile, I ran it, and from there O took the openvino.go file that if wrong. I created the same file in the consumer folder of the host server, and added to the Dockerfile a line that copy the external openvino.go file to the image. In this way, I could créate succesfully the consumer image!. Thanks again!.

Julián