You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developer-backends.md
+8-11Lines changed: 8 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,17 @@
1
1
# RedisAI Development Backends
2
2
3
-
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.
3
+
This document describes how ONNXRuntime backend can be built from this repository.
4
+
We build the ONNXRuntime library with the DISABLE_EXTERNAL_INITIALIZERS=ON build flag. As a result, loading ONNX models that use external files to store the initial (usually very large) values of the model's operations, is invalid. Hence, initialization values must be part of the serialized model, which is also the standard use case.
5
+
6
+
It is compiled in a docker, which is responsible for the configuration and installation of all tools required the build process.
4
7
5
8
To follow these instructions, this repository must be cloned with all of its submodules (i.e *git clone --recursive https://github.com/redisai/redisai*)
6
9
7
-
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 a template *dockerfile.tmpl* that can be found in the directory of a given backend listed below.
10
+
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 *dockerfile.tmpl*, located in the `/opt/build/onnxruntime` directory.
8
11
9
-
## Tools
12
+
###Tools
10
13
11
-
Building the backends requires installation of the following tools:
14
+
Building the backend requires installation of the following tools:
12
15
13
16
1. gnu make
14
17
1. python (3.0 or higher)
@@ -21,17 +24,11 @@ On ubuntu bionic these can be installed by running the following steps, to insta
21
24
sudo apt install python3 python3-dev make docker
22
25
python3 -m venv /path/to/venv
23
26
source /path/to/venv/bin/activate
24
-
pip install jinja
27
+
pip install jinja2
25
28
```
26
29
27
30
-------
28
31
29
-
## Backends
30
-
31
-
### onnxruntime
32
-
33
-
We build Onnxruntime library with DISABLE_EXTERNAL_INITIALIZERS=ON build flag. This means that loading ONNX models that use external files to store the initial (usually very large) values of the model's operations, is invalid. That is, initializers values must be part of the serialized model, which is also the standard use case.
Copy file name to clipboardExpand all lines: docs/developer.md
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -170,9 +170,16 @@ sudo ./opt/system-setup.py
170
170
171
171
**Building**
172
172
173
-
To compile RedisAI, run *make -C opt all*, from the root of the repository.
173
+
Before compiling RedisAI module, make sure that you have the backends' shared libraries in the `deps` directory. These can be easily obtained by running:
174
+
```./get_deps```
175
+
or
176
+
```./get_deps gpu```
177
+
for having GPU support.
178
+
Except for ONNXRuntime backend which is stored in a S3 bucket, other backends' binary files are downloaded directly from their official websites.
179
+
Further details about building ONNXRuntime backend for RedisAI is described in [this document](developer-backends.md).
180
+
181
+
To compile RedisAI, run `make -C opt` or `make -C opt GPU=1`, from the root of the repository. This will create the module's shared library `redisai.so` in `instali-cpu`/`install-gpu` directory respectively.
174
182
175
-
Build the backends is described in [this document](developer-backends.md).
0 commit comments