-
Notifications
You must be signed in to change notification settings - Fork 106
onnxruntime 1.7.2 build and documentation #785
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
Closed
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
33e6ef5
jetson 1.8
chayim b101e59
1.8 in the Makefile
chayim be2a69d
starting single use
chayim ddb2111
splitting a backend
chayim 68fdfc7
onnx 1.8 64-bit linux, 64-bit linux with gpu, and jetson
chayim 1136450
split up onnx to use docker library parts
chayim fffa1ea
pr comments
chayim bbfde5b
pr comments
chayim af40e81
Merge remote-tracking branch 'origin/master' into ck-onnx-1.8
chayim b597ae6
osx pack
chayim d013cf6
mac, x64 new 1.7.2
chayim bb85b48
variants
chayim a5cc3fd
full CI run without publish
chayim 33ded3e
removed jinja since now 1.7.2
chayim 2014340
master merge
chayim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# RedisAI Development Backends | ||
|
||
This document describes how a backend for RedisAI can be built, from this repository. It highlights the supported compilation devices on a per-backend basis, and highlights the tools and commands required. Unless indicated otherwise, a backend is compiled in a docker, which is responsible for the configuration and installation of all tools required for a given backend on a per-platform basis. | ||
|
||
To follow these instructions, this repository must be cloned with all of its submodules (i.e *git clone --recursive https://github.com/RedisLabsModules/redisai*) | ||
|
||
GNU Make is used as a runner for the dockerfile generator. Python is the language used for the generator script, and jinja is the templating library used to create the docker file from the template. | ||
|
||
## Tools | ||
|
||
Buiding the backends requires installation of the following tools: | ||
|
||
1. gnu make | ||
1. python (3.0 or higher) | ||
1. docker | ||
1. jinja2 jinja is used to generate the platform dockerfile from a *dockerfile.tmpl* that can be found in the directory of a given backend listed below. | ||
|
||
On ubuntu bionic these can be installed by running: | ||
|
||
* sudo apt install python3 python3-dev make docker | ||
* pip install --user jinja | ||
|
||
------- | ||
|
||
## Backends | ||
|
||
### onnxruntime | ||
|
||
**Compilation target devices:** | ||
|
||
1. x86\_64 bit linux systems | ||
|
||
1. x86\_64 bit linux systems with a GPU | ||
|
||
**Directory:** opt/build/onnxruntime | ||
|
||
**Build options:** | ||
|
||
1. To build run *make* | ||
|
||
1. To build with GPU support on x86\_64 run *make GPU=1* | ||
|
||
1. Should you want to build multiple targets from a shared directory, run *make DOCKER_SUFFIX=<yoursuffix>* on your target system. For example, if building on an arm and x64 workload, from a shared directory run: | ||
* On x86: make DOCKER\_SUFFIX=x86\_64 | ||
|
||
* On arm: make DOCKER\_SUFFIX=arm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# default is x64 | ||
ARCH=$(shell ${READIES}/bin/platform --arch) | ||
OS=$(shell ${READIES}/bin/platform --os) | ||
REDIS_CMAKE_ARCH=x86_64 | ||
|
||
# jetson | ||
ifeq ($(shell test -e /usr/share/doc/nvidia-l4t-jetson-io && echo -n yes),yes) | ||
ARCH=jetson | ||
REDIS_CMAKE_ARCH=aarch64 | ||
GPU=1 | ||
endif | ||
export REDIS_CMAKE_ARCH | ||
|
||
# override if necessary in top-level make files | ||
DEFAULT_DOCKER_TAG=${DOCKER_ORG}/${PRODUCT}:build | ||
CIDFILE=${PRODUCT}.${ARCH}.cid | ||
|
||
ifeq ($(GPU),1) | ||
REDIS_GPU=1 | ||
VARIANT=gpu | ||
CIDFILE=${PRODUCT}.${ARCH}.gpu.cid # this way we can build from the same tree across platforms | ||
export REDIS_GPU | ||
endif | ||
|
||
ifeq ($(VARIANT),) | ||
BACKEND_NAME=${PRODUCT}-${OS}-${ARCH}-${REDIS_BACKEND_VERSION}.tgz | ||
else | ||
BACKEND_NAME=${PRODUCT}-${OS}-${ARCH}-${VARIANT}-${REDIS_BACKEND_VERSION}.tgz | ||
endif | ||
|
||
S3_URL=redismodules/${PRODUCT} | ||
|
||
build: | ||
@rm -f ${BACKEND_NAME} *.cid | ||
REDIS_ARCH=${ARCH} \ | ||
VERSION=${VERSION} \ | ||
${READIES}/bin/dockerwrapper \ | ||
-d ${CURDIR}/Dockerfile${DOCKER_SUFFIX} \ | ||
-t ${DEFAULT_DOCKER_TAG} \ | ||
-S ../dockerparts \ | ||
-e REDIS \ | ||
-D "${DOCKER_OPTS}" \ | ||
${DOCKER_ARGS} | ||
docker create --cidfile ${CIDFILE} ${DEFAULT_DOCKER_TAG} | ||
docker cp `cat ${CIDFILE}`:/build/${PRODUCT}/${BACKEND_NAME} . | ||
|
||
publish: | ||
@aws s3 cp ${BACKEND_NAME} s3://$(S3_URL)/ --acl public-read | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
RUN apt-get -qq update | ||
RUN DEBIAN_NONINTERACTIVE=1 apt-get install -y curl wget tar git patch \ | ||
build-essential libcurl4-openssl-dev libssl-dev libatlas-base-dev zlib1g-dev \ | ||
python3.6 python3-pip python3-dev python3-numpy | ||
|
||
RUN rm /usr/bin/python3 | ||
RUN ln -s /usr/bin/python3.6 /usr/bin/python3 | ||
RUN python3 -m pip install --upgrade pip setuptools wheel | ||
|
||
ENV LANG=en_US.UTF-8 | ||
RUN apt-get install -y locales && \ | ||
sed -i -e "s/# $LANG.*/$LANG UTF-8/" /etc/locale.gen && \ | ||
dpkg-reconfigure --frontend=noninteractive locales && \ | ||
update-locale LANG=$LANG | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% set cmake_version = "3.19.7" %} | ||
RUN wget -q https://github.com/Kitware/CMake/releases/download/v{{cmake_version}}/cmake-{{cmake_version}}-Linux-{{REDIS_CMAKE_ARCH}}.tar.gz -O /tmp/cmake.tgz | ||
|
||
WORKDIR /tmp | ||
RUN tar -zxpf /tmp/cmake.tgz | ||
RUN mv /tmp/cmake*/bin/* /usr/bin | ||
RUN mv /tmp/cmake-*/share/cmake* /usr/share/ | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Dockerfile | ||
onnxruntime.x64.cid |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.