onnxruntime/dockerfiles
stevenlix 544e53e24e Update TensorRT to version 6.0.1.5 (#1966)
* remove onnx-tensorrt submodule

* add new onnx-tensorrt submodule (experiment) for trt6

* update engine build for trt6

* update compile and compute for tensorrt6.0

* Update tensorrt_execution_provider.cc

* Update tensorrt_execution_provider.cc

* Update tensorrt_execution_provider.cc

* Update tensorrt_execution_provider.cc

* switch to onnx-tensorrt master for TensorRT6'

* Update tensorrt_execution_provider.cc

* Handle dynamic batch size and add memcpy in TensorRT EP

* update test cases

* Update tensorrt_execution_provider.cc

* update onnx-tensorrt submodule

* Update Dockerfile.ubuntu_tensorrt

* Update Dockerfile.ubuntu_tensorrt

* Update run_dockerbuild.sh

* Update run_dockerbuild.sh

* Update install_ubuntu.sh

* Update concat_op_test.cc

* Update tensorrt_execution_provider.cc

* Upgrade TensorRT to version 6.0.1.5

* Update onnxruntime_providers.cmake

* Update CMakeLists.txt

* Update reduction_ops_test.cc

* Update install_ubuntu.sh

* Update Dockerfile.ubuntu_tensorrt

* Update Dockerfile.tensorrt

* Update BUILD.md

* Update run_dockerbuild.sh

* Update install_ubuntu.sh

* Update onnxruntime_providers.cmake

* Update install_ubuntu.sh

* Update install_ubuntu.sh

* Update gemm_test.cc

* Update gather_op_test.cc

* Update CMakeLists.txt

* Removed submodule

* update onnx-tensorrt submodule

* Add Ubuntu18.04 build option

* Add Ubuntu18.04 build option

* Add Ubuntu18.04 build option

* Add Ubuntu18.04 build option

* Remove redundency

* Fix issue that it does not add memcopy node correctly if some nodes fall back to CUDA EP.
e.g. after partition, there's TRT_Node -> Cuda_node (with CPU memory expected), we still need to add memcpy node between them.

* update for Trt Windows build

* Update onnxruntime_providers.cmake

* Disable opset11 tests on TensorRT

* Update pad_test.cc

* Update build.py

* update scripts for ubuntu18.04

* Disable warning for Windows build
2019-10-06 10:40:53 -07:00
..
scripts Update the docker file for OpenVINO (#1741) 2019-08-30 22:32:24 -07:00
Dockerfile.arm32v7 Treat attribute warning as non-error on cross compiling ARM (#1261) 2019-06-23 17:59:38 -07:00
Dockerfile.cuda Updates to CUDA and TensorRT dockerfiles for v0.5.0 (#1731) 2019-09-13 14:16:47 -07:00
Dockerfile.ngraph Allow building Docker container based on a different git repo. (#1222) 2019-06-20 09:55:42 -07:00
Dockerfile.nuphar Enable Nuphar docker build, and reinstate Nuphar tests (#1757) 2019-09-05 08:50:48 -07:00
Dockerfile.openvino OpenVINO dockerfile for ORT (#1892) 2019-10-02 14:04:04 -07:00
Dockerfile.server Use exec form of ENTRYPOINT for docker server (#1690) 2019-08-29 10:18:08 -07:00
Dockerfile.source Updates to CUDA and TensorRT dockerfiles for v0.5.0 (#1731) 2019-09-13 14:16:47 -07:00
Dockerfile.tensorrt Update TensorRT to version 6.0.1.5 (#1966) 2019-10-06 10:40:53 -07:00
LICENSE-IMAGE.txt Dockerfiles for TensorRT, CUDA, build from source (#922) 2019-07-09 02:03:55 -07:00
README.md OpenVINO dockerfile for ORT (#1892) 2019-10-02 14:04:04 -07:00

Docker containers for ONNX Runtime

Build Flavors: Dockerfiles

Published Microsoft Container Registry (MCR) Images

Use docker pull with any of the images and tags below to pull an image and try for yourself. Note that the build from source (CPU), CUDA, and TensorRT images include additional dependencies like miniconda for compatibility with AzureML image deployment.

Example: Run docker pull mcr.microsoft.com/azureml/onnxruntime:latest-cuda to pull the latest released docker image with ONNX Runtime GPU, CUDA, and CUDNN support.

Build Flavor Base Image ONNX Runtime Docker Image tags Latest
Source (CPU) mcr.microsoft.com/azureml/onnxruntime :v0.4.0, :v0.5.0 :latest
CUDA (GPU) mcr.microsoft.com/azureml/onnxruntime :v0.4.0-cuda10.0-cudnn7, :v0.5.0-cuda10.1-cudnn7 :latest-cuda
TensorRT (x86) mcr.microsoft.com/azureml/onnxruntime :v0.4.0-tensorrt19.03, :v0.5.0-tensorrt19.06 :latest-tensorrt
OpenVino (VAD-M) mcr.microsoft.com/azureml/onnxruntime :v0.5.0-openvino-r1.1-vadm :latest-openvino-vadm
OpenVino (MYRIAD) mcr.microsoft.com/azureml/onnxruntime :v0.5.0-openvino-r1.1-myriad :latest-openvino-myriad
Server mcr.microsoft.com/onnxruntime/server :v0.4.0, :v0.5.0 :latest

Build from Source

Linux 16.04, CPU, Python Bindings

  1. Build the docker image from the Dockerfile in this repository.
# If you have a Linux machine, preface this command with "sudo"

docker build -t onnxruntime-source -f Dockerfile.source .
  1. Run the Docker image
# If you have a Linux machine, preface this command with "sudo"

docker run -it onnxruntime-source

CUDA

Linux 16.04, CUDA 10.0, CuDNN 7

  1. Build the docker image from the Dockerfile in this repository.
# If you have a Linux machine, preface this command with "sudo"

docker build -t onnxruntime-cuda -f Dockerfile.cuda .
  1. Run the Docker image
# If you have a Linux machine, preface this command with "sudo"

docker run -it onnxruntime-cuda

nGraph (Public Preview)

Linux 16.04, Python Bindings

  1. Build the docker image from the Dockerfile in this repository.
# If you have a Linux machine, preface this command with "sudo"

docker build -t onnxruntime-ngraph -f Dockerfile.ngraph .
  1. Run the Docker image
# If you have a Linux machine, preface this command with "sudo"

docker run -it onnxruntime-ngraph

TensorRT

Linux 16.04, TensorRT 5.0.2

  1. Build the docker image from the Dockerfile in this repository.
# If you have a Linux machine, preface this command with "sudo"

docker build -t onnxruntime-trt -f Dockerfile.tensorrt .
  1. Run the Docker image
# If you have a Linux machine, preface this command with "sudo"

docker run -it onnxruntime-trt

OpenVINO (Public Preview)

Linux 16.04, Python Bindings

  1. Build the onnxruntime image for one of the accelerators supported below.

    Retrieve your docker image in one of the following ways.

    • To build your docker image, download the OpenVINO online installer version 2019 R1.1 for Linux from this link and copy the OpenVINO tar file to the same directory before building the Docker image. The online installer size is 16MB and the components needed for the accelerators are mentioned in the dockerfile. 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 master.
      docker build -t onnxruntime --build-arg DEVICE=$DEVICE .
      
    • 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
    CPU_FP32 | Intel CPUs |
    GPU_FP32 | ntel Integrated Graphics |
    GPU_FP16 | Intel Integrated Graphics |
    MYRIAD_FP16 | Intel MovidiusTM USB sticks |
    VAD-M_FP16 | Intel Vision Accelerator Design based on MovidiusTM MyriadX VPUs |

CPU

  1. Retrieve your docker image in one of the following ways.

    • Build the docker image from the DockerFile in this repository.

      docker build -t onnxruntime-cpu --build-arg DEVICE=CPU_FP32 --network host .
      
    • Pull the official image from DockerHub.

      # Will be available with next release
      
  2. Run the docker image

     docker run -it onnxruntime-cpu
    

GPU

  1. Retrieve your docker image in one of the following ways.

    • Build the docker image from the DockerFile in this repository.
       docker build -t onnxruntime-gpu --build-arg DEVICE=GPU_FP32 --network host .
      
    • Pull the official image from DockerHub.
        # Will be available with next release
      
  2. Run the docker image

    docker run -it --device /dev/dri:/dev/dri onnxruntime-gpu:latest
    

Myriad VPU Accelerator

  1. Retrieve your docker image in one of the following ways.
    • Build the docker image from the DockerFile in this repository.
       docker build -t onnxruntime-myriad --build-arg DEVICE=MYRIAD_FP16 --network host .
      
    • Pull the official image from DockerHub.
       # Will be available with next release
      
  2. Install the Myriad rules drivers on the host machine according to the reference in here
  3. Run the docker image by mounting the device drivers
    docker run -it --network host --privileged -v /dev:/dev  onnxruntime-myriad:latest
    
    

=======

VAD-M Accelerator Version

  1. Retrieve your docker image in one of the following ways.
    • Build the docker image from the DockerFile in this repository.
       docker build -t onnxruntime-vadr --build-arg DEVICE=VAD-M_FP16 --network host .
      
    • Pull the official image from DockerHub.
       # Will be available with next release
      
  2. Install the HDDL drivers on the host machine according to the reference in here
  3. Run the docker image by mounting the device drivers
    docker run -it --device --mount type=bind,source=/var/tmp,destination=/var/tmp --device /dev/ion:/dev/ion  onnxruntime-hddl:latest
    
    

ONNX Runtime Server (Public Preview)

Linux 16.04

  1. Build the docker image from the Dockerfile in this repository
docker build -t {docker_image_name} -f Dockerfile.server .
  1. Run the ONNXRuntime server with the image created in step 1
docker run -v {localModelAbsoluteFolder}:{dockerModelAbsoluteFolder} -p {your_local_port}:8001 {imageName} --model_path {dockerModelAbsolutePath}
  1. Send HTTP requests to the container running ONNX Runtime Server

Send HTTP requests to the docker container through the binding local port. Here is the full usage document.

curl  -X POST -d "@request.json" -H "Content-Type: application/json" http://0.0.0.0:{your_local_port}/v1/models/mymodel/versions/3:predict  

Nuphar (Public Preview)

Linux 16.04, Python Bindings

  1. Build the docker image from the Dockerfile in this repository.
# If you have a Linux machine, preface this command with "sudo"

docker build -t onnxruntime-nuphar -f Dockerfile.nuphar .
  1. Run the Docker image
# If you have a Linux machine, preface this command with "sudo"

docker run -it onnxruntime-nuphar