Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: 1.17.3 release #50

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .github/actions/download-onnxruntime-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ RAW_LIST=$(curl -s -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/microsoft/onnxruntime/releases/latest \
| grep browser_download_url \
| grep tgz \
| grep linux \
| grep x64 \
| grep -v training \
| grep -v gpu \
| grep -v cuda \
| grep -E "onnxruntime-linux-x64-([.0-9]+)tgz" \
| awk '{print $2}' \
| tr -d '"')

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ONNX Runtime Server

[![ONNX Runtime](https://img.shields.io/github/v/release/microsoft/onnxruntime?filter=v1.17.1&label=ONNX%20Runtime)](https://github.com/microsoft/onnxruntime)
[![ONNX Runtime](https://img.shields.io/github/v/release/microsoft/onnxruntime?filter=v1.17.3&label=ONNX%20Runtime)](https://github.com/microsoft/onnxruntime)
[![CMake on Linux](https://github.com/kibae/onnxruntime-server/actions/workflows/cmake-linux.yml/badge.svg)](https://github.com/kibae/onnxruntime-server/actions/workflows/cmake-linux.yml)
[![CMake on MacOS](https://github.com/kibae/onnxruntime-server/actions/workflows/cmake-macos.yml/badge.svg)](https://github.com/kibae/onnxruntime-server/actions/workflows/cmake-macos.yml)
[![License](https://img.shields.io/github/license/kibae/onnxruntime-server)](https://github.com/kibae/onnxruntime-server/blob/main/LICENSE)
Expand Down Expand Up @@ -148,15 +148,15 @@ sudo cmake --install build --prefix /usr/local/onnxruntime-server
# Docker

- Docker hub: [kibaes/onnxruntime-server](https://hub.docker.com/r/kibaes/onnxruntime-server)
- [`1.17.1-linux-cuda11`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda11.dockerfile)
- [`1.17.3-linux-cuda11`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda11.dockerfile)
amd64
- [`1.17.1-linux-cuda12`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda12.dockerfile)
- [`1.17.3-linux-cuda12`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda12.dockerfile)
amd64
- [`1.17.1-linux-cpu`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cpu.dockerfile)
- [`1.17.3-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.17.1-linux-cuda11 # or kibae/onnxruntime-server:1.17.1-linux-cpu
DOCKER_IMAGE=kibae/onnxruntime-server:1.17.3-linux-cuda11 # or kibae/onnxruntime-server:1.17.3-linux-cpu

docker pull ${DOCKER_IMAGE}

Expand Down
2 changes: 1 addition & 1 deletion deploy/build-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## x64 with CUDA

- [ONNX Runtime Binary](https://github.com/microsoft/onnxruntime/releases) v1.17.1(latest) requires CUDA 11/12, cudnn 8.
- [ONNX Runtime Binary](https://github.com/microsoft/onnxruntime/releases) v1.17.3(latest) requires CUDA 11/12, cudnn 8.
```
$ ldd libonnxruntime_providers_cuda.so
linux-vdso.so.1 (0x00007fffa4bf8000)
Expand Down
2 changes: 1 addition & 1 deletion deploy/build-docker/VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export VERSION=1.17.1
export VERSION=1.17.3
export IMAGE_PREFIX=kibaes/onnxruntime-server
4 changes: 2 additions & 2 deletions deploy/build-docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.17.1-linux-cuda11
image: kibaes/onnxruntime-server:1.17.3-linux-cuda11
ports:
- "8080:80" # for http backend
volumes:
Expand All @@ -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.17.1-linux-cuda11
image: kibaes/onnxruntime-server:1.17.3-linux-cuda11
ports:
- "80:80" # for http backend
- "443:443" # for https backend
Expand Down
8 changes: 4 additions & 4 deletions deploy/build-docker/download-onnxruntime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

cd "$(dirname "$0")" || exit

OS=$1
ARCH=$2

echo
echo "Select onnxruntime version to download:"
RAW_LIST=$(curl -s -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/microsoft/onnxruntime/releases/latest \
| grep browser_download_url \
| grep tgz \
| grep $1 \
| grep $2 \
| grep -v training \
| grep -E "onnxruntime-${OS}-${ARCH}-([.0-9]+)tgz" \
| awk '{print $2}' \
| tr -d '"' \
| head -n 1)
Expand Down
4 changes: 2 additions & 2 deletions deploy/build-docker/linux-cpu.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ WORKDIR /app/source/onnxruntime-server

ARG TARGETPLATFORM
RUN case ${TARGETPLATFORM} in \
"linux/amd64") ./download-onnxruntime.sh linux x64 1.17.1 ;; \
"linux/arm64") ./download-onnxruntime.sh linux aarch64 1.17.1 ;; \
"linux/amd64") ./download-onnxruntime.sh linux x64 ;; \
"linux/arm64") ./download-onnxruntime.sh linux aarch64 ;; \
esac

RUN cmake -DBoost_USE_STATIC_LIBS=ON -DOPENSSL_USE_STATIC_LIBS=ON -B build -S . -DCMAKE_BUILD_TYPE=Release
Expand Down
2 changes: 1 addition & 1 deletion deploy/build-docker/linux-cuda11.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WORKDIR /app/source/onnxruntime-server

ARG TARGETPLATFORM
RUN case ${TARGETPLATFORM} in \
"linux/amd64") ./download-onnxruntime.sh linux x64-gpu 1.17.1 ;; \
"linux/amd64") ./download-onnxruntime.sh linux x64-gpu ;; \
esac

RUN cmake -DCUDA_SDK_ROOT_DIR=/usr/local/cuda -DBoost_USE_STATIC_LIBS=ON -DOPENSSL_USE_STATIC_LIBS=ON -B build -S . -DCMAKE_BUILD_TYPE=Release
Expand Down
2 changes: 1 addition & 1 deletion deploy/build-docker/linux-cuda12.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WORKDIR /app/source/onnxruntime-server

ARG TARGETPLATFORM
RUN case ${TARGETPLATFORM} in \
"linux/amd64") ./download-onnxruntime.sh linux x64-cuda12 1.17.1 ;; \
"linux/amd64") ./download-onnxruntime.sh linux x64-gpu-cuda12 ;; \
esac

RUN cmake -DCUDA_SDK_ROOT_DIR=/usr/local/cuda-12 -DBoost_USE_STATIC_LIBS=ON -DOPENSSL_USE_STATIC_LIBS=ON -B build -S . -DCMAKE_BUILD_TYPE=Release
Expand Down
4 changes: 1 addition & 3 deletions deploy/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ FILES=(
"deploy/build-docker/VERSION"
"deploy/build-docker/docker-compose.yaml"
"deploy/build-docker/README.md"
"deploy/build-docker/linux-cpu.dockerfile"
"deploy/build-docker/linux-cuda11.dockerfile"
"deploy/build-docker/linux-cuda12.dockerfile"
"src/test/test_lib_version.cpp"
)

pwd
Expand Down
12 changes: 6 additions & 6 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

# Supported tags and respective Dockerfile links

- [`1.17.1-linux-cuda11`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda11.dockerfile)
- [`1.17.3-linux-cuda11`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda11.dockerfile)
amd64
- [`1.17.1-linux-cuda12`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda12.dockerfile)
- [`1.17.3-linux-cuda12`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda12.dockerfile)
amd64
- [`1.17.1-linux-cpu`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cpu.dockerfile)
- [`1.17.3-linux-cpu`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cpu.dockerfile)
amd64, arm64

# How to use this image
Expand All @@ -32,7 +32,7 @@
- API documentation will be available at http://localhost/api-docs.

```shell
DOCKER_IMAGE=kibae/onnxruntime-server:1.17.1-linux-cuda11 # or kibae/onnxruntime-server:1.17.1-linux-cpu
DOCKER_IMAGE=kibae/onnxruntime-server:1.17.3-linux-cuda11 # or kibae/onnxruntime-server:1.17.3-linux-cpu

docker pull ${DOCKER_IMAGE}

Expand Down Expand Up @@ -73,7 +73,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.17.1-linux-cuda11
image: kibaes/onnxruntime-server:1.17.3-linux-cuda11
ports:
- "8080:80" # for http backend
volumes:
Expand Down Expand Up @@ -105,7 +105,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.17.1-linux-cuda11
image: kibaes/onnxruntime-server:1.17.3-linux-cuda11
ports:
- "80:80" # for http backend
- "443:443" # for https backend
Expand Down
2 changes: 1 addition & 1 deletion docs/swagger/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.3
info:
title: ONNX Runtime Server
description: |-
version: 1.17.1
version: 1.17.3
externalDocs:
description: ONNX Runtime Server
url: https://github.com/kibae/onnxruntime-server
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set(SOURCE_FILES
task/list_session.cpp
task/get_session.cpp

onnx/version.cpp
onnx/session_key.cpp
onnx/session_key_with_option.cpp
onnx/session.cpp
Expand Down
9 changes: 9 additions & 0 deletions src/onnx/version.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// Created by kibae on 24. 4. 20.
//

#include "../onnxruntime_server.hpp"

std::string onnxruntime_server::onnx::version() {
return Ort::GetVersionString();
}
2 changes: 2 additions & 0 deletions src/onnxruntime_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ namespace onnxruntime_server {
typedef std::function<std::string(const std::string &, const std::string &)> model_bin_getter_t;

namespace onnx {
std::string version();

class value_info {
public:
const std::string name;
Expand Down
4 changes: 4 additions & 0 deletions src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ set(TEST_LIBS
GTest::Main
)

add_executable(lib_version test_lib_version.cpp)
target_link_libraries(lib_version PRIVATE ${TEST_LIBS})
add_test(NAME lib_version COMMAND lib_version)

# __ __ .__ __. __ .___________.
#| | | | | \ | | | | | |
#| | | | | \| | | | `---| |----`
Expand Down
10 changes: 10 additions & 0 deletions src/test/test_lib_version.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//
// Created by kibae on 24. 4. 20.
//

#include "../onnxruntime_server.hpp"
#include "./test_common.hpp"

TEST(test_lib_version, LibVersion) {
EXPECT_EQ(onnxruntime_server::onnx::version(), "1.17.3");
}
Loading