Skip to content

Commit 31ee5d4

Browse files
K-Jolantiga
authored andcommitted
docs - moving docker to be first to tryout (#97)
* moving docker to be first to tryout * adding client libs
1 parent 3a3ece3 commit 31ee5d4

File tree

2 files changed

+74
-48
lines changed

2 files changed

+74
-48
lines changed

README.md

Lines changed: 44 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,41 @@ Expect changes in the API and internals.
1010
## Cloning
1111
If you want to run examples, make sure you have [git-lfs](https://git-lfs.github.com) installed when you clone.
1212

13+
## Quickstart
14+
15+
1. [Docker](#docker)
16+
2. [Build](#building)
17+
18+
## Docker
19+
20+
To quickly tryout RedisAI, launch an instance using docker:
21+
22+
```sh
23+
docker run -p 6379:6379 -it --rm redisai/redisai
24+
```
25+
26+
### Give it a try
27+
28+
On the client, load the model
29+
```sh
30+
redis-cli -x AI.MODELSET foo TF CPU INPUTS a b OUTPUTS c < examples/models/graph.pb
31+
```
32+
33+
Then create the input tensors, run the computation graph and get the output tensor (see `load_model.sh`). Note the signatures:
34+
* `AI.TENSORSET tensor_key data_type dim1..dimN [BLOB data | VALUES val1..valN]`
35+
* `AI.MODELRUN graph_key INPUTS input_key1 ... OUTPUTS output_key1 ...`
36+
```sh
37+
redis-cli
38+
> AI.TENSORSET bar FLOAT 2 VALUES 2 3
39+
> AI.TENSORSET baz FLOAT 2 VALUES 2 3
40+
> AI.MODELRUN foo INPUTS bar baz OUTPUTS jez
41+
> AI.TENSORGET jez VALUES
42+
1) FLOAT
43+
2) 1) (integer) 2
44+
3) 1) "4"
45+
2) "9"
46+
```
47+
1348
## Building
1449
This will checkout and build and download the libraries for the backends
1550
(TensorFlow and PyTorch) for your platform.
@@ -30,15 +65,7 @@ make
3065
cd ..
3166
```
3267

33-
## Docker
34-
35-
To quickly tryout RedisAI, launch an instance using docker:
36-
37-
```sh
38-
docker run -p 6379:6379 -it --rm redisai/redisai
39-
```
40-
41-
## Running the server
68+
### Running the server
4269

4370
You will need a redis-server version 4.0.9 or greater. This should be
4471
available in most recent distributions:
@@ -54,25 +81,15 @@ To start redis with the RedisAI module loaded:
5481
redis-server --loadmodule build/redisai.so
5582
```
5683

57-
On the client, load the model
58-
```
59-
redis-cli -x AI.MODELSET foo TF CPU INPUTS a b OUTPUTS c < graph.pb
60-
```
84+
## Client libraries
85+
86+
Some languages have client libraries that provide support for RedisAI's commands:
87+
88+
| Project | Language | License | Author | URL |
89+
| ------- | -------- | ------- | ------ | --- |
90+
| JRedisAI | Java | BSD-3 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/JRedisAI) |
91+
| redisai-py | Python | BSD-2 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/redisai-py) |
6192

62-
Then create the input tensors, run the computation graph and get the output tensor (see `load_model.sh`). Note the signatures:
63-
* `AI.TENSORSET tensor_key data_type dim1..dimN [BLOB data | VALUES val1..valN]`
64-
* `AI.MODELRUN graph_key INPUTS input_key1 ... OUTPUTS output_key1 ...`
65-
```
66-
redis-cli
67-
> AI.TENSORSET bar FLOAT 2 VALUES 2 3
68-
> AI.TENSORSET baz FLOAT 2 VALUES 2 3
69-
> AI.MODELRUN foo INPUTS bar baz OUTPUTS jez
70-
> AI.TENSORGET jez VALUES
71-
1) FLOAT
72-
2) 1) (integer) 2
73-
3) 1) "4"
74-
2) "9"
75-
```
7693

7794
## Backend Dependancy
7895

docs/index.md

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,37 @@ RedisAI is a Redis module for serving tensors and executing deep learning models
66

77
1. [Docker](#docker)
88
2. [Build](#building)
9-
3. [Start](#start)
109

1110
## Docker
1211

13-
To quickly tryout RedisAI, launch an instance using Docker:
12+
To quickly tryout RedisAI, launch an instance using docker:
1413

1514
```sh
1615
docker run -p 6379:6379 -it --rm redisai/redisai
1716
```
1817

18+
### Give it a try
19+
20+
On the client, load the model
21+
```sh
22+
redis-cli -x AI.MODELSET foo TF CPU INPUTS a b OUTPUTS c < examples/models/graph.pb
23+
```
24+
25+
Then create the input tensors, run the computation graph and get the output tensor (see `load_model.sh`). Note the signatures:
26+
* `AI.TENSORSET tensor_key data_type dim1..dimN [BLOB data | VALUES val1..valN]`
27+
* `AI.MODELRUN graph_key INPUTS input_key1 ... OUTPUTS output_key1 ...`
28+
```sh
29+
redis-cli
30+
> AI.TENSORSET bar FLOAT 2 VALUES 2 3
31+
> AI.TENSORSET baz FLOAT 2 VALUES 2 3
32+
> AI.MODELRUN foo INPUTS bar baz OUTPUTS jez
33+
> AI.TENSORGET jez VALUES
34+
1) FLOAT
35+
2) 1) (integer) 2
36+
3) 1) "4"
37+
2) "9"
38+
```
39+
1940
## Building
2041
This will checkout and build and download the libraries for the backends
2142
(TensorFlow and PyTorch) for your platform.
@@ -51,25 +72,13 @@ To start redis with the RedisAI module loaded, you need to make sure the depende
5172
LD_LIBRARY_PATH=<PATH_TO>/deps/install/lib redis-server --loadmodule build/redisai.so
5273
```
5374

54-
If you want to run examples, make sure you have [git-lfs](https://git-lfs.github.com) installed when you clone.
55-
On the client, load the model
56-
```
57-
./deps/redis/src/redis-cli -x AI.MODELSET foo TF CPU INPUTS a b OUTPUTS c < graph.pb
58-
```
75+
## Client libraries
5976

60-
Then create the input tensors, run the computation graph and get the output tensor (see `load_model.sh`). Note the signatures:
61-
* `AI.TENSORSET tensor_key data_type dim1..dimN [BLOB data | VALUES val1..valN]`
62-
* `AI.MODELRUN graph_key INPUTS input_key1 ... OUTPUTS output_key1 ...`
63-
```
64-
redis-cli
65-
> AI.TENSORSET bar FLOAT 2 VALUES 2 3
66-
> AI.TENSORSET baz FLOAT 2 VALUES 2 3
67-
> AI.MODELRUN foo INPUTS bar baz OUTPUTS jez
68-
> AI.TENSORGET jez VALUES
69-
1) FLOAT
70-
2) 1) (integer) 2
71-
3) 1) "4"
72-
2) "9"
73-
```
77+
Some languages have client libraries that provide support for RedisAI's commands:
78+
79+
| Project | Language | License | Author | URL |
80+
| ------- | -------- | ------- | ------ | --- |
81+
| JRedisAI | Java | BSD-3 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/JRedisAI) |
82+
| redisai-py | Python | BSD-2 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/redisai-py) |
7483

7584
Full documentation of the api can be found [here](commands.md).

0 commit comments

Comments
 (0)