Commit 4240cd68 authored by Ukhu's avatar Ukhu
Browse files

Merge branch 'intelDocker'

parents 0db42fcf 469bb786
......@@ -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
......@@ -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!"
......@@ -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"]
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 && \
......
......@@ -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-0031/FP32/person-reidentification-retail-0031.xml
m_reid=${models_dir}/intel/person-reidentification-retail-0277/FP32/person-reidentification-retail-0277.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-0031/FP16/person-reidentification-retail-0031.xml
m_reid=${models_dir}/intel/person-reidentification-retail-0277/FP16/person-reidentification-retail-0277.xml
raw=true
broker=kontron-lora.cloudapp.net
client=Demo
......
# 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"]
# @(#) run with coherent naming
docker build --tag=local/dockervino:phase1 --network=host -f intel.Dockerfile . #| tee openvinobuild.log
......@@ -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-0248 --output_dir $models/ir
RUN $downloader --name person-reidentification-retail-0277 --output_dir $models/ir
# Downloading SSD Detection
RUN python3 $downloader --name ssd300 --output_dir $models
......
Markdown is supported
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