diff --git a/README.md b/README.md index dea2720..ac3a897 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ - [ONNX Runtime](https://onnxruntime.ai/) - [Boost](https://www.boost.org/) -- [CMake](https://cmake.org/) +- [CMake](https://cmake.org/), pkg-config - CUDA(*optional, for Nvidia GPU support*) - OpenSSL(*optional, for HTTPS*) @@ -66,7 +66,7 @@ brew install onnxruntime #### Ubuntu/Debian ```shell -sudo apt install cmake libboost-all-dev libssl-dev +sudo apt install cmake pkg-config libboost-all-dev libssl-dev # optional, for Nvidia GPU support sudo apt install nvidia-cuda-toolkit nvidia-cudnn # optional, for Nvidia GPU support with Docker @@ -147,13 +147,13 @@ sudo cmake --install build --prefix /usr/local/onnxruntime-server # Docker - Docker hub: [kibaes/onnxruntime-server](https://hub.docker.com/r/kibaes/onnxruntime-server) - - [`1.2.1-linux-cuda`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda.dockerfile) + - [`1.16.1-linux-cuda`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda.dockerfile) amd64 - - [`1.2.1-linux-cpu`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cpu.dockerfile) + - [`1.16.1-linux-cpu`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cpu.dockerfile) amd64, arm64 ```shell -DOCKER_IMAGE=kibae/onnxruntime-server:1.2.1-linux-cuda # or kibae/onnxruntime-server:1.2.1-linux-cpu +DOCKER_IMAGE=kibae/onnxruntime-server:1.16.1-linux-cuda # or kibae/onnxruntime-server:1.16.1-linux-cpu docker pull ${DOCKER_IMAGE} diff --git a/deploy/build-docker/README.md b/deploy/build-docker/README.md index 63e2f31..dbccbd9 100644 --- a/deploy/build-docker/README.md +++ b/deploy/build-docker/README.md @@ -2,7 +2,7 @@ ## x64 with CUDA -- [ONNX Runtime Binary](https://github.com/microsoft/onnxruntime/releases) v1.15.1(latest) requires CUDA 11, cudnn 8. +- [ONNX Runtime Binary](https://github.com/microsoft/onnxruntime/releases) v1.16.1(latest) requires CUDA 11, cudnn 8. ``` $ ldd libonnxruntime_providers_cuda.so linux-vdso.so.1 (0x00007fffa4bf8000) diff --git a/deploy/build-docker/VERSION b/deploy/build-docker/VERSION index 9b81b9d..61afe5c 100644 --- a/deploy/build-docker/VERSION +++ b/deploy/build-docker/VERSION @@ -1,2 +1,2 @@ -export VERSION=1.2.1 +export VERSION=1.16.1 export IMAGE_PREFIX=kibaes/onnxruntime-server diff --git a/deploy/build-docker/docker-compose.yaml b/deploy/build-docker/docker-compose.yaml index 2ae2fd7..ea486ba 100644 --- a/deploy/build-docker/docker-compose.yaml +++ b/deploy/build-docker/docker-compose.yaml @@ -5,7 +5,7 @@ services: onnxruntime_server_simple: # After the docker container is up, you can use the REST API (http://localhost:8080). # API documentation will be available at http://localhost:8080/api-docs. - image: kibaes/onnxruntime-server:1.2.1-linux-cuda + image: kibaes/onnxruntime-server:1.16.1-linux-cuda ports: - "8080:80" # for http backend volumes: @@ -29,7 +29,7 @@ services: onnxruntime_server_advanced: # After the docker container is up, you can use the REST API (http://localhost, https://localhost). # API documentation will be available at http://localhost/api-docs. - image: kibaes/onnxruntime-server:1.2.1-linux-cuda + image: kibaes/onnxruntime-server:1.16.1-linux-cuda ports: - "80:80" # for http backend - "443:443" # for https backend diff --git a/deploy/build-docker/docker-image-test.sh b/deploy/build-docker/docker-image-test.sh index 2b44131..e678d9f 100755 --- a/deploy/build-docker/docker-image-test.sh +++ b/deploy/build-docker/docker-image-test.sh @@ -44,6 +44,15 @@ else -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"model": "sample", "version": "2"}' | jq || exit 1 + + ERROR=$(curl -sX 'GET' \ + 'http://localhost:8080/api/sessions/sample/2' \ + -H 'accept: application/json' | jq '.error' || exit 1) + + if [ "${ERROR}" != "null" ]; then + echo ${ERROR} + exit 1 + fi fi curl -sX 'POST' \ diff --git a/deploy/build-docker/linux-cpu.dockerfile b/deploy/build-docker/linux-cpu.dockerfile index 4d23fee..c6c31a0 100644 --- a/deploy/build-docker/linux-cpu.dockerfile +++ b/deploy/build-docker/linux-cpu.dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:latest AS builder -RUN apt update && apt install -y curl wget git build-essential cmake libboost-all-dev libssl-dev +RUN apt update && apt install -y curl wget git build-essential cmake pkg-config libboost-all-dev libssl-dev RUN mkdir -p /app/source WORKDIR /app/source diff --git a/deploy/build-docker/linux-cuda.dockerfile b/deploy/build-docker/linux-cuda.dockerfile index b1c24eb..d913af4 100644 --- a/deploy/build-docker/linux-cuda.dockerfile +++ b/deploy/build-docker/linux-cuda.dockerfile @@ -1,6 +1,6 @@ FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 AS builder -RUN apt update && apt install -y curl wget git build-essential cmake libboost-all-dev libssl-dev +RUN apt update && apt install -y curl wget git build-essential cmake pkg-config libboost-all-dev libssl-dev RUN mkdir -p /app/source WORKDIR /app/source diff --git a/docs/docker.md b/docs/docker.md index e4ff419..d221752 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -5,9 +5,9 @@ # Supported tags and respective Dockerfile links -- [`1.2.1-linux-cuda`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda.dockerfile) +- [`1.16.1-linux-cuda`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda.dockerfile) amd64 -- [`1.2.1-linux-cpu`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cpu.dockerfile) +- [`1.16.1-linux-cpu`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cpu.dockerfile) amd64, arm64 # How to use this image @@ -30,7 +30,7 @@ - API documentation will be available at http://localhost/api-docs. ```shell -DOCKER_IMAGE=kibae/onnxruntime-server:1.2.1-linux-cuda # or kibae/onnxruntime-server:1.2.1-linux-cpu +DOCKER_IMAGE=kibae/onnxruntime-server:1.16.1-linux-cuda # or kibae/onnxruntime-server:1.16.1-linux-cpu docker pull ${DOCKER_IMAGE} @@ -71,7 +71,7 @@ services: onnxruntime_server_simple: # After the docker container is up, you can use the REST API (http://localhost:8080). # API documentation will be available at http://localhost:8080/api-docs. - image: kibaes/onnxruntime-server:1.2.1-linux-cuda + image: kibaes/onnxruntime-server:1.16.1-linux-cuda ports: - "8080:80" # for http backend volumes: @@ -103,7 +103,7 @@ services: onnxruntime_server_advanced: # After the docker container is up, you can use the REST API (http://localhost, https://localhost). # API documentation will be available at http://localhost/api-docs. - image: kibaes/onnxruntime-server:1.2.1-linux-cuda + image: kibaes/onnxruntime-server:1.16.1-linux-cuda ports: - "80:80" # for http backend - "443:443" # for https backend diff --git a/docs/swagger/openapi.yaml b/docs/swagger/openapi.yaml index fa2fd39..a2fe7c8 100644 --- a/docs/swagger/openapi.yaml +++ b/docs/swagger/openapi.yaml @@ -2,7 +2,7 @@ openapi: 3.0.3 info: title: ONNX Runtime Server description: |- - version: 1.2.1 + version: 1.16.1 externalDocs: description: ONNX Runtime Server url: https://github.com/kibae/onnxruntime-server