onnxruntime/dockerfiles
Faith Xu d9cdf4b4ed
Doc updates (#1522)
* Updates

* Remove preview texts

* Update README.md

* Updates

* Update README.md

* Update README.md

* Minor wording update

* Update README.md

* Update doc on CUDA version

* revert update

* Update readme for issue #1558

* Clean up example section

* Cosmetic updates

- Add a index of build instructions for browsability
- Update build CUDA version from 9.1 to 10

* Fix broken link

* Update README to reflect upgrade to pip requirement

* Update CuDNN version for Linux Python packages

* Clean up content

Updated ordering and add table of contents

* Minor format fixes

* Move Android NNAPI under EP section

* Add link to operator support documentation

* Fix typo

* typo fix

* remove todo section
2019-08-27 21:31:19 -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 Added license files in the base image (#1595) 2019-08-09 13:02:06 -07:00
Dockerfile.ngraph Allow building Docker container based on a different git repo. (#1222) 2019-06-20 09:55:42 -07:00
Dockerfile.openvino Added license files in the base image (#1595) 2019-08-09 13:02:06 -07:00
Dockerfile.server Add GRPC support to ONNX Runtime Server (#1144) 2019-07-18 11:10:38 -07:00
Dockerfile.source Dockerfiles for TensorRT, CUDA, build from source (#922) 2019-07-09 02:03:55 -07:00
Dockerfile.tensorrt Added license files in the base image (#1595) 2019-08-09 13:02:06 -07:00
install_common_deps.sh Dockerfiles for TensorRT, CUDA, build from source (#922) 2019-07-09 02:03:55 -07:00
LICENSE-IMAGE.txt Dockerfiles for TensorRT, CUDA, build from source (#922) 2019-07-09 02:03:55 -07:00
README.md Doc updates (#1522) 2019-08-27 21:31:19 -07:00

Docker containers for ONNX Runtime

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 all the accelerators supported as below

    Retrieve your docker image in one of the following ways.

    • For building the docker image, download OpenVINO online installer version 2019 R1.1 from here and copy the openvino tar file in the same directory and build the image. The online installer size is only 16MB and the components needed for the accelerators are mentioned in the dockerfile. Providing the argument device enables onnxruntime for that particular device. You can also provide arguments ONNXRUNTIME_REPO and ONNXRUNTIME_BRANCH to test that particular repo and branch. Default values are http://github.com/microsoft/onnxruntime and repo 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} -e MODEL_ABSOLUTE_PATH={dockerModelAbsolutePath} -p {your_local_port}:8001 {imageName}
  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