onnxruntime/dockerfiles/README.md

38 lines
1.3 KiB
Markdown
Raw Normal View History

# Quick-start Docker containers for ONNX Runtime
2019-05-01 01:38:09 +00:00
## nGraph Version (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"
2019-05-01 01:38:09 +00:00
docker build -t onnxruntime-ngraph -f Dockerfile.ngraph .
```
2. Run the Docker image
```
# If you have a Linux machine, preface this command with "sudo"
2019-05-01 01:38:09 +00:00
docker run -it onnxruntime-ngraph
```
## ONNX Runtime Server (Preview)
#### Linux 16.04
1. Build the docker image from the Dockerfile in this repository
```
docker build -t {docker_image_name} -f Dockerfile.server .
```
2. 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}
```
3. 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](https://github.com/Microsoft/onnxruntime/blob/master/docs/ONNX_Runtime_Server_Usage.md).
```
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