Skip to content

Commit bd735c8

Browse files
committed
Update README
1 parent 884d27b commit bd735c8

File tree

2 files changed

+122
-18
lines changed

2 files changed

+122
-18
lines changed

README.md

Lines changed: 120 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,126 @@
99
# RedisAI
1010
RedisAI is a Redis module for executing Deep Learning/Machine Learning models and managing their data. Its purpose is being a "workhorse" for model serving, by providing out-of-the-box support for popular DL/ML frameworks and unparalleled performance. **RedisAI both maximizes computation throughput and reduces latency by adhering to the principle of data locality**, as well as simplifies the deployment and serving of graphs by leveraging on Redis' production-proven infrastructure.
1111

12-
## Where Next?
13-
* The [Introduction](https://oss.redis.com/redisai/intro/) is the recommended starting point
14-
* The [Quickstart](https://oss.redis.com/redisai/quickstart/) page provides information about building, installing and running RedisAI
15-
* The [Commands](https://oss.redis.com/redisai/commands/) page is a reference of the RedisAI API
16-
* The [Clients](https://oss.redis.com/redisai/clients/) page lists RedisAI clients by programming language
17-
* The [Configuration](https://oss.redis.com/redisai/configuration/) page explains how to configure RedisAI
18-
* The [Performance](https://oss.redis.com/redisai/performance/) page provides instructions for running benchmarks with RedisAI
19-
* The [Developer](https://oss.redis.com/redisai/developer/) page has more information about the design and implementation of the RedisAI module
20-
21-
## Quick Links
22-
* [Source code repository](https://github.com/RedisAI/RedisAI)
23-
* [Releases](https://github.com/RedisAI/RedisAI/releases)
24-
* [Docker image](https://hub.docker.com/r/redislabs/redisai/)
12+
To read RedisAI docs, visit [redisai.io](https://oss.redis.com/redisai/). To see RedisAI in action, visit the [demos page](https://oss.redis.com/redisai/examples/).
13+
14+
# Quickstart
15+
RedisAI is a Redis module. To run it you'll need a Redis server (v6.0.0 or greater), the module's shared library, and its dependencies.
16+
17+
The following sections describe how to get started with RedisAI.
18+
19+
## Docker
20+
The quickest way to try RedisAI is by launching its official Docker container images.
21+
### On a CPU only machine
22+
```
23+
docker run -p 6379:6379 redislabs/redisai:latest-cpu-x64-bionic
24+
```
25+
26+
### On a GPU machine
27+
For GPU support you will need a machine you'll need a machine that has Nvidia driver (CUDA 11.2) nvidia-container-toolkit and Docker 19.03+ installed. For detailed information, checkout [nvidia-docker documentation](https://github.com/NVIDIA/nvidia-docker)
28+
29+
```
30+
docker run -p 6379:6379 --gpus all -it --rm redislabs/redisai:latest-gpu-x64-bionic
31+
```
32+
33+
34+
## Building
35+
You can compile and build the module from its source code. The [Developer](https://oss.redis.com/redisai/developer/) page has more information about the design and implementation of the RedisAI module and how to contribute.
36+
37+
### Prerequisites
38+
* Packages: git, python3, make, wget, g++/clang, & unzip
39+
* CMake 3.0 or higher needs to be installed.
40+
* CUDA 11.2 or higher needs to be installed if GPU support is required.
41+
* Redis v6.0.0 or greater.
42+
43+
### Get the Source Code
44+
You can obtain the module's source code by cloning the project's repository using git like so:
45+
46+
```sh
47+
git clone --recursive https://github.com/RedisAI/RedisAI
48+
```
49+
50+
Switch to the project's directory with:
51+
52+
```sh
53+
cd RedisAI
54+
```
55+
56+
### Building the Dependencies
57+
Use the following script to download and build the libraries of the various RedisAI backends (TensorFlow, PyTorch, ONNXRuntime) for CPU only:
58+
59+
```sh
60+
bash get_deps.sh
61+
```
62+
63+
Alternatively, you can run the following to fetch the backends with GPU support.
64+
65+
```sh
66+
bash get_deps.sh gpu
67+
```
68+
69+
### Building the Module
70+
Once the dependencies have been built, you can build the RedisAI module with:
71+
72+
```sh
73+
make -C opt clean ALL=1
74+
make -C opt
75+
```
76+
77+
Alternatively, run the following to build RedisAI with GPU support:
78+
79+
```sh
80+
make -C opt clean ALL=1
81+
make -C opt GPU=1
82+
```
83+
84+
### Backend Dependancy
85+
86+
RedisAI currently supports PyTorch (libtorch), Tensorflow (libtensorflow), TensorFlow Lite, and ONNXRuntime as backends. This section shows the version map between RedisAI and supported backends. This extremely important since the serialization mechanism of one version might not match with another. For making sure your model will work with a given RedisAI version, check with the backend documentation about incompatible features between the version of your backend and the version RedisAI is built with.
87+
88+
89+
| RedisAI | PyTorch | TensorFlow | TFLite | ONNXRuntime |
90+
|:--------|:-------:|:----------:|:------:|:-------------:|
91+
| 1.0.3 | 1.5.0 | 1.15.0 | 2.0.0 | 1.2.0 |
92+
| 1.2.5 | 1.9.0 | 2.6.0 | 2.0.0 | 1.9.0 |
93+
| master | 1.9.0 | 2.6.0 | 2.0.0 | 1.9.0 |
94+
95+
Note: Keras and TensorFlow 2.x are supported through graph freezing. See [this script](https://github.com/RedisAI/RedisAI/blob/master/tests/flow/test_data/tf2-minimal.py) to see how to export a frozen graph from Keras and TensorFlow 2.x.
96+
97+
## Loading the Module
98+
To load the module upon starting the Redis server, simply use the `--loadmodule` command line switch, the `loadmodule` configuration directive or the [Redis `MODULE LOAD` command](https://redis.io/commands/module-load) with the path to module's library.
99+
100+
For example, to load the module from the project's path with a server command line switch use the following:
101+
102+
```sh
103+
redis-server --loadmodule ./install-cpu/redisai.so
104+
```
105+
106+
### Give it a try
107+
108+
Once loaded, you can interact with RedisAI using redis-cli. Basic information and examples for using the module is described [here](https://oss.redis.com/redisai/intro/#getting-started).
109+
110+
### Client libraries
111+
Some languages already have client libraries that provide support for RedisAI's commands. The following table lists the known ones:
112+
113+
| Project | Language | License | Author | URL |
114+
| ------- | -------- | ------- | ------ | --- |
115+
| JRedisAI | Java | BSD-3 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/JRedisAI) |
116+
| redisai-py | Python | BSD-3 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/redisai-py) |
117+
| redisai-go | Go | BSD-3 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/redisai-go) |
118+
| redisai-js | Typescript/Javascript | BSD-3 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/redisai-js) |
119+
| redis-modules-sdk | TypeScript | BSD-3-Clause | [Dani Tseitlin](https://github.com/danitseitlin) | [Github](https://github.com/danitseitlin/redis-modules-sdk) |
120+
| redis-modules-java | Java | Apache-2.0 | [dengliming](https://github.com/dengliming) | [Github](https://github.com/dengliming/redis-modules-java) |
121+
| smartredis | C++ | BSD-2-Clause | [Cray Labs](https://github.com/CrayLabs) | [Github](https://github.com/CrayLabs/SmartRedis) |
122+
| smartredis | C | BSD-2-Clause | [Cray Labs](https://github.com/CrayLabs) | [Github](https://github.com/CrayLabs/SmartRedis) |
123+
| smartredis | Fortran | BSD-2-Clause | [Cray Labs](https://github.com/CrayLabs) | [Github](https://github.com/CrayLabs/SmartRedis) |
124+
| smartredis | Python | BSD-2-Clause | [Cray Labs](https://github.com/CrayLabs) | [Github](https://github.com/CrayLabs/SmartRedis) |
125+
126+
127+
128+
The full documentation for RedisAI's API can be found at the [Commands page](commands.md).
129+
130+
## Documentation
131+
Read the docs at [redisai.io](https://oss.redis.com/redisai/).
25132

26133
## Contact Us
27134
If you have questions, want to provide feedback or perhaps report an issue or [contribute some code](contrib.md), here's where we're listening to you:

docs/quickstart.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RedisAI Quickstart
2-
RedisAI is a Redis module. To run it you'll need a Redis server (v5.0.7 or greater), the module's shared library, and its dependencies.
2+
RedisAI is a Redis module. To run it you'll need a Redis server (v6.0.0 or greater), the module's shared library, and its dependencies.
33

44
The following sections describe how to get started with RedisAI.
55

@@ -12,14 +12,11 @@ docker run -p 6379:6379 redislabs/redisai:latest-cpu-x64-bionic
1212
```
1313

1414
### On a GPU machine
15-
15+
For GPU support you will need a machine you'll need a machine that has Nvidia driver (CUDA 11.2) nvidia-container-toolkit and Docker 19.03+ installed. For detailed information, checkout [nvidia-docker documentation](https://github.com/NVIDIA/nvidia-docker)
1616
```
1717
docker run -p 6379:6379 --gpus all -it --rm redislabs/redisai:latest-gpu-x64-bionic
1818
```
1919

20-
## Download
21-
22-
A pre-compiled version can be downloaded from [RedisLabs download center](https://redislabs.com/download-center/modules/).
2320

2421
## Building
2522
You can compile and build the module from its source code. The [Developer](developer.md) page has more information about the design and implementation of the RedisAI module and how to contribute.

0 commit comments

Comments
 (0)