#!/bin/bash myimage=local/dockervino:debug myname=debug ################################# ##### Display Parameters ##### ################################# # if run from a graphics window or shell, set some server params, else document what is needed [ k$DISPLAY = k ] && doit=echo # X11 Display and access file (to us in XAUTORITY env) # enable access from anywhere (used for containers) $doit xhost + # disable screen saver $doit xset s 0 # force screen to use (0 is usually the physical display of the system, others would be Xvnc virtual screens) display=$DISPLAY rm -f ./xauthority ; cp $XAUTHORITY ./xauthority ;chmod 666 ./xauthority #else root user inside container cannot open ################################# ##### General Parameters ###### ################################# # Init Openvino environment setupvars=/opt/intel/openvino/bin/setupvars.sh examples_dir=/root/omz_demos_build/intel64/Release models_dir=/root/openvino_models/ir # Input: IPCam or USBCam input=/videos/test.mp4 #input=http://94.214.173.241:8001/mjpg/video.mjpg ################################# ######## Examples ########### ################################# ####### CPU Pose Estimation ######## device=CPU app=${examples_dir}/human_pose_estimation_demo model=${models_dir}/intel/human-pose-estimation-0001/FP32/human-pose-estimation-0001.xml ###### NCS2 Pose Estimation ###### #device=MYRIAD #app=${examples_dir}/human_pose_estimation_demo #model=${models_dir}/intel/human-pose-estimation-0001/FP16/human-pose-estimation-0001.xml # Running the container set -x docker run \ -d \ -ti \ --mount type=bind,source="$(pwd)"/../../open_model_zoo,target=/opt/intel/openvino/deployment_tools/open_model_zoo \ --mount type=bind,source="$(pwd)"/videos,target=/videos \ --privileged \ --net=host \ --env="setupvars=$setupvars" \ --env="DISPLAY=$display" \ --env="input=$input" \ --env="device=$device" \ --env="app=$app" \ --env="model=$model" \ --env="agM=$agM" \ --env="emM=$emM" \ --env="hpM=$hpM" \ --device="/dev/video0:/dev/video0" \ --volume="/dev:/dev" \ --volume="/tmp/.X11-unix:/tmp/.X11-unix" \ --env="PS1=$myname> "\ --publish-all=true \ --hostname=$myname \ --name $myname \ --cidfile=/tmp/monitcont.id \ $myimage /bin/bash contid=$(cat /tmp/monitcont.id; rm -f /tmp/monitcont.id) set +x $debug docker logs $contid $debug docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $1 $contid