Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GONZALES ZUNIGA Juan Diego
dockervino
Commits
4240cd68
Commit
4240cd68
authored
Dec 10, 2020
by
Ukhu
Browse files
Merge branch 'intelDocker'
parents
0db42fcf
469bb786
Changes
8
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
4240cd68
...
...
@@ -4,55 +4,44 @@
## Introduction
The current version of OpenVINO is only available on Ubuntu 16.04 and Centos 4.
I needed OpenVINO on different platforms such as Fedora, Centos, Ubuntu 18.04.
So, the logical option was to create a Docker image.
## Requirements
-Docker CE
-Openvino TGZ file. Currently using 2020_R1, l_openvino_toolkit_p_2020.1.023.tgz.
-Download from https://software.intel.com/en-us/openvino-toolkit/choose-download/free-download-linux
The final image is around 3GB but the in between images can make up to 8GB.
Docker image compatible with Ubuntu 18.04, Ubuntu 20.04 and Fedora(tested with 33 but should work with others).
## Instructions
Since Openvino releases are quite frequent (2020_R1 now), I choose to make the dockerfile public instead of the Docker images.
You may want to experiment with other tgz OpenVINO versions.
Since Openvino releases are quite frequent (2021.R1 now), I choose to make the dockerfile public instead of the Docker images.
We have 5 images
phase1 -- installs the Openvino SDK, launches a small benchmark
phase1 -- installs the Openvino SDK, launches a small benchmark
. This is now done from Docker Hub, since Intel provides better dependencies.
phase2 -- downloads various dl models
phase2 -- downloads various dl models
and converts them.
demo -- reduces space, adds script to run examples
demo -- reduces space, adds script to run examples
for Kontron
benchmark -- adds different traditional networks (vgg, resnet, inception)
benchmark -- adds different traditional networks (vgg, resnet, inception)
for benchmarking.
debug -- adds debugging tools to the image to use with open_model_zoo repo
You need to build phase1 first then phase2, demo, benchmark and at last debug
```
sh
bash buildcmd
```
Modify the tracker and openpose under demo to run the desired examples
```
sh
bash tracker
bash openpose
### Launch benchmark
In order to build benchmark and launch it, you need at least phase1.
Modify runcmd depending on CPU/MYRIAD/GPU
```
sh
cd
benchmark
bash buildcmd
bash runcmd
```
Any help/advice is appreciated at juan-diego.gonzales-zuniga@inria.fr
Any help/advice is appreciated at juan-diego.gonzales-zuniga@kontron.com
### Demo
In order to launch a demo, you need phase1 and phase2.
```
sh
cd
demo
bash buildcmd
bash tracker | face | ssd | yolo | humanpose3d
```
\ No newline at end of file
benchmark/entrypoint.sh
View file @
4240cd68
...
...
@@ -10,19 +10,19 @@ echo "Benchmarking starts now!"
lscpu
echo
"Inception V3"
$benchmark
-d
$device
-i
$input
-api
$api
-m
$models
/public/googlenet-v3/
$datatype
/googlenet-v3.xml
$benchmark
-d
$device
-i
$input
-api
$api
-pc
-m
$models
/public/googlenet-v3/
$datatype
/googlenet-v3.xml
echo
"Inception V4"
$benchmark
-d
$device
-i
$input
-api
$api
-m
$models
/public/googlenet-v4-tf/
$datatype
/googlenet-v4-tf.xml
$benchmark
-d
$device
-i
$input
-api
$api
-pc
-m
$models
/public/googlenet-v4-tf/
$datatype
/googlenet-v4-tf.xml
echo
"VGG16"
$benchmark
-d
$device
-i
$input
-api
$api
-m
$models
/public/vgg16/
$datatype
/vgg16.xml
$benchmark
-d
$device
-i
$input
-api
$api
-pc
-m
$models
/public/vgg16/
$datatype
/vgg16.xml
echo
"VGG19"
$benchmark
-d
$device
-i
$input
-api
$api
-m
$models
/public/vgg19/
$datatype
/vgg19.xml
$benchmark
-d
$device
-i
$input
-api
$api
-pc
-m
$models
/public/vgg19/
$datatype
/vgg19.xml
echo
"Resnet 50"
$benchmark
-d
$device
-i
$input
-api
$api
-m
$models
/public/resnet-50-tf/
$datatype
/resnet-50-tf.xml
$benchmark
-d
$device
-i
$input
-api
$api
-pc
-m
$models
/public/resnet-50-tf/
$datatype
/resnet-50-tf.xml
echo
"Benchmarking done!"
debug/Dockerfile
View file @
4240cd68
...
...
@@ -12,14 +12,8 @@ ENV models=/root/openvino_models
# Copy models from phase2
COPY
--from=phase2 /root/openvino_models/ir /root/openvino_models/ir
WORKDIR
$INTEL_OPENVINO_DIR/deployment_tools
RUN
apt
install
-y
x11-utils vim strace libtool autoconf libmosquittopp-dev mosquitto mosquitto-clients
WORKDIR
/tmp
RUN
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/*
RUN
apt
install
-y
x11-utils vim strace libtool autoconf libmosquittopp-dev mosquitto mosquitto-clients lsb-release pciutils kmod git
RUN
pip3
install
paho-mqtt scipy
WORKDIR
/opt/intel/openvino/deployment_tools/open_model_zoo
RUN
echo
"export PYTHONPATH=/root/omz_demos_build/intel64/Release/lib:
\$
PYTHONPATH"
>>
/root/.bashrc
CMD
["/bin/bash"]
demo/Dockerfile
View file @
4240cd68
FROM
local/dockervino:phase2
as
phase2
FROM
local/dockervino:phase1
as
phase1
WORKDIR
${INTEL_OPENVINO_DIR}/deployment_tools
RUN
apt
install
-y
libmosquittopp-dev
&&
\
RUN
apt
install
-y
libmosquittopp-dev
git
&&
\
rm
-rf
open_model_zoo
&&
\
pip3
install
paho-mqtt scipy
&&
\
export
ngraph_DIR
=
/opt/intel/openvino/deployment_tools/ngraph/cmake
&&
\
...
...
demo/tracker
View file @
4240cd68
...
...
@@ -26,13 +26,13 @@ models_dir=/root/openvino_models/ir
# Input: IPCam or USBCam
input
=
/videos/test.mp4
# device: CPU or MYRIAD
device
=
CPU
device
=
MYRIAD
######## CPU Pedestrian Tracker ###
if
[
"
$device
"
==
CPU
]
;
then
app
=
${
examples_dir
}
/pedestrian_tracker_demo
m_det
=
${
models_dir
}
/intel/person-detection-retail-0013/FP32/person-detection-retail-0013.xml
m_reid
=
${
models_dir
}
/intel/person-reidentification-retail-0
031
/FP32/person-reidentification-retail-0
031
.xml
m_reid
=
${
models_dir
}
/intel/person-reidentification-retail-0
277
/FP32/person-reidentification-retail-0
277
.xml
raw
=
true
broker
=
kontron-lora.cloudapp.net
client
=
Demo
...
...
@@ -41,7 +41,7 @@ fi
if
[
"
$device
"
==
MYRIAD
]
;
then
app
=
${
examples_dir
}
/pedestrian_tracker_demo
m_det
=
${
models_dir
}
/intel/person-detection-retail-0013/FP16/person-detection-retail-0013.xml
m_reid
=
${
models_dir
}
/intel/person-reidentification-retail-0
031
/FP16/person-reidentification-retail-0
031
.xml
m_reid
=
${
models_dir
}
/intel/person-reidentification-retail-0
277
/FP16/person-reidentification-retail-0
277
.xml
raw
=
true
broker
=
kontron-lora.cloudapp.net
client
=
Demo
...
...
phase1/intel.Dockerfile
0 → 100644
View file @
4240cd68
# Basic docker installation of openVino
# Replace openvinoTar with the openvinoversion
# The openvinoTar is erased after installation
FROM
openvino/ubuntu18_data_dev:latest
USER
root
SHELL
["/bin/bash", "-xo", "pipefail", "-c"]
RUN
apt update
&&
\
apt install sudo && \
${INTEL_OPENVINO_DIR}/deployment_tools/demo/demo_benchmark_app.sh
# Add video group
RUN
usermod
-aG
video root
WORKDIR
${INTEL_OPENVINO_DIR}
CMD
["/bin/bash"]
phase1/intelbuild
0 → 100755
View file @
4240cd68
# @(#) run with coherent naming
docker build --tag=local/dockervino:phase1 --network=host -f intel.Dockerfile . #| tee openvinobuild.log
phase2/Dockerfile
View file @
4240cd68
...
...
@@ -29,7 +29,7 @@ RUN python3 $downloader --name head-pose-estimation-adas-0001 --output_dir $mode
# Download tracker networks
RUN
$downloader
--name
person-detection-retail-0013
--output_dir
$models
/ir
RUN
$downloader
--name
person-reidentification-retail-02
48
--output_dir
$models
/ir
RUN
$downloader
--name
person-reidentification-retail-02
77
--output_dir
$models
/ir
# Downloading SSD Detection
RUN
python3
$downloader
--name
ssd300
--output_dir
$models
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment