Commit 1ac83af8 authored by Juan Diego's avatar Juan Diego
Browse files

Debug built with demo and updated runcmd

parent c0a1e27e
# Debug Docker image after installation
# Image to debug on demo
FROM local/dockervino:benchmark
FROM local/dockervino:demo
MAINTAINER jdg:juan-diego.gonzales-zuniga@kontron.com
RUN apt install -y x11-utils vim strace wget libtool autoconf unzip
......
#!/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/inference_engine_samples_build/intel64/Release
models_dir=/root/openvino_models/ir
# Input: IPCam or USBCam
input=cam #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}/Transportation/human_pose_estimation/mobilenet-v1/dldt/human-pose-estimation-0001.xml
###### NCS2 Pose Estimation ######
device=MYRIAD
app=${examples_dir}/human_pose_estimation_demo
model=${models_dir}/Transportation/human_pose_estimation/mobilenet-v1/dldt/human-pose-estimation-0001-fp16.xml
# Running the container
set -x
docker run \
-d \
-ti \
--privileged \
--mount type=bind,source="$(pwd)"/openvino-samples,target=/opt/intel/openvino/inference_engine/samples \
--privileged \
--net=host \
--env="DISPLAY" \
--volume="$HOME/.Xauthority:/root/.Xauthority:rw" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix" \
--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" \
--cap-add SYS_PTRACE \
--volume="/tmp/.X11-unix:/tmp/.X11-unix" \
--env="PS1=$myname> "\
--publish-all=true \
--hostname=$myname \
--name $myname \
--cidfile=/tmp/monitcont.id \
$myimage /bin/bash
$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
set +x
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment