onnxruntime/dockerfiles/README.md

306 lines
13 KiB
Markdown
Raw Normal View History

# Dockerfiles
**Execution Providers**
- CPU: [Dockerfile](Dockerfile.source), [Instructions](#cpu)
- CUDA/cuDNN: [Dockerfile](Dockerfile.cuda), [Instructions](#cuda)
Migraphx improvements (#4328) * Add amd migraphx execution provider to onnx runtime * rename MiGraphX to MIGraphX * add migraphx EP to tests * support multiple program output * disable more tests * backup changes related to program multiple outputs * remove logging code * remove unnecessary changes in migraphx_execution_provider.cc * add migraphx EP to tests * add input requests of the batchnorm operator * add to support an onnx operator PRelu * update migrapx dockerfile and removed one unused line * chagnes related to support dynamic input shape * fix build error * code backup * code backup * version that has 106 models run correctly * code backup * code backup * remove unnecessary print info * code backup * code backup * code backup * code backup * code backup * code backup * changes corresponding to migraphx change * fix merge conflict * minor code cleanup * code cleanup * remove unnecessary code * remove unnecessary code * add to support more constant folding analysis * more constant folding checking for shape input * add env var to control whether fp16 is enabled. Modify docker file to use ROCM3.3 * fix function name to avoid build error * add build and execution instruction for migraphx execution provider * added more build instructions * fixed a small format error * a minor change * fix review comments * another minor change * additional refinement of the documents * additional changes * remove unnecessary changes in the dockfile * additional changes for the dockerfile * code change backup * fix errors related to a few unit tests * fix a build error related to api change * fix unit test errors by either disabling the test or fix related isssues * remove unnecessary log info * sync submodule tvm with master * remove unnecessary changes * remove an unnecessary code line * refine documents for addition example
2020-06-26 02:22:57 +00:00
- MIGraphX: [Dockerfile](Dockerfile.migraphx), [Instructions](#migraphx)
- ROCm: [Dockerfile](Dockerfile.rocm), [Instructions](#rocm)
- OpenVINO: [Dockerfile](Dockerfile.openvino), [Instructions](#openvino)
- TensorRT: [Dockerfile](Dockerfile.tensorrt), [Instructions](#tensorrt)
- VitisAI: [Dockerfile](Dockerfile.vitisai)
- NVIDIA Jetson TX1/TX2/Nano/Xavier: [Dockerfile](Dockerfile.jetson), [Instructions](#nvidia-jetson-tx1tx2nanoxavier)
**Other**
- ORT Training (torch-ort): [Dockerfiles](https://github.com/pytorch/ort/tree/main/docker)
- ONNX-Ecosystem (CPU + Converters): [Dockerfile](https://github.com/onnx/onnx-docker/blob/master/onnx-ecosystem/Dockerfile), [Instructions](https://github.com/onnx/onnx-docker/tree/master/onnx-ecosystem)
# Instructions
## CPU
**Mariner 2.0, CPU, Python Bindings**
1. Build the docker image from the Dockerfile in this repository.
```bash
docker build -t onnxruntime-source -f Dockerfile.source ..
```
2. Run the Docker image
```bash
docker run -it onnxruntime-source
```
The docker file supports both x86_64 and ARM64(aarch64). You may use docker's "--platform" parameter to explicitly specify which CPU architecture you want to build. For example:
```bash
docker build --platform linux/arm64/v8 -f Dockerfile.source
```
However, we cannot build the code for 32-bit ARM in such a way since a 32-bit compiler/linker might not have enough memory to generate the binaries.
## CUDA
**Ubuntu 22.04, CUDA 12.1, CuDNN 8**
1. Build the docker image from the Dockerfile in this repository.
```
docker build -t onnxruntime-cuda -f Dockerfile.cuda ..
```
2. Run the Docker image
```
docker run --gpus all -it onnxruntime-cuda
or
nvidia-docker run -it onnxruntime-cuda
```
## TensorRT
**Ubuntu 20.04, CUDA 11.8, TensorRT 8.5.1**
1. Update submodules
```
git submodule update --init
```
2. Build the docker image from the Dockerfile in this repository.
```
docker build -t onnxruntime-trt -f Dockerfile.tensorrt .
```
3. Run the Docker image
```
docker run --gpus all -it onnxruntime-trt
or
nvidia-docker run -it onnxruntime-trt
Initial commit for OpenVINO Execution Provider (#935) * Initial commit for OpenVINO Execution Provider OpenVINO Execution Provider provides the interface for ONNX Runtime applications to access Intel's hardware accelerators using Intel's OpenVINO Toolkit. * Fixed bug in GetCapability to disable custom ops Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Added OPENVINO ci pipeline Added new pipeline for openvino provider, made changes to support the docker build and onnxruntime build with openvino. Signed-off-by: Luis Daniel Castellanos <luis.daniel.castellanos@intel.com> * Enabled all unit tests for OpenVINO EP Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Fixed syntax issue in run_docker_build.sh file * Added missing default OPENVINO_VERSION Default value for OPENVINO_VERSION env was missing causing the build to fail * Added install Model Optimizer deps step * Fixed python unit tests and some tests from onnx_backend_test_series Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Fixed indentation bug Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled some of the python backend tests for OpenVINO Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled some model tests Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Remove Duplicate checks for openvino in build.py Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Modified GetCapability for FP16 Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled GPU FP32 tests that are not supported Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Convert modelProto to string and use it in compile Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Pass byte-array input args to MO * Serialized ModelProto passed in-memory to MO ModelOptimizer python module receives the serialized ModelProto in-memory. Uses appropriate ONNX function to load the serialized bytes. * Make Py_Finalize compatible with older python versions Also, remove pFunc unassigned variable possibility. * Fallback if input dims of Matmul is greater than 2 Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * fixup: Device #define syntax * Updated the documentation Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Enable dynamic dim value * removed commented out code * Added Dockerfile for openvino EP Updated instructions on dockerfiles/README.md file Signed-off-by: Luis Daniel Castellanos <luis.daniel.castellanos@intel.com> * Disabled fp16_inception_v1 test Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Code formatting with clang-format Uses style from the .clang-format file in root directory. * fixup: docker tag and build error fixes * Heuristics to automatically detect batching Distributes slices from batch into parallel infer-request objects. * Handle disabled tests in GetCapability Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled average pool and max pool if ceil_mode is 1 Also dilations are not supported if they are greater than 1 Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled Unsqueeze int32 test Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * changes to fix output results bug * Disabled a few C++ unit tests for MYRIAD FP16 Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Manually revert '9fe162bb Enable dynamic dim value' Reverts compile time setting of dynamic shape Reverting manually due to significantly huge auto-revert conflicts. * Fixed unused variable warning Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled Mul test for GPU_FP16 due to accuracy issue Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * VPU documentation update * Disabled inception_v1 for MYRIAD and HDDL *Also disabled few C++ accuracy tests for HDDL Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * updates from upstream * use the new CustomOpApis for I/O interfacing * Pass initializers as subgraph meta-def inputs in GetCapability() Requirement due to API changes introduced with PR# 1019. * Remove obsolete functions * Save indexes of graph inputs from fused_node info Both inputs and initializers are passed as data inputs to the infer function. To identify only inputs among them, save thier index info from fused_node in Compile function. * Documentation changes to enable VPU * Fix VPU related changes in documentation * Fix minor changes in documentation * Fix VPU related changes in documentation * Use Node.In/OutputDefs() to track graph inputs and outputs. Don't use graph_viewer's GetInputs() or GetInputsIncludingInitializers(). * Permit "SAME_UPPER" auto_pad attribute from MaxPool * Disabled fp16_tiny_yolov2 in onnx model tests * Updated documentation to include configuration guides for myriad and hddl Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Use 8 Infer requests only for VAD-R * disable debug prints * Clang-format source files * Updated BUILD.md with OpenVINO R5 links Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled same upper python tests Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Update test exclusion syntax * Change path of install_onnx.sh Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disable tiny_yolov2 in broken tests Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Revert "Change path of install_onnx.sh" This reverts commit ba9db165f3be430f2aff1ef413299ed04637196a. This change is only required for Intel internal CI pipeline until the settings are matched with the upstream's CI pipeline. * Added debug statements for debugging CI error Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Add --build_wheel to linux openvino pipeline Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Added -v option to onnx_test_runner for debugging Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Removed path change patch Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Added -c 1 to onnx_test_runner Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Refactor MO python invocation in separate function Cleans up Model Optimizer python invocation check and conversion logic. Invokes MO only once in GetCapability() and passes the IR strings (xml and bin) to the Compiler as meta-def attributes. * Add comments * code cleanup and comments * Code cleanup for GetCapability Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Removed unnecessary files Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Revert "Added -v option to onnx_test_runner for debugging" This reverts commit d1dd70938a94d648df1a1dbbc2e48d0b97e49ec8. * Revert "Added debug statements for debugging CI error" This reverts commit b86d41afed2aa29c3508155d6f9c8d3a7263cc60. * incorporate Status Code changes * ComputeFunc returns Status::OK() on success * Use test names to disable tests for MYRIAD and VAD-R Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Rename local identifiers from CNNNetwork to OpenVINO network CNNNetwork is an OpenVINO's API class that represents more than just convolutional neural networks (CNNs). Renaming helps to avoid confusion that the API's only support CNN type models. * Added error message if building on windows * Removed duplicate option in Cmake * Removed unnecessary parameters in activation_opt_test Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Refactor Map search and access logic for efficiently and cleanliness. * use C++ style casts * Use os.path.join for python directory path operations * use C++ style casts * EP classes should use onnxruntime namespace * Clean up fixes from PR comments * Don't explicitly shutdown Py interpreter * Remove debug print statements Prints will be re-enabled later with a logging mechanism with debug/verbose printing options. * Decrement ref counts for used pyObjects * Restore build instructions for other compilers Content under the "Using other compilers" section has been accidentally deleted by a previous commit. Restoring back that content from the latest upstream repo. * CMake code cleanup Code clean up, commenting and formatting of CMake code. * Don't pass the unused device_info parameter to OpenVINOGraph ctor. * Add support for multiple I/O data types Adds support for the following tensor data types for graph inputs and outputs: 1) float 2) float16 3) int32 4) int16 5) int8 6) uint16 7) uint8 * cleanup setup.py module list definition * Deduce index of input using tracked input index map Ignores initializers in case they are ordered before inputs. * Removed debug statement in MO code Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * PR feedback * Removed per_sample_tolerance for openvino * Removed unnecessary disabled tests Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Removed debug function Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled tiny_yolo_v2 due to accuracy issues Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Changed the disabled reason for broken tests Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled Reshape with no input Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Python formatting with Autopep8 * Minor fix for MYRIAD devices * Added zero dimension check *Removed setting batch size for the network Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Set the threshold to larger value for MNIST Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Removed setting higher threshold in provider_test_utils Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Check for --use_openvino in python wheel setup.py Add openvino modules to the setup script for building the wheel package only for --use_openvino a build option. * Removed nullptr checks for GetNode() Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>
2019-06-18 15:58:53 +00:00
```
## OpenVINO
*Public Preview*
**Ubuntu 20.04, Python & C# Bindings**
**RHEL 8.4, Python Binding**
Initial commit for OpenVINO Execution Provider (#935) * Initial commit for OpenVINO Execution Provider OpenVINO Execution Provider provides the interface for ONNX Runtime applications to access Intel's hardware accelerators using Intel's OpenVINO Toolkit. * Fixed bug in GetCapability to disable custom ops Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Added OPENVINO ci pipeline Added new pipeline for openvino provider, made changes to support the docker build and onnxruntime build with openvino. Signed-off-by: Luis Daniel Castellanos <luis.daniel.castellanos@intel.com> * Enabled all unit tests for OpenVINO EP Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Fixed syntax issue in run_docker_build.sh file * Added missing default OPENVINO_VERSION Default value for OPENVINO_VERSION env was missing causing the build to fail * Added install Model Optimizer deps step * Fixed python unit tests and some tests from onnx_backend_test_series Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Fixed indentation bug Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled some of the python backend tests for OpenVINO Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled some model tests Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Remove Duplicate checks for openvino in build.py Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Modified GetCapability for FP16 Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled GPU FP32 tests that are not supported Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Convert modelProto to string and use it in compile Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Pass byte-array input args to MO * Serialized ModelProto passed in-memory to MO ModelOptimizer python module receives the serialized ModelProto in-memory. Uses appropriate ONNX function to load the serialized bytes. * Make Py_Finalize compatible with older python versions Also, remove pFunc unassigned variable possibility. * Fallback if input dims of Matmul is greater than 2 Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * fixup: Device #define syntax * Updated the documentation Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Enable dynamic dim value * removed commented out code * Added Dockerfile for openvino EP Updated instructions on dockerfiles/README.md file Signed-off-by: Luis Daniel Castellanos <luis.daniel.castellanos@intel.com> * Disabled fp16_inception_v1 test Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Code formatting with clang-format Uses style from the .clang-format file in root directory. * fixup: docker tag and build error fixes * Heuristics to automatically detect batching Distributes slices from batch into parallel infer-request objects. * Handle disabled tests in GetCapability Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled average pool and max pool if ceil_mode is 1 Also dilations are not supported if they are greater than 1 Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled Unsqueeze int32 test Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * changes to fix output results bug * Disabled a few C++ unit tests for MYRIAD FP16 Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Manually revert '9fe162bb Enable dynamic dim value' Reverts compile time setting of dynamic shape Reverting manually due to significantly huge auto-revert conflicts. * Fixed unused variable warning Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled Mul test for GPU_FP16 due to accuracy issue Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * VPU documentation update * Disabled inception_v1 for MYRIAD and HDDL *Also disabled few C++ accuracy tests for HDDL Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * updates from upstream * use the new CustomOpApis for I/O interfacing * Pass initializers as subgraph meta-def inputs in GetCapability() Requirement due to API changes introduced with PR# 1019. * Remove obsolete functions * Save indexes of graph inputs from fused_node info Both inputs and initializers are passed as data inputs to the infer function. To identify only inputs among them, save thier index info from fused_node in Compile function. * Documentation changes to enable VPU * Fix VPU related changes in documentation * Fix minor changes in documentation * Fix VPU related changes in documentation * Use Node.In/OutputDefs() to track graph inputs and outputs. Don't use graph_viewer's GetInputs() or GetInputsIncludingInitializers(). * Permit "SAME_UPPER" auto_pad attribute from MaxPool * Disabled fp16_tiny_yolov2 in onnx model tests * Updated documentation to include configuration guides for myriad and hddl Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Use 8 Infer requests only for VAD-R * disable debug prints * Clang-format source files * Updated BUILD.md with OpenVINO R5 links Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled same upper python tests Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Update test exclusion syntax * Change path of install_onnx.sh Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disable tiny_yolov2 in broken tests Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Revert "Change path of install_onnx.sh" This reverts commit ba9db165f3be430f2aff1ef413299ed04637196a. This change is only required for Intel internal CI pipeline until the settings are matched with the upstream's CI pipeline. * Added debug statements for debugging CI error Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Add --build_wheel to linux openvino pipeline Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Added -v option to onnx_test_runner for debugging Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Removed path change patch Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Added -c 1 to onnx_test_runner Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Refactor MO python invocation in separate function Cleans up Model Optimizer python invocation check and conversion logic. Invokes MO only once in GetCapability() and passes the IR strings (xml and bin) to the Compiler as meta-def attributes. * Add comments * code cleanup and comments * Code cleanup for GetCapability Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Removed unnecessary files Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Revert "Added -v option to onnx_test_runner for debugging" This reverts commit d1dd70938a94d648df1a1dbbc2e48d0b97e49ec8. * Revert "Added debug statements for debugging CI error" This reverts commit b86d41afed2aa29c3508155d6f9c8d3a7263cc60. * incorporate Status Code changes * ComputeFunc returns Status::OK() on success * Use test names to disable tests for MYRIAD and VAD-R Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Rename local identifiers from CNNNetwork to OpenVINO network CNNNetwork is an OpenVINO's API class that represents more than just convolutional neural networks (CNNs). Renaming helps to avoid confusion that the API's only support CNN type models. * Added error message if building on windows * Removed duplicate option in Cmake * Removed unnecessary parameters in activation_opt_test Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Refactor Map search and access logic for efficiently and cleanliness. * use C++ style casts * Use os.path.join for python directory path operations * use C++ style casts * EP classes should use onnxruntime namespace * Clean up fixes from PR comments * Don't explicitly shutdown Py interpreter * Remove debug print statements Prints will be re-enabled later with a logging mechanism with debug/verbose printing options. * Decrement ref counts for used pyObjects * Restore build instructions for other compilers Content under the "Using other compilers" section has been accidentally deleted by a previous commit. Restoring back that content from the latest upstream repo. * CMake code cleanup Code clean up, commenting and formatting of CMake code. * Don't pass the unused device_info parameter to OpenVINOGraph ctor. * Add support for multiple I/O data types Adds support for the following tensor data types for graph inputs and outputs: 1) float 2) float16 3) int32 4) int16 5) int8 6) uint16 7) uint8 * cleanup setup.py module list definition * Deduce index of input using tracked input index map Ignores initializers in case they are ordered before inputs. * Removed debug statement in MO code Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * PR feedback * Removed per_sample_tolerance for openvino * Removed unnecessary disabled tests Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Removed debug function Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled tiny_yolo_v2 due to accuracy issues Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Changed the disabled reason for broken tests Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Disabled Reshape with no input Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Python formatting with Autopep8 * Minor fix for MYRIAD devices * Added zero dimension check *Removed setting batch size for the network Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Set the threshold to larger value for MNIST Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Removed setting higher threshold in provider_test_utils Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com> * Check for --use_openvino in python wheel setup.py Add openvino modules to the setup script for building the wheel package only for --use_openvino a build option. * Removed nullptr checks for GetNode() Signed-off-by: suryasidd <surya.siddharth.pemmaraju@intel.com>
2019-06-18 15:58:53 +00:00
[OpenVINO-EP 2021.4] Add/update Dockerfiles w.r.t OpenVINO 2021.4 Version (#8491) * Implement multi-stage Dockerfile - Reduces image size from 2.3 GB to 1.46 GB. - Uses Ubuntu based OpenVINO image as base image leading to fewer required instructions - Does not include unnecessary build time components in deploy image * Remove wget after usage * Uninstall wget in the same RUN statement Avoids re-distributing wget package in any of the layers * Update License header according to Intel guidelines Updated the license header according to Intel corporate guidelines. * Use Ubuntu18's default Python3 Don't install Miniconda and use the default Python3 provided by the base Ubuntu 18 OS. * OpenVINO EP with CentOS7 Dockefile to build ONNX RT with OpenVINO EP with a CentOS 7 base. * Dockerfile documentation changes Updated documentation to show the latest docker image location and usage details. * updated ov-ep doc link * Temporarily disabling VAD-M due to regression * fix for vad-m daemon config setting * Revert "Temporarily disabling VAD-M due to regression" This reverts commit c503bea38397f332b220321823e0ca1c55f4aab3. VAD-M issue fixed. this is no longer needed * Revert "Revert "Temporarily disabling VAD-M due to regression"" This reverts commit 7ca53feb2ba585c050be81770698f9abae8dbe28. * Revert "fix for vad-m daemon config setting" This reverts commit 9964f8452194655c0b988bd8472da45996deca38. * Ubuntu Dockerfile update w.r.t 2021.4 This dockerfile uses openvino 2021.4 runtime base image from OpenVINO. uses onnxruntime 1.8 release branch to generate the image. Added fix for VADM HDDL Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Added new dependency in deploy stage Added sources for all the dependency packages of unattended-upgrades package which had GPL license into deploy stage. Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated CentOS Dockerfile to the latest 2021.4 -Dockerfile updated -VADM Fix added Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated c# openvino dockerfile w.r.t 2021.4 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated the ubuntu dockefile branch and repo Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated Dockerfile Documentation w.r.t 2021.4 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated GCC version to 10 for centos dockerfile Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> Co-authored-by: S. Manohar Karlapalem <manohar.karlapalem@intel.com>
2021-08-02 22:13:46 +00:00
### **1. Using pre-built container images for Python API**
The unified container image from [Dockerhub](https://hub.docker.com/repository/docker/openvino/onnxruntime_ep_ubuntu20) can be used to run an application on any of the target accelerators. In order to select the target accelerator, the application should explicitly specify the choice using the `device_type` configuration option for OpenVINO Execution provider. Refer to [OpenVINO EP runtime configuration documentation](https://onnxruntime.ai/docs/execution-providers/OpenVINO-ExecutionProvider.html#configuration-options) for details on specifying this option in the application code.
[OpenVINO-EP 2021.4] Add/update Dockerfiles w.r.t OpenVINO 2021.4 Version (#8491) * Implement multi-stage Dockerfile - Reduces image size from 2.3 GB to 1.46 GB. - Uses Ubuntu based OpenVINO image as base image leading to fewer required instructions - Does not include unnecessary build time components in deploy image * Remove wget after usage * Uninstall wget in the same RUN statement Avoids re-distributing wget package in any of the layers * Update License header according to Intel guidelines Updated the license header according to Intel corporate guidelines. * Use Ubuntu18's default Python3 Don't install Miniconda and use the default Python3 provided by the base Ubuntu 18 OS. * OpenVINO EP with CentOS7 Dockefile to build ONNX RT with OpenVINO EP with a CentOS 7 base. * Dockerfile documentation changes Updated documentation to show the latest docker image location and usage details. * updated ov-ep doc link * Temporarily disabling VAD-M due to regression * fix for vad-m daemon config setting * Revert "Temporarily disabling VAD-M due to regression" This reverts commit c503bea38397f332b220321823e0ca1c55f4aab3. VAD-M issue fixed. this is no longer needed * Revert "Revert "Temporarily disabling VAD-M due to regression"" This reverts commit 7ca53feb2ba585c050be81770698f9abae8dbe28. * Revert "fix for vad-m daemon config setting" This reverts commit 9964f8452194655c0b988bd8472da45996deca38. * Ubuntu Dockerfile update w.r.t 2021.4 This dockerfile uses openvino 2021.4 runtime base image from OpenVINO. uses onnxruntime 1.8 release branch to generate the image. Added fix for VADM HDDL Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Added new dependency in deploy stage Added sources for all the dependency packages of unattended-upgrades package which had GPL license into deploy stage. Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated CentOS Dockerfile to the latest 2021.4 -Dockerfile updated -VADM Fix added Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated c# openvino dockerfile w.r.t 2021.4 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated the ubuntu dockefile branch and repo Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated Dockerfile Documentation w.r.t 2021.4 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated GCC version to 10 for centos dockerfile Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> Co-authored-by: S. Manohar Karlapalem <manohar.karlapalem@intel.com>
2021-08-02 22:13:46 +00:00
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.
Retrieve your docker image in one of the following ways.
- Choose Dockerfile.openvino for Python API or Dockerfile.openvino-csharp for C# API as <Dockerfile> for building latest OpenVINO based Docker image for Ubuntu20.04 and Dockerfile.openvino-rhel for Python API for RHEL 8.4. Providing the docker build argument DEVICE enables the onnxruntime build for that particular device. You can also provide arguments ONNXRUNTIME_REPO and ONNXRUNTIME_BRANCH to test that particular repo and branch. Default repository is http://github.com/microsoft/onnxruntime and default branch is main.
```
docker build --rm -t onnxruntime --build-arg DEVICE=$DEVICE -f <Dockerfile> .
```
- Pull the official image from DockerHub.
2. DEVICE: Specifies the hardware target for building OpenVINO Execution Provider. Below are the options for different Intel target devices.
| Device Option | Target Device |
| --------- | -------- |
| <code>CPU_FP32</code> | Intel<sup></sup> CPUs |
| <code>CPU_FP16</code> | Intel<sup></sup> CPUs |
| <code>GPU_FP32</code> |Intel<sup></sup> Integrated Graphics |
| <code>GPU_FP16</code> | Intel<sup></sup> Integrated Graphics |
| <code>MYRIAD_FP16</code> | Intel<sup></sup> Movidius<sup>TM</sup> USB sticks |
| <code>VAD-M_FP16</code> | Intel<sup></sup> Vision Accelerator Design based on Movidius<sup>TM</sup> MyriadX VPUs |
| <code>HETERO:<DEVICE_TYPE_1>,<DEVICE_TYPE_2>,<DEVICE_TYPE_3>...</code> | All Intel<sup>®</sup> silicons mentioned above |
| <code>MULTI:<DEVICE_TYPE_1>,<DEVICE_TYPE_2>,<DEVICE_TYPE_3>...</code> | All Intel<sup>®</sup> silicons mentioned above |
| <code>AUTO:<DEVICE_TYPE_1>,<DEVICE_TYPE_2>,<DEVICE_TYPE_3>...</code> | All Intel<sup>®</sup> silicons mentioned above |
Specifying Hardware Target for HETERO or MULTI or AUTO Build:
HETERO:<DEVICE_TYPE_1>,<DEVICE_TYPE_2>..
MULTI:<DEVICE_TYPE_1>,<DEVICE_TYPE_2>..
AUTO:<DEVICE_TYPE_1>,<DEVICE_TYPE_2>..
[OpenVINO-EP 2021.4] Add/update Dockerfiles w.r.t OpenVINO 2021.4 Version (#8491) * Implement multi-stage Dockerfile - Reduces image size from 2.3 GB to 1.46 GB. - Uses Ubuntu based OpenVINO image as base image leading to fewer required instructions - Does not include unnecessary build time components in deploy image * Remove wget after usage * Uninstall wget in the same RUN statement Avoids re-distributing wget package in any of the layers * Update License header according to Intel guidelines Updated the license header according to Intel corporate guidelines. * Use Ubuntu18's default Python3 Don't install Miniconda and use the default Python3 provided by the base Ubuntu 18 OS. * OpenVINO EP with CentOS7 Dockefile to build ONNX RT with OpenVINO EP with a CentOS 7 base. * Dockerfile documentation changes Updated documentation to show the latest docker image location and usage details. * updated ov-ep doc link * Temporarily disabling VAD-M due to regression * fix for vad-m daemon config setting * Revert "Temporarily disabling VAD-M due to regression" This reverts commit c503bea38397f332b220321823e0ca1c55f4aab3. VAD-M issue fixed. this is no longer needed * Revert "Revert "Temporarily disabling VAD-M due to regression"" This reverts commit 7ca53feb2ba585c050be81770698f9abae8dbe28. * Revert "fix for vad-m daemon config setting" This reverts commit 9964f8452194655c0b988bd8472da45996deca38. * Ubuntu Dockerfile update w.r.t 2021.4 This dockerfile uses openvino 2021.4 runtime base image from OpenVINO. uses onnxruntime 1.8 release branch to generate the image. Added fix for VADM HDDL Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Added new dependency in deploy stage Added sources for all the dependency packages of unattended-upgrades package which had GPL license into deploy stage. Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated CentOS Dockerfile to the latest 2021.4 -Dockerfile updated -VADM Fix added Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated c# openvino dockerfile w.r.t 2021.4 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated the ubuntu dockefile branch and repo Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated Dockerfile Documentation w.r.t 2021.4 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated GCC version to 10 for centos dockerfile Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> Co-authored-by: S. Manohar Karlapalem <manohar.karlapalem@intel.com>
2021-08-02 22:13:46 +00:00
The <DEVICE_TYPE> 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 or AUTO Build.
Example:
HETERO:MYRIAD,CPU HETERO:HDDL,GPU,CPU MULTI:MYRIAD,GPU,CPU AUTO:GPU,CPU
*This is the hardware accelerator target that is enabled by **default** in the container image. After building the container image for one default target, the application may explicitly choose a different target at run time with the same container by using the [Dynamic device selction API](https://github.com/microsoft/onnxruntime/blob/main/docs/execution_providers/OpenVINO-ExecutionProvider.md#dynamic-device-selection).*
### OpenVINO on CPU
1. Build the docker image from the DockerFile in this repository.
```
docker build --rm -t onnxruntime-cpu --build-arg DEVICE=CPU_FP32 -f <Dockerfile> .
```
2. Run the docker image
```
docker run -it --rm --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb onnxruntime-cpu:latest
```
### OpenVINO on GPU
1. Build the docker image from the DockerFile in this repository.
```
docker build --rm -t onnxruntime-gpu --build-arg DEVICE=GPU_FP32 -f <Dockerfile> .
```
2. Run the docker image
```
docker run -it --rm --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb --device /dev/dri:/dev/dri onnxruntime-gpu:latest
```
OpenVINO-EP v4.0 Release PR with OpenVINO 2022.1 (#11025) * Enabling ov-ep for 2022.1 Release ->Added ov-ep 2022.1 flow ->Validated CPU Unit tests with OV Master using onnxruntime_test_all unit tests. Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Fix for output mismatch b/w OpenVINO and ONNX Refer: https://jira.devtools.intel.com/browse/CVS-60310 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Enabling Adobe ops ->Enable Resize op for iGPU ->Enable Add op for iGPU Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Removing irrelevant conditions ->Removing some conditions from GetCapability() which are now not required. (Removed conditions for OV version support less than 2021.2) Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Enable upsample op Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Enable Adobe proxy-e model Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Removing any extra conditions for Opset13 ops * Opset13 changes Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Exception handling for devices * Added comments * Implement GPU Throttling feature *Added GPU Throttling feature for iGPU's. when user enables it as a runtime option, it helps in reducing overall CPU usage of the application *Added changes to exercise this option using onnxruntime_perf_test application. Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Renaming the runtime config option Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Added the user to video and users group * Handling_GPU.0_GPU.1 * Handling special conditions ->Handling corner cases for device_type checks Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Modification to include new api 2.0 changes in the code * Added opset13 changes ->Enabled Few ops ->Added Debug info for case 3b in getcapability() Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Enabling ov-ep for 2022.1 Release ->Added ov-ep 2022.1 flow ->Validated CPU Unit tests with OV Master using onnxruntime_test_all unit tests. Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Fix for output mismatch b/w OpenVINO and ONNX Refer: https://jira.devtools.intel.com/browse/CVS-60310 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Enabling Adobe ops ->Enable Resize op for iGPU ->Enable Add op for iGPU Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Removing irrelevant conditions ->Removing some conditions from GetCapability() which are now not required. (Removed conditions for OV version support less than 2021.2) Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Enable upsample op Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Enable Adobe proxy-e model Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Removing any extra conditions for Opset13 ops * Opset13 changes Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Exception handling for devices * Added comments * Implement GPU Throttling feature *Added GPU Throttling feature for iGPU's. when user enables it as a runtime option, it helps in reducing overall CPU usage of the application *Added changes to exercise this option using onnxruntime_perf_test application. Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Renaming the runtime config option Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Added the user to video and users group * Handling_GPU.0_GPU.1 * Handling special conditions ->Handling corner cases for device_type checks Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Added opset13 changes ->Enabled Few ops ->Added Debug info for case 3b in getcapability() Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Log comments updated * Changes to enable 2.0 api * Enabling ov-ep for 2022.1 Release ->Added ov-ep 2022.1 flow ->Validated CPU Unit tests with OV Master using onnxruntime_test_all unit tests. Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Fix for output mismatch b/w OpenVINO and ONNX Refer: https://jira.devtools.intel.com/browse/CVS-60310 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Enabling Adobe ops ->Enable Resize op for iGPU ->Enable Add op for iGPU Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Removing irrelevant conditions ->Removing some conditions from GetCapability() which are now not required. (Removed conditions for OV version support less than 2021.2) Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Enable upsample op Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Enable Adobe proxy-e model Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Removing any extra conditions for Opset13 ops * Opset13 changes Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Exception handling for devices * Added comments * Implement GPU Throttling feature *Added GPU Throttling feature for iGPU's. when user enables it as a runtime option, it helps in reducing overall CPU usage of the application *Added changes to exercise this option using onnxruntime_perf_test application. Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Renaming the runtime config option Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Added the user to video and users group * Handling_GPU.0_GPU.1 * Handling special conditions ->Handling corner cases for device_type checks Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Added opset13 changes ->Enabled Few ops ->Added Debug info for case 3b in getcapability() Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Fix build issue Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Fixes issues *Fixes compiler warnings c4458 on windows. *Fixes the bug in device_type check logic *Adds print info for enable_opencl_throttling option in onnxruntime_perf_test Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * commit to make openvino_2021.4 compatible * Fixed IO Buffer Optimization * Fix output names issue * Fix 2021.3 branch * Bug Fix for Multiple inputs/outputs - Assigns the right output_name and input_name for the graph when returned by CompiledModel::inputs() OV function. - Also takex care of output mismatch issue b/w openvino output and onnx output Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Add comments for the changes made Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * IO Buffer Changes * Commit for Disabling GPU Throttling for 2021.4 * Updated branch * Fix windows build ->Fixed windows build in debug mode ->Disabled scatternd3_tensor_int64 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Fixed CPP Unit tests for CPU -Fixed shrink, MVN, ReduceL2, Maxpool, upsample, scatter, slice, reshape, unsqueeze. Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Fixed first set of GPU Tests Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Fixed additional failing tests on GPU ->Added conditions to disable certain ops under certain conditions ->Disabled certain tests ->Added some op supports for no_dimension supported Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Added Expand op support for CPU Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Added condition for squeeze op ->Shape can't have empty axes attribute Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Add support for LessOrEqual op function Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * OV Interface wait for replaced by indefinite wait call * use names from ONNX model to access OV tensors This chnage is to use the input/output names retrieved from original onnx model to access OV tensors and to check if there's any input or output names mismatch b/w ONNX naming and OV naming. Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Fixes Myriad unit tests and other issues ->Fixes Myriad CPP unit tests ->Fixes output mismatch issue with models with sub graph partitioning Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Fix segfault issue ->Fixed case 3b condition in get_capability() which was causing the segfault issue Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Fixed build isuse with ov 2021.4 with I/O buffer Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Disables performance counters for I/O Buffer Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Fixed inputs/outputs mismatch for HDDL with 2022.1 Signed-off-by: Mohammad Amir Aqeel <mohammadx.amir.aqeel@intel.com> * Fix to enable GPU FP16 * Enabled mlperf_ssd_mobilenet_300 model fully on CPU Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Added ov version specific dll packaging for nuget * Fixed conditions for few ops Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Dockerfile updates * Updated License Info -Updated the copyrights License Info -modified FP16 transformations with OV 2022.1 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Disabling mlperf_ssd_mobilenet_300 model ->Disabled this model for openvino. The test is failing in Internal_CI pipelines. Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Disabling failing python CPU Tests Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Fixed flake8 python errors Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> Co-authored-by: hdgx <harinix.d.g@intel.com> Co-authored-by: mayavijx <mayax.vijayan@intel.com> Co-authored-by: sfatimar <sahar.fatima@intel.com> Co-authored-by: mohsinmx <mohsinx.mohammad@intel.com> Co-authored-by: Mohammad Amir Aqeel <mohammadx.amir.aqeel@intel.com>
2022-04-06 20:30:33 +00:00
If your host system is Ubuntu 20, use the below command to run. Please find the alternative steps [here](https://github.com/openvinotoolkit/docker_ci/blob/master/configure_gpu_ubuntu20.md).
```
docker run -it --rm --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb --device /dev/dri:/dev/dri --group-add=$(stat -c "%g" /dev/dri/render*) onnxruntime-gpu:latest
```
### OpenVINO on Myriad VPU Accelerator
1. Build the docker image from the DockerFile in this repository.
```
docker build --rm -t onnxruntime-myriad --build-arg DEVICE=MYRIAD_FP16 -f <Dockerfile> .
```
2. Install the Myriad rules drivers on the host machine according to the reference in [here](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html#additional-NCS-steps)
3. 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 onnxruntime-myriad:latest
```
### OpenVINO on VAD-M Accelerator Version
1. Download OpenVINO **Full package** for latest version 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)
3. Build the docker image from the DockerFile in this repository.
```
docker build --rm -t onnxruntime-vadm --build-arg DEVICE=VAD-M_FP16 -f <Dockerfile> .
```
[OpenVINO-EP 2021.4] Add/update Dockerfiles w.r.t OpenVINO 2021.4 Version (#8491) * Implement multi-stage Dockerfile - Reduces image size from 2.3 GB to 1.46 GB. - Uses Ubuntu based OpenVINO image as base image leading to fewer required instructions - Does not include unnecessary build time components in deploy image * Remove wget after usage * Uninstall wget in the same RUN statement Avoids re-distributing wget package in any of the layers * Update License header according to Intel guidelines Updated the license header according to Intel corporate guidelines. * Use Ubuntu18's default Python3 Don't install Miniconda and use the default Python3 provided by the base Ubuntu 18 OS. * OpenVINO EP with CentOS7 Dockefile to build ONNX RT with OpenVINO EP with a CentOS 7 base. * Dockerfile documentation changes Updated documentation to show the latest docker image location and usage details. * updated ov-ep doc link * Temporarily disabling VAD-M due to regression * fix for vad-m daemon config setting * Revert "Temporarily disabling VAD-M due to regression" This reverts commit c503bea38397f332b220321823e0ca1c55f4aab3. VAD-M issue fixed. this is no longer needed * Revert "Revert "Temporarily disabling VAD-M due to regression"" This reverts commit 7ca53feb2ba585c050be81770698f9abae8dbe28. * Revert "fix for vad-m daemon config setting" This reverts commit 9964f8452194655c0b988bd8472da45996deca38. * Ubuntu Dockerfile update w.r.t 2021.4 This dockerfile uses openvino 2021.4 runtime base image from OpenVINO. uses onnxruntime 1.8 release branch to generate the image. Added fix for VADM HDDL Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Added new dependency in deploy stage Added sources for all the dependency packages of unattended-upgrades package which had GPL license into deploy stage. Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated CentOS Dockerfile to the latest 2021.4 -Dockerfile updated -VADM Fix added Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated c# openvino dockerfile w.r.t 2021.4 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated the ubuntu dockefile branch and repo Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated Dockerfile Documentation w.r.t 2021.4 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated GCC version to 10 for centos dockerfile Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> Co-authored-by: S. Manohar Karlapalem <manohar.karlapalem@intel.com>
2021-08-02 22:13:46 +00:00
4. Run hddldaemon on the host in a separate terminal session using the following steps:
- Initialize the OpenVINO environment.
```
source <openvino_install_directory>/setupvars.sh
```
- Edit the hddl_service.config file from $HDDL_INSTALL_DIR/config/hddl_service.config and change the field “bypass_device_number” to 8.
- Restart the hddl daemon for the changes to take effect.
```
$HDDL_INSTALL_DIR/bin/hddldaemon
```
- 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
```
[OpenVINO-EP 2021.4] Add/update Dockerfiles w.r.t OpenVINO 2021.4 Version (#8491) * Implement multi-stage Dockerfile - Reduces image size from 2.3 GB to 1.46 GB. - Uses Ubuntu based OpenVINO image as base image leading to fewer required instructions - Does not include unnecessary build time components in deploy image * Remove wget after usage * Uninstall wget in the same RUN statement Avoids re-distributing wget package in any of the layers * Update License header according to Intel guidelines Updated the license header according to Intel corporate guidelines. * Use Ubuntu18's default Python3 Don't install Miniconda and use the default Python3 provided by the base Ubuntu 18 OS. * OpenVINO EP with CentOS7 Dockefile to build ONNX RT with OpenVINO EP with a CentOS 7 base. * Dockerfile documentation changes Updated documentation to show the latest docker image location and usage details. * updated ov-ep doc link * Temporarily disabling VAD-M due to regression * fix for vad-m daemon config setting * Revert "Temporarily disabling VAD-M due to regression" This reverts commit c503bea38397f332b220321823e0ca1c55f4aab3. VAD-M issue fixed. this is no longer needed * Revert "Revert "Temporarily disabling VAD-M due to regression"" This reverts commit 7ca53feb2ba585c050be81770698f9abae8dbe28. * Revert "fix for vad-m daemon config setting" This reverts commit 9964f8452194655c0b988bd8472da45996deca38. * Ubuntu Dockerfile update w.r.t 2021.4 This dockerfile uses openvino 2021.4 runtime base image from OpenVINO. uses onnxruntime 1.8 release branch to generate the image. Added fix for VADM HDDL Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Added new dependency in deploy stage Added sources for all the dependency packages of unattended-upgrades package which had GPL license into deploy stage. Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated CentOS Dockerfile to the latest 2021.4 -Dockerfile updated -VADM Fix added Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated c# openvino dockerfile w.r.t 2021.4 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated the ubuntu dockefile branch and repo Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated Dockerfile Documentation w.r.t 2021.4 Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> * Updated GCC version to 10 for centos dockerfile Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com> Co-authored-by: S. Manohar Karlapalem <manohar.karlapalem@intel.com>
2021-08-02 22:13:46 +00:00
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
1. Build the docker image from the DockerFile in this repository.
for HETERO:
```
docker build --rm -t onnxruntime-HETERO --build-arg DEVICE=HETERO:<DEVICE_TYPE_1>,<DEVICE_TYPE_2>,<DEVICE_TYPE_3>... -f <Dockerfile> .
```
for MULTI:
```
docker build --rm -t onnxruntime-MULTI --build-arg DEVICE=MULTI:<DEVICE_TYPE_1>,<DEVICE_TYPE_2>,<DEVICE_TYPE_3>... -f <Dockerfile> .
```
for AUTO:
```
docker build --rm -t onnxruntime-AUTO --build-arg DEVICE=AUTO:<DEVICE_TYPE_1>,<DEVICE_TYPE_2>,<DEVICE_TYPE_3>... -f <Dockerfile> .
```
2. Install the required rules, drivers and other packages as required from the steps above for each of the DEVICE_TYPE accordingly that would be added for the HETERO or MULTI or AUTO device build type.
3. Run the docker image as mentioned in the above steps
## ARM 32/64
The build instructions are similar to x86 CPU. But if you want to build them on a x86 machine, you need to install qemu-user-static system package (outside of docker instances) first. Then
1. Update submodules
```
git submodule update --init
```
2. Build the docker image from the Dockerfile in this repository.
```bash
docker build -t onnxruntime-source -f Dockerfile.arm64 ..
```
3. Run the Docker image
```bash
docker run -it onnxruntime-source
```
For ARM32, please use Dockerfile.arm32v7 instead of Dockerfile.arm64.
Added Dockerfile and build instructions for Jetson. Also set CUDA arch set automatically. (#4637) * Revert "Remove docstrigs if __ONNX_NO_DOC_STRINGS" (#4495) This reverts commit bb4d331fa7bf1fe8d68b1527dda56e4739c80800. * Bump version to 1.4.0 (#4496) * Create N-1 threads in intra-op pool, given main thread now active (#4493) Create N-1 threads in a thread pool when configured with intra-op parallelism of N. This ensures we have N active threads, given that the main thread also runs work. To avoid ambiguity on the value returned, rename ThreadPool::NumThreads method to ThreadPool::DegreeOfParallelism, and make corresponding updates in MLAS and operators. * Conditionally compile without std::is_trivially_copyable to satisfy old GCC versions. (#4510) * Adding CUDA arch flags for NVIDIA Jetson Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> * Added Dockerfile for Jetson and instructions to build wheel and image Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> * Removing guess about nvcc location Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> * Restoring pip3 setuptools install order Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> * Updated README with links and notes re NVIDIA Docker runtime Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> * Added mention of nvidia-docker Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> * Addressing code review comments Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> * Addressing code review comments Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> Co-authored-by: Tiago Koji Castro Shibata <ticastro@microsoft.com> Co-authored-by: Dmitri Smirnov <yuslepukhin@users.noreply.github.com> Co-authored-by: Tim Harris <tiharr@microsoft.com> Co-authored-by: edgchen1 <18449977+edgchen1@users.noreply.github.com>
2020-08-01 06:49:23 +00:00
## NVIDIA Jetson TX1/TX2/Nano/Xavier:
These instructions are for [JetPack SDK 4.4](https://developer.nvidia.com/embedded/jetpack).
The Dockerfile.jetson is using [NVIDIA L4T 32.4.3](https://developer.nvidia.com/embedded/linux-tegra) as base image.
Versions different from these may require modifications to these instructions.
Instructions assume you are on Jetson host in the root of onnxruntime git project clone(`https://github.com/microsoft/onnxruntime`)
Two-step installation is required:
2021-03-06 00:29:04 +00:00
1. Build Python 'wheel' for ONNX Runtime on host Jetson system; Pre-built Python wheels are also available at [Nvidia Jetson Zoo](https://elinux.org/Jetson_Zoo#ONNX_Runtime).
Added Dockerfile and build instructions for Jetson. Also set CUDA arch set automatically. (#4637) * Revert "Remove docstrigs if __ONNX_NO_DOC_STRINGS" (#4495) This reverts commit bb4d331fa7bf1fe8d68b1527dda56e4739c80800. * Bump version to 1.4.0 (#4496) * Create N-1 threads in intra-op pool, given main thread now active (#4493) Create N-1 threads in a thread pool when configured with intra-op parallelism of N. This ensures we have N active threads, given that the main thread also runs work. To avoid ambiguity on the value returned, rename ThreadPool::NumThreads method to ThreadPool::DegreeOfParallelism, and make corresponding updates in MLAS and operators. * Conditionally compile without std::is_trivially_copyable to satisfy old GCC versions. (#4510) * Adding CUDA arch flags for NVIDIA Jetson Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> * Added Dockerfile for Jetson and instructions to build wheel and image Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> * Removing guess about nvcc location Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> * Restoring pip3 setuptools install order Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> * Updated README with links and notes re NVIDIA Docker runtime Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> * Added mention of nvidia-docker Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> * Addressing code review comments Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> * Addressing code review comments Signed-off-by: Boris Fomitchev <bfomitchev@nvidia.com> Co-authored-by: Tiago Koji Castro Shibata <ticastro@microsoft.com> Co-authored-by: Dmitri Smirnov <yuslepukhin@users.noreply.github.com> Co-authored-by: Tim Harris <tiharr@microsoft.com> Co-authored-by: edgchen1 <18449977+edgchen1@users.noreply.github.com>
2020-08-01 06:49:23 +00:00
2. Build Docker image using ONNX Runtime wheel from step 1. You can also install the wheel on the host directly.
Here are the build commands for each step:
1.1 Install ONNX Runtime build dependencies on Jetpack 4.4 host:
```
sudo apt install -y --no-install-recommends \
build-essential software-properties-common cmake libopenblas-dev \
libpython3.6-dev python3-pip python3-dev
```
1.2 Build ONNXRuntime Python wheel:
```
./build.sh --update --config Release --build --build_wheel \
--use_cuda --cuda_home /usr/local/cuda --cudnn_home /usr/lib/aarch64-linux-gnu
```
Note: You may add --use_tensorrt and --tensorrt_home options if you wish to use NVIDIA TensorRT (support is experimental), as well as any other options supported by [build.sh script](build.sh).
2. After the Python wheel is successfully built, use 'find' command for Docker to install the wheel inside new image:
```
find . -name '*.whl' -print -exec sudo -H DOCKER_BUILDKIT=1 nvidia-docker build --build-arg WHEEL_FILE={} -f ./dockerfiles/Dockerfile.jetson . \;
```
Note: Resulting Docker image will have ONNX Runtime installed in /usr, and ONNX Runtime wheel copied to /onnxruntime directory.
Nothing else from ONNX Runtime source tree will be copied/installed to the image.
Note: When running the container you built in Docker, please either use 'nvidia-docker' command instead of 'docker', or use Docker command-line options to make sure NVIDIA runtime will be used and appropriate files mounted from host. Otherwise, CUDA libraries won't be found. You can also [set NVIDIA runtime as default in Docker](https://github.com/dusty-nv/jetson-containers#docker-default-runtime).
## MIGraphX
**Ubuntu 20.04, ROCm6.0, MIGraphX**
Migraphx improvements (#4328) * Add amd migraphx execution provider to onnx runtime * rename MiGraphX to MIGraphX * add migraphx EP to tests * support multiple program output * disable more tests * backup changes related to program multiple outputs * remove logging code * remove unnecessary changes in migraphx_execution_provider.cc * add migraphx EP to tests * add input requests of the batchnorm operator * add to support an onnx operator PRelu * update migrapx dockerfile and removed one unused line * chagnes related to support dynamic input shape * fix build error * code backup * code backup * version that has 106 models run correctly * code backup * code backup * remove unnecessary print info * code backup * code backup * code backup * code backup * code backup * code backup * changes corresponding to migraphx change * fix merge conflict * minor code cleanup * code cleanup * remove unnecessary code * remove unnecessary code * add to support more constant folding analysis * more constant folding checking for shape input * add env var to control whether fp16 is enabled. Modify docker file to use ROCM3.3 * fix function name to avoid build error * add build and execution instruction for migraphx execution provider * added more build instructions * fixed a small format error * a minor change * fix review comments * another minor change * additional refinement of the documents * additional changes * remove unnecessary changes in the dockfile * additional changes for the dockerfile * code change backup * fix errors related to a few unit tests * fix a build error related to api change * fix unit test errors by either disabling the test or fix related isssues * remove unnecessary log info * sync submodule tvm with master * remove unnecessary changes * remove an unnecessary code line * refine documents for addition example
2020-06-26 02:22:57 +00:00
1. Build the docker image from the Dockerfile in this repository.
```
docker build -t onnxruntime-migraphx -f Dockerfile.migraphx .
```
2. Run the Docker image
```
docker run -it --device=/dev/kfd --device=/dev/dri --group-add video onnxruntime-migraphx
```
## ROCm
**Ubuntu 20.04, ROCm6.0**
1. Build the docker image from the Dockerfile in this repository.
```
docker build -t onnxruntime-rocm -f Dockerfile.rocm .
```
2. Run the Docker image
```
docker run -it --device=/dev/kfd --device=/dev/dri --group-add video onnxruntime-rocm
```