diff --git a/dockerfiles/Dockerfile.openvino b/dockerfiles/Dockerfile.openvino index 3a905a159e..77652c6b48 100644 --- a/dockerfiles/Dockerfile.openvino +++ b/dockerfiles/Dockerfile.openvino @@ -1,92 +1,64 @@ #------------------------------------------------------------------------- -# Copyright(C) 2019 Intel Corporation. -# Licensed under the MIT License. +# Copyright(C) 2021 Intel Corporation. +# SPDX-License-Identifier: MIT #-------------------------------------------------------------------------- -FROM ubuntu:18.04 +ARG OPENVINO_VERSION=2021.4 -ARG DEVICE=CPU_FP32 +# Build stage +FROM openvino/ubuntu18_runtime:${OPENVINO_VERSION} AS builder + +ENV WORKDIR_PATH=/home/openvino +WORKDIR $WORKDIR_PATH +ENV DEBIAN_FRONTEND noninteractive + +ARG DEVICE=CPU_FP32 ARG ONNXRUNTIME_REPO=https://github.com/microsoft/onnxruntime.git ARG ONNXRUNTIME_BRANCH=master -WORKDIR /code -ARG MY_ROOT=/code - ENV PATH /opt/miniconda/bin:/code/cmake-3.21.0-linux-x86_64/bin:$PATH ENV LD_LIBRARY_PATH=/opt/miniconda/lib:/usr/lib:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH -ENV INTEL_OPENVINO_DIR=/opt/intel/openvino_2021.3.394 ENV InferenceEngine_DIR=${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/share -ENV IE_PLUGINS_PATH=${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64 -ENV LD_LIBRARY_PATH=/opt/intel/opencl:${INTEL_OPENVINO_DIR}/inference_engine/external/gna/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/mkltiny_lnx/lib:$INTEL_OPENVINO_DIR/deployment_tools/ngraph/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/omp/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/tbb/lib:${IE_PLUGINS_PATH}:${LD_LIBRARY_PATH} -ENV OpenCV_DIR=${INTEL_OPENVINO_DIR}/opencv/share/OpenCV -ENV LD_LIBRARY_PATH=${INTEL_OPENVINO_DIR}/opencv/lib:${INTEL_OPENVINO_DIR}/opencv/share/OpenCV/3rdparty/lib:${LD_LIBRARY_PATH} -ENV HDDL_INSTALL_DIR=${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/hddl -ENV LD_LIBRARY_PATH=${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/hddl/lib:$LD_LIBRARY_PATH ENV ngraph_DIR=${INTEL_OPENVINO_DIR}/deployment_tools/ngraph/cmake -ENV LANG en_US.UTF-8 -ENV DEBIAN_FRONTEND=noninteractive +USER root +RUN apt update; apt install -y git protobuf-compiler libprotobuf-dev +RUN git clone --recursive -b ${ONNXRUNTIME_BRANCH} ${ONNXRUNTIME_REPO} +RUN /bin/sh onnxruntime/dockerfiles/scripts/install_common_deps.sh +RUN ln -s cmake-* cmake-dir +RUN python3 -m pip install wheel +ENV PATH=${WORKDIR_PATH}/cmake-dir/bin:$PATH +RUN cd onnxruntime/cmake/external/onnx && python3 setup.py install +RUN cd onnxruntime && ./build.sh --config Release --update --build --parallel --use_openvino ${DEVICE} --build_shared_lib --build_wheel +#Steps to download sources +RUN cat /etc/apt/sources.list | sed 's/^# deb-src/deb-src/g' > ./temp; mv temp /etc/apt/sources.list +RUN apt update; apt install dpkg-dev +RUN mkdir /sources +WORKDIR /sources +RUN apt-get source cron iso-codes libapt-inst2.0 lsb-release powermgmt-base python-apt-common python3-apt python3-dbus python3-gi unattended-upgrades libapt-pkg5.0 libhogweed4 libnettle6 +WORKDIR / +RUN tar cvf GPL_sources.tar.gz /sources -RUN apt update && apt -y install --no-install-recommends apt-transport-https ca-certificates gnupg python3 python3-pip udev unzip zip x11-apps lsb-core wget curl cpio sudo libboost-python-dev libpng-dev zlib1g-dev git libnuma1 ocl-icd-libopencl1 clinfo libboost-filesystem1.65-dev libboost-thread1.65-dev protobuf-compiler libprotoc-dev autoconf automake libtool libjson-c-dev unattended-upgrades && \ - unattended-upgrade && \ - rm -rf /var/lib/apt/lists/* && \ - cd /opt && \ -# libusb1.0.22 - curl -L https://github.com/libusb/libusb/archive/v1.0.22.zip --output v1.0.22.zip && \ - unzip v1.0.22.zip && \ - cd /opt/libusb-1.0.22 && \ -# bootstrap steps - ./bootstrap.sh && \ - ./configure --disable-udev --enable-shared && \ - make -j4 && \ - cd /opt/libusb-1.0.22/libusb && \ -# configure libusb1.0.22 - /bin/mkdir -p '/usr/local/lib' && \ - /bin/bash ../libtool --mode=install /usr/bin/install -c libusb-1.0.la '/usr/local/lib' && \ - /bin/mkdir -p '/usr/local/include/libusb-1.0' && \ - /usr/bin/install -c -m 644 libusb.h '/usr/local/include/libusb-1.0' && \ - /bin/mkdir -p '/usr/local/lib/pkgconfig' && \ -# Install OpenVINO - cd ${MY_ROOT} && \ - wget https://apt.repos.intel.com/openvino/2021/GPG-PUB-KEY-INTEL-OPENVINO-2021 && \ - apt-key add GPG-PUB-KEY-INTEL-OPENVINO-2021 && rm GPG-PUB-KEY-INTEL-OPENVINO-2021 && \ - cd /etc/apt/sources.list.d && \ - echo "deb https://apt.repos.intel.com/openvino/2021 all main">intel-openvino-2021.list && \ - apt update && \ - apt -y install intel-openvino-dev-ubuntu18-2021.3.394 && \ - cd ${INTEL_OPENVINO_DIR}/install_dependencies && ./install_openvino_dependencies.sh -y && \ - cd ${INTEL_OPENVINO_DIR} && rm -rf documentation data_processing && cd deployment_tools/ && rm -rf model_optimizer tools open_model_zoo demo && cd inference_engine && rm -rf samples && \ - cd /opt/libusb-1.0.22/ && \ - /usr/bin/install -c -m 644 libusb-1.0.pc '/usr/local/lib/pkgconfig' && \ - cp /opt/intel/openvino_2021/deployment_tools/inference_engine/external/97-myriad-usbboot.rules /etc/udev/rules.d/ && \ - ldconfig && \ -# Install GPU runtime and drivers - cd ${MY_ROOT} && \ - mkdir /tmp/opencl && \ - cd /tmp/opencl && \ - apt update && \ - apt install -y --no-install-recommends ocl-icd-libopencl1 && \ - rm -rf /var/lib/apt/lists/* && \ - wget "https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-gmmlib_19.3.2_amd64.deb" && \ - wget "https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-igc-core_1.0.2597_amd64.deb" && \ - wget "https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-igc-opencl_1.0.2597_amd64.deb" && \ - wget "https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-opencl_19.41.14441_amd64.deb" && \ - wget "https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-ocloc_19.41.14441_amd64.deb" && \ - dpkg -i /tmp/opencl/*.deb && \ - ldconfig && \ - rm -rf /tmp/opencl && \ - cd ${MY_ROOT} && \ - locale-gen en_US.UTF-8 && update-locale LANG=en_US.UTF-8 && \ - pip3 install cython && \ -# Download and build ONNX Runtime - cd ${MY_ROOT} && \ - git clone --recursive -b ${ONNXRUNTIME_BRANCH} ${ONNXRUNTIME_REPO} && \ - /bin/sh onnxruntime/dockerfiles/scripts/install_common_deps.sh && \ - cd onnxruntime/cmake/external/onnx && python3 setup.py install && \ - cd ${MY_ROOT}/onnxruntime && ./build.sh --config Release --update --build --parallel --use_openvino ${DEVICE} --build_shared_lib --build_wheel && \ - pip install build/Linux/Release/dist/*-linux_x86_64.whl && \ - cd ${MY_ROOT}/ && rm -rf onnxruntime && cd /opt && rm -rf v1.0.22.zip && cd ${MY_ROOT} &&\ - apt remove -y cmake && cd /usr/share/python-wheels/ && rm -rf *.whl &&\ - cd /usr/lib/ && rm -rf python2.7 python3.6 python3.8 && cd && rm -rf .cache +# Deploy stage +FROM openvino/ubuntu18_runtime:${OPENVINO_VERSION} + +ENV DEBIAN_FRONTEND noninteractive + +USER root +COPY --from=builder /home/openvino/onnxruntime/build/Linux/Release/dist/*.whl ./ +COPY --from=builder /GPL_sources.tar.gz ./ +RUN python3 -m pip install ./*.whl && rm ./*.whl +RUN apt update; apt install -y unattended-upgrades && \ + unattended-upgrade +ARG BUILD_UID=1001 +ARG BUILD_USER=onnxruntimedev +RUN adduser --uid $BUILD_UID $BUILD_USER +ENV WORKDIR_PATH /home/${BUILD_USER} +WORKDIR ${WORKDIR_PATH} + +USER ${BUILD_USER} +ENV PATH=${WORKDIR_PATH}/miniconda/bin:${WORKDIR_PATH}/cmake-dir/bin:$PATH +ENV IE_PLUGINS_PATH=${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64 +ENV LD_LIBRARY_PATH=/opt/intel/opencl:${INTEL_OPENVINO_DIR}/inference_engine/external/gna/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/mkltiny_lnx/lib:$INTEL_OPENVINO_DIR/deployment_tools/ngraph/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/omp/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/tbb/lib:${IE_PLUGINS_PATH}:${LD_LIBRARY_PATH} \ No newline at end of file diff --git a/dockerfiles/Dockerfile.openvino-centos7 b/dockerfiles/Dockerfile.openvino-centos7 new file mode 100755 index 0000000000..f79c0e1673 --- /dev/null +++ b/dockerfiles/Dockerfile.openvino-centos7 @@ -0,0 +1,105 @@ +#------------------------------------------------------------------------- +# Copyright(C) 2021 Intel Corporation. +# SPDX-License-Identifier: MIT +#-------------------------------------------------------------------------- + +FROM centos:7.8.2003 + +WORKDIR /code + +ARG MY_ROOT=/code +ARG YUM_OV_PACKAGE=intel-openvino-runtime-centos7-2021.4.582.x86_64 +ARG DEVICE=CPU_FP32 +ARG ONNXRUNTIME_REPO=https://github.com/microsoft/onnxruntime +ARG ONNXRUNTIME_BRANCH=master + +ENV INTEL_OPENVINO_DIR=/opt/intel/openvino_2021.4.582 +ENV InferenceEngine_DIR=${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/share +ENV IE_PLUGINS_PATH=${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64 +ENV ngraph_DIR=${INTEL_OPENVINO_DIR}/deployment_tools/ngraph/cmake +ENV LD_LIBRARY_PATH=/opt/intel/opencl:${INTEL_OPENVINO_DIR}/inference_engine/external/gna/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/mkltiny_lnx/lib:$INTEL_OPENVINO_DIR/deployment_tools/ngraph/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/omp/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/tbb/lib:${IE_PLUGINS_PATH}:${LD_LIBRARY_PATH} +ENV OpenCV_DIR=${INTEL_OPENVINO_DIR}/opencv/share/OpenCV +ENV LD_LIBRARY_PATH=${INTEL_OPENVINO_DIR}/opencv/lib:${INTEL_OPENVINO_DIR}/opencv/share/OpenCV/3rdparty/lib:${LD_LIBRARY_PATH} +ENV HDDL_INSTALL_DIR=${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/hddl +ENV LD_LIBRARY_PATH=${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/hddl/lib:$LD_LIBRARY_PATH +ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64:/lib64:$LD_LIBRARY_PATH + +# Install packages +RUN yum update -y && \ + yum groupinstall "Development Tools" -y && \ + yum install -y yum-utils autoconf automake libtool unzip udev wget zlib-devel libffi-devel openssl-devel boost-devel-1.53.0 && \ + yum clean packages && yum clean all && rm -rf /var/cache/yum && \ +# Install cmake + cd $MY_ROOT && \ + wget https://github.com/Kitware/CMake/releases/download/v3.18.6/cmake-3.18.6.tar.gz && \ + tar -zxvf cmake-3.18.6.tar.gz && rm -rf cmake-3.18.6.tar.gz && \ + cd cmake-3.18.6 && \ + ./bootstrap && \ + make && \ + make install && \ + cd $MY_ROOT && \ +# libusb1.0.22 + cd /opt/ && wget https://github.com/libusb/libusb/archive/v1.0.22.zip && \ + unzip v1.0.22.zip && rm -rf v1.0.22.zip && cd /opt/libusb-1.0.22 && \ +# bootstrap steps + ./bootstrap.sh && \ + ./configure --disable-udev --enable-shared && \ + make -j4 && \ +# configure libusb1.0.22 + cd /opt/libusb-1.0.22/libusb && \ + /bin/mkdir -p '/usr/local/lib' && \ + /bin/bash ../libtool --mode=install /usr/bin/install -c libusb-1.0.la '/usr/local/lib' && \ + /bin/mkdir -p '/usr/local/include/libusb-1.0' && \ + /usr/bin/install -c -m 644 libusb.h '/usr/local/include/libusb-1.0' && \ + /bin/mkdir -p '/usr/local/lib/pkgconfig' && \ +# Install openvino + yum-config-manager --add-repo https://yum.repos.intel.com/openvino/2021/setup/intel-openvino-2021.repo && \ + rpm --import https://yum.repos.intel.com/openvino/2021/setup/RPM-GPG-KEY-INTEL-OPENVINO-2021 && \ + yum update -y && yum list intel-openvino* && \ + yum install -y $YUM_OV_PACKAGE && \ + cd ${INTEL_OPENVINO_DIR}/install_dependencies/ && ./install_openvino_dependencies.sh -y && \ + printf "\nexport LD_LIBRARY_PATH=\${LD_LIBRARY_PATH}:/usr/local/lib\n" >> /opt/intel/openvino_2021.4.582/bin/setupvars.sh && \ + cd /opt/libusb-1.0.22 && \ + /usr/bin/install -c -m 644 libusb-1.0.pc '/usr/local/lib/pkgconfig' && \ + cp /opt/intel/openvino_2021/deployment_tools/inference_engine/external/97-myriad-usbboot.rules /etc/udev/rules.d/ && \ + ldconfig && \ +# Install GPU runtime and drivers + cd ${MY_ROOT} && \ + mkdir /tmp/opencl && \ + cd /tmp/opencl && \ + yum install -y epel-release && \ + yum install -y ocl-icd ocl-icd-devel && \ + wget -O intel-igc-core-1.0.2597-1.el7.x86_64.rpm https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-igc-core-1.0.2597-1.el7.x86_64.rpm/download && \ + wget -O intel-opencl-19.41.14441-1.el7.x86_64.rpm https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-opencl-19.41.14441-1.el7.x86_64.rpm/download && \ + wget -O intel-igc-opencl-devel-1.0.2597-1.el7.x86_64.rpm https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-igc-opencl-devel-1.0.2597-1.el7.x86_64.rpm/download && \ + wget -O intel-igc-opencl-1.0.2597-1.el7.x86_64.rpm https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-igc-opencl-1.0.2597-1.el7.x86_64.rpm/download && \ + wget -O intel-gmmlib-19.3.2-1.el7.x86_64.rpm https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-gmmlib-19.3.2-1.el7.x86_64.rpm/download && \ + wget -O intel-gmmlib-devel-19.3.2-1.el7.x86_64.rpm https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-gmmlib-devel-19.3.2-1.el7.x86_64.rpm/download && \ + rpm -i /tmp/opencl/*.rpm && \ + ldconfig && \ + rm -rf /tmp/opencl && \ +# Installing gcc-10 + yum install -y centos-release-scl && \ + yum install -y devtoolset-10-gcc* && \ + echo 'source scl_source enable devtoolset-10' >> ~/.bashrc && \ +# python installation + source scl_source enable devtoolset-10 && \ + cd /code/ && \ + wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz && tar xvf Python-3.8.3.tgz && \ + cd Python-3.8*/ && ./configure && make && make install && \ + cd ../ && mkdir -p /usr/bin/Python38 && ln -s Python-3.8.3/ /usr/bin/Python38 && \ +# installing dependancies + yum install -y python3-lxml python3-six libusb.x86_64 && \ + yum clean packages && yum clean all && rm -rf /var/cache/yum && \ +# Build onnxruntime + cd $MY_ROOT && \ + pip3 install numpy wheel setuptools cython && \ + git clone --recursive -b ${ONNXRUNTIME_BRANCH} ${ONNXRUNTIME_REPO} && \ + pip3 install onnx && \ + cd /code/onnxruntime && ./build.sh --config Release --update --build --parallel --use_openvino ${DEVICE} --build_shared_lib --build_wheel && \ + pip3 install /code/onnxruntime/build/Linux/Release/dist/*-linux_x86_64.whl && \ +# Clean up + cd $MY_ROOT && rm -rf onnxruntime Python-3* && \ + cd ${MY_ROOT}/ && rm -rf cmake* && \ + cd /usr/share/ && rm -rf gcc* && cd /usr/lib/ && rm -rf gcc cd && rm -rf .cache && \ + cd ${INTEL_OPENVINO_DIR}/ && rm -rf documentation data_processing && cd deployment_tools/ && rm -rf tools \ No newline at end of file diff --git a/dockerfiles/Dockerfile.openvino-csharp b/dockerfiles/Dockerfile.openvino-csharp index c7c7260b8f..a6d1c71040 100644 --- a/dockerfiles/Dockerfile.openvino-csharp +++ b/dockerfiles/Dockerfile.openvino-csharp @@ -15,7 +15,7 @@ ARG MY_ROOT=/code ENV PATH /opt/miniconda/bin:/code/cmake-3.21.0-linux-x86_64/bin:$PATH ENV LD_LIBRARY_PATH=/opt/miniconda/lib:/usr/lib:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH -ENV INTEL_OPENVINO_DIR=/opt/intel/openvino_2021.3.394 +ENV INTEL_OPENVINO_DIR=/opt/intel/openvino_2021.4.582 ENV InferenceEngine_DIR=${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/share ENV IE_PLUGINS_PATH=${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64 ENV LD_LIBRARY_PATH=/opt/intel/opencl:${INTEL_OPENVINO_DIR}/inference_engine/external/gna/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/mkltiny_lnx/lib:$INTEL_OPENVINO_DIR/deployment_tools/ngraph/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/omp/lib:${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/tbb/lib:${IE_PLUGINS_PATH}:${LD_LIBRARY_PATH} @@ -54,7 +54,7 @@ RUN apt update -y && \ cd /etc/apt/sources.list.d && \ echo "deb https://apt.repos.intel.com/openvino/2021 all main">intel-openvino-2021.list && \ apt update -y && \ - apt -y install intel-openvino-dev-ubuntu18-2021.3.394 && \ + apt -y install intel-openvino-dev-ubuntu18-2021.4.582 && \ cd ${INTEL_OPENVINO_DIR}/install_dependencies && ./install_openvino_dependencies.sh -y && \ cd ${INTEL_OPENVINO_DIR} && rm -rf documentation data_processing && \ cd deployment_tools/ && rm -rf model_optimizer open_model_zoo demo tools && \ @@ -112,4 +112,4 @@ RUN apt update -y && \ apt remove -y git && apt autoremove -y && apt remove -y cmake && \ cd /usr/lib/ && rm -rf python2.7 python3.7 python3.8 && \ cd && rm -rf .cache && \ - cd /usr/share/python-wheels/ && rm -rf *.whl + cd /usr/share/python-wheels/ && rm -rf *.whl \ No newline at end of file diff --git a/dockerfiles/README.md b/dockerfiles/README.md index 89d96ba770..5c614b1da7 100644 --- a/dockerfiles/README.md +++ b/dockerfiles/README.md @@ -24,7 +24,7 @@ Use `docker pull` with any of the images and tags below to pull an image and try |-------------------|---------------------------------------|---------------------------------------|-------------------------| | Source (CPU) | mcr.microsoft.com/azureml/onnxruntime | :v0.4.0, :v0.5.0, v0.5.1, :v1.0.0, :v1.2.0, :v1.3.0, :v1.4.0, :v1.5.2 | :latest | | CUDA (GPU) | mcr.microsoft.com/azureml/onnxruntime | :v0.4.0-cuda10.0-cudnn7, :v0.5.0-cuda10.1-cudnn7, :v0.5.1-cuda10.1-cudnn7, :v1.0.0-cuda10.1-cudnn7, :v1.2.0-cuda10.1-cudnn7, :v1.3.0-cuda10.1-cudnn7, :v1.4.0-cuda10.1-cudnn7, :v1.5.2-cuda10.2-cudnn8 | :latest-cuda | -| OpenVino | mcr.microsoft.com/azureml/onnxruntime | :v1.6.0-openvino-2021.1.110, :v1.7.0-openvino-2021.2.200 | :latest-openvino | +| OpenVino | hub.docker.com/repository/docker/openvino/onnxruntime_ep_ubuntu18 | :2021.3, :2021.4 | :latest | | OpenVino (VAD-M) | mcr.microsoft.com/azureml/onnxruntime | :v0.5.0-openvino-r1.1-vadm, :v1.0.0-openvino-r1.1-vadm, :v1.4.0-openvino-2020.3.194-vadm, :v1.5.2-openvino-2020.4.287-vadm | :latest-openvino-vadm | | OpenVino (MYRIAD) | mcr.microsoft.com/azureml/onnxruntime | :v0.5.0-openvino-r1.1-myriad, :v1.0.0-openvino-r1.1-myriad, :v1.3.0-openvino-2020.2.120-myriad, :v1.4.0-openvino-2020.3.194-myriad, :v1.5.2-openvino-2020.4.287-myriad | :latest-openvino-myriad | | OpenVino (CPU) | mcr.microsoft.com/azureml/onnxruntime | :v1.0.0-openvino-r1.1-cpu, :v1.3.0-openvino-2020.2.120-cpu, :v1.4.0-openvino-2020.3.194-cpu, :v1.5.2-openvino-2020.4.287-cpu | :latest-openvino-cpu | @@ -87,12 +87,10 @@ Use `docker pull` with any of the images and tags below to pull an image and try **Ubuntu 18.04, Python & C# Bindings** -### **1. Using MCR container images** +### **1. Using pre-built container images for Python API** -*Note: ONNX Runtime 1.7 will be the last release that will publish MCR container images. Please switch to using PyPi packages or bulding from Dockefile section below from ONNX Runtime 1.8 onwards.* - -The unified MCR container image can be used to run an application on any of the target accelerators. In order to select the target accelerator, the application should explicitly specifiy the choice using the *device_type* configuration option for OpenVINO Execution provider. Refer to [OpenVINO EP runtime configuration documentation](https://github.com/microsoft/onnxruntime/blob/master/docs/execution_providers/OpenVINO-ExecutionProvider.md#runtime-configuration-options) for details on specifying this option in the application code. -If the *device_type* runtime config option is not explicitly specified, CPU will be chosen as the hardware target execution. +The unified container image from [Dockerhub](https://hub.docker.com/repository/docker/openvino/onnxruntime_ep_ubuntu18) can be used to run an application on any of the target accelerators. In order to select the target accelerator, the application should explicitly specifiy the choice using the `device_type` configuration option for OpenVINO Execution provider. Refer to [OpenVINO EP runtime configuration documentation](https://www.onnxruntime.ai/docs/reference/execution-providers/OpenVINO-ExecutionProvider.html#summary-of-options) for details on specifying this option in the application code. +If the `device_type` runtime config option is not explicitly specified, CPU will be chosen as the hardware target execution. ### **2. Building from Dockerfile** 1. Build the onnxruntime image for one of the accelerators supported below. @@ -121,7 +119,7 @@ If the *device_type* runtime config option is not explicitly specified, CPU will HETERO:,.. MULTI:,.. - The can be any of these devices from this list ['CPU','GPU','MYRIAD','FPGA','HDDL'] + The can be any of these devices from this list ['CPU','GPU','MYRIAD','HDDL'] A minimum of two DEVICE_TYPE'S should be specified for a valid HETERO or Multi-Device Build. @@ -169,7 +167,7 @@ If the *device_type* runtime config option is not explicitly specified, CPU will ### OpenVINO on VAD-M Accelerator Version -1. Download OpenVINO **Full package** for version **2021.3** for Linux on host machine from [this link](https://software.intel.com/en-us/openvino-toolkit/choose-download) and install it with the help of instructions from [this link](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html) +1. Download OpenVINO **Full package** for version **2021.4** for Linux on host machine from [this link](https://software.intel.com/en-us/openvino-toolkit/choose-download) and install it with the help of instructions from [this link](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html) 2. Install the drivers on the host machine according to the reference in [here](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux_ivad_vpu.html) @@ -177,7 +175,7 @@ If the *device_type* runtime config option is not explicitly specified, CPU will ``` docker build --rm -t onnxruntime-vadm --build-arg DEVICE=VAD-M_FP16 -f . ``` -4. Run hddldaemon on the host in a separate terminal session using the following steps:  +4. Run hddldaemon on the host in a separate terminal session using the following steps: - Initialize the OpenVINO environment. ``` source /bin/setupvars.sh @@ -190,8 +188,7 @@ If the *device_type* runtime config option is not explicitly specified, CPU will - Note that if OpenVINO was installed with root permissions, this file has to be changed with the same permissions. 5. Run the docker image by mounting the device drivers ``` - docker run -it --rm --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb --mount type=bind,source=/var/tmp,destination=/var/tmp --device /dev/ion:/dev/ion onnxruntime-vadm:latest - + docker run -itu root:root --rm --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb --mount type=bind,source=/var/tmp,destination=/var/tmp --device /dev/ion:/dev/ion onnxruntime-vadm:latest ``` ### OpenVINO on HETERO or Multi-Device Build