This repository folder contains the Dockerfile to build a docker image with the Intel® Distribution of OpenVINO™ toolkit.
- OpenVINO™ Toolkit - Deep Learning Deployment Toolkit repository
- OpenCV: Open Source Computer Vision Library
- OpenVINO™ Toolkit - Open Model Zoo repository
Go to the folder with the Dockerfile and run:
docker build -t [image:tag] .
/opt/intel/openvino
folder will contain OpenVINO build/opt/intel/repo
will contain OpenVINO™ and OpenCV git repositories inopenvino
andopencv
folders accordingly.
If you want to rebuild the entire image, use the docker --no-cache
option:
docker build --no-cache -t image:tag .
You can use the docker --build-arg
option to override the following variables:
OPENVINO_FORK
- To specify a GitHub fork of the OpenVINO repository to use. By default, it is main OpenVINO repository.OPENVINO_BRANCH
,OPENCV_BRANCH
,OMZ_BRANCH
- To specify branches with source code. By default, they are equal to "master".BUILD_OPENCV_CONTRIB
- If set toyes
, OpenCV will be built with extra modules (default isno
). You can use theOPENCV_CONTRIB_BRANCH
argument to specify a branch in theopencv_contrib
repository.
For example:
This command builds an image with OpenVINO™ 2021.2 release.
docker build -t openvino:2021.2 --build-arg OPENVINO_BRANCH="releases/2021/2" .
You can manually set up CMake parameters to build a custom package from source code using these files:
Note:
By default, these files already contain some parameters for Debug build
Do not override PATH/PREFIX options. This can break a build of package.
The docker image is built using a multi-step build:
- setup_openvino
Clone OpenVINO™ git repository with submodules and install build dependencies.
Open Model Zoo will be included as a submodule of OpenVINO. - build_openvino
Build OpenVINO™ (CPU, iGPU, VPU support) with the parameters specified in openvino_cmake.txt.
It does not include OpenCV. - copy_openvino
Copy OpenVINO™ build to clear Ubuntu:20.04 image. - openvino
Install OpenVINO™ dependencies. Now you can use it. - opencv
Build and setup OpenCV with the parameters specified in opencv_cmake.txt.
OpenCV can be optionally built with extra modules (see theBUILD_OPENCV_CONTRIB
argument description above). - openvino_repo
Copy OpenVINO source code repository, build artifacts, and Open Model Zoo demos from thebuild_openvino
stage.
Note: this stage significantly increases the image size.
Use the docker --target
option to specify a final stage.
docker build --target [stage] -t [image:tag] .
For example:
This command builds an image without OpenCV and OpenVINO source code:
docker build --target openvino -t ie:latest .
You can use our default pipeline to test your image:
python3 docker_openvino.py test -t [image:tag] -dist custom
Note:
Docker CI framework automatically runs the corresponding tests.
By default, the product version is equal to the latest release version. Use-p
to override this.
Please follow the Run built image section in Docker CI getting started guide.
Prebuilt images are available on:
- Docker Hub
- Red Hat* Quay.io
- Red Hat* Ecosystem Catalog (runtime image)
- Red Hat* Ecosystem Catalog (development image)
- Azure* Marketplace
This Dockerfile contains third-party components with different licenses.
If you are distributing the container as a whole, then you are responsible for license compliance for all of the software it contains.
- Install Intel® Distribution of OpenVINO™ toolkit for Linux* from a Docker* Image
- Install Intel® Distribution of OpenVINO™ toolkit for Windows* from Docker* Image
- Official Dockerfile reference
* Other names and brands may be claimed as the property of others.