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.20.0 release #67

Merged
merged 4 commits into from
Nov 2, 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
32 changes: 32 additions & 0 deletions .github/actions/download-onnxruntime-osx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash

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

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 -E "onnxruntime-osx-universal([0-9]?)-([.0-9]+)tgz" \
| awk '{print $2}' \
| tr -d '"')

item=${RAW_LIST[0]}

FILENAME=$(basename "$item")

echo
echo "Downloading $item"
echo

wget -q "$item"

sudo mkdir -p /usr/local/onnxruntime
sudo tar vzxf "$FILENAME" -C /usr/local/onnxruntime --strip-components=2

rm -f "$FILENAME"

echo
echo "Done"
echo
7 changes: 6 additions & 1 deletion .github/workflows/cmake-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ jobs:
shell: bash
run: |
brew update
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake onnxruntime boost openssl googletest
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake boost openssl googletest

- name: Prepare container(onnxruntime)
shell: bash
run: |
./.github/actions/download-onnxruntime-osx.sh

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
Expand Down
8 changes: 4 additions & 4 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.19.2&label=ONNX%20Runtime)](https://github.com/microsoft/onnxruntime)
[![ONNX Runtime](https://img.shields.io/github/v/release/microsoft/onnxruntime?filter=v1.20.0&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 @@ -158,11 +158,11 @@ sudo cmake --install build --prefix /usr/local/onnxruntime-server
# Docker

- Docker hub: [kibaes/onnxruntime-server](https://hub.docker.com/r/kibaes/onnxruntime-server)
- [`1.19.2-linux-cuda12`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda12.dockerfile) amd64(CUDA 12.x, cuDNN 9.x)
- [`1.19.2-linux-cpu`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cpu.dockerfile) amd64, arm64
- [`1.20.0-linux-cuda11`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda11.dockerfile) amd64(CUDA 11.x, cuDNN 8.x)
- [`1.20.0-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.19.2-linux-cuda12 # or kibae/onnxruntime-server:1.19.2-linux-cpu
DOCKER_IMAGE=kibae/onnxruntime-server:1.20.0-linux-cuda11 # or kibae/onnxruntime-server:1.20.0-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.19.2(latest) requires CUDA 11/12, cudnn 8.
- [ONNX Runtime Binary](https://github.com/microsoft/onnxruntime/releases) v1.20.0(latest) requires CUDA 11/12, cudnn 8/9.
```
$ 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.19.2
export VERSION=1.20.0
export IMAGE_PREFIX=kibaes/onnxruntime-server
18 changes: 9 additions & 9 deletions deploy/build-docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ if [ "$1" != "--target=cpu" ]; then
# | | | | | | | | | | / /_\ \ |______> < | '_ \ |__ _|
# | `----.| `--' | | '--' | / _____ \ / . \ | (_) | | |
# \______| \______/ |_______/ /__/ \__\ /__/ \__\ \___/ |_|
# POSTFIX=linux-cuda11
# IMAGE_NAME=${IMAGE_PREFIX}:${VERSION}-${POSTFIX}
#
# docker buildx build --platform linux/amd64 -t ${IMAGE_NAME} -f deploy/build-docker/${POSTFIX}.dockerfile --load . || exit 1
# ./deploy/build-docker/docker-image-test.sh ${IMAGE_NAME} 1 || exit 1
# docker buildx build --platform linux/amd64 -t ${IMAGE_NAME} -f deploy/build-docker/${POSTFIX}.dockerfile --push . || exit 1


POSTFIX=linux-cuda12
POSTFIX=linux-cuda11
IMAGE_NAME=${IMAGE_PREFIX}:${VERSION}-${POSTFIX}

docker buildx build --platform linux/amd64 -t ${IMAGE_NAME} -f deploy/build-docker/${POSTFIX}.dockerfile --load . || exit 1
./deploy/build-docker/docker-image-test.sh ${IMAGE_NAME} 1 || exit 1
docker buildx build --platform linux/amd64 -t ${IMAGE_NAME} -f deploy/build-docker/${POSTFIX}.dockerfile --push . || exit 1


# POSTFIX=linux-cuda12
# IMAGE_NAME=${IMAGE_PREFIX}:${VERSION}-${POSTFIX}
#
# docker buildx build --platform linux/amd64 -t ${IMAGE_NAME} -f deploy/build-docker/${POSTFIX}.dockerfile --load . || exit 1
# ./deploy/build-docker/docker-image-test.sh ${IMAGE_NAME} 1 || exit 1
# docker buildx build --platform linux/amd64 -t ${IMAGE_NAME} -f deploy/build-docker/${POSTFIX}.dockerfile --push . || exit 1
fi

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.19.2-linux-cuda12
image: kibaes/onnxruntime-server:1.20.0-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.19.2-linux-cuda12
image: kibaes/onnxruntime-server:1.20.0-linux-cuda11
ports:
- "80:80" # for http backend
- "443:443" # for https backend
Expand Down
4 changes: 2 additions & 2 deletions deploy/build-docker/linux-cuda12.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN case ${TARGETPLATFORM} in \
"linux/amd64") ./download-onnxruntime.sh linux x64-gpu ;; \
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
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
RUN cmake --build build --parallel 4 --target onnxruntime_server_standalone
RUN cmake --install build --prefix /app/onnxruntime-server

Expand All @@ -28,5 +28,5 @@ WORKDIR /app
RUN mkdir -p models logs certs

ENV ONNX_SERVER_CONFIG_PRIORITY=env
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-12/lib64:/usr/local/onnxruntime/lib
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/onnxruntime/lib
ENTRYPOINT ["/app/bin/onnxruntime_server", "--model-dir", "models", "--log-file", "logs/app.log", "--access-log-file", "logs/access.log", "--tcp-port", "6432", "--http-port", "80"]
10 changes: 5 additions & 5 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

# Supported tags and respective Dockerfile links

- [`1.19.2-linux-cuda12`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda12.dockerfile) amd64(CUDA 12.x, cuDNN 9.x)
- [`1.19.2-linux-cpu`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cpu.dockerfile) amd64, arm64
- [`1.20.0-linux-cuda11`](https://github.com/kibae/onnxruntime-server/blob/main/deploy/build-docker/linux-cuda11.dockerfile) amd64(CUDA 11.x, cuDNN 8.x)
- [`1.20.0-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 @@ -28,7 +28,7 @@
- API documentation will be available at http://localhost/api-docs.

```shell
DOCKER_IMAGE=kibae/onnxruntime-server:1.19.2-linux-cuda12 # or kibae/onnxruntime-server:1.19.2-linux-cpu
DOCKER_IMAGE=kibae/onnxruntime-server:1.20.0-linux-cuda11 # or kibae/onnxruntime-server:1.20.0-linux-cpu

docker pull ${DOCKER_IMAGE}

Expand Down Expand Up @@ -69,7 +69,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.19.2-linux-cuda12
image: kibaes/onnxruntime-server:1.20.0-linux-cuda11
ports:
- "8080:80" # for http backend
volumes:
Expand Down Expand Up @@ -101,7 +101,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.19.2-linux-cuda12
image: kibaes/onnxruntime-server:1.20.0-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.19.2
version: 1.20.0
externalDocs:
description: ONNX Runtime Server
url: https://github.com/kibae/onnxruntime-server
Expand Down
2 changes: 1 addition & 1 deletion src/test/test_lib_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
#include "./test_common.hpp"

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