Skip to content

Commit 09e445b

Browse files
authored
Merge pull request #760 from RedisAI/v1.2.3
v1.2.3 - RC3
2 parents e650049 + 907e630 commit 09e445b

File tree

124 files changed

+7183
-4266
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+7183
-4266
lines changed

.circleci/config.yml

Lines changed: 159 additions & 139 deletions
Large diffs are not rendered by default.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve RedisAI
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. ...
16+
2. ....
17+
18+
**Expected behavior**
19+
A clear and concise description of what you expected to happen.
20+
21+
**Screenshots**
22+
If applicable, add screenshots to help explain your problem.
23+
24+
**Environment (please complete the following information):**
25+
- OS: [e.g. ubuntu 20.04]
26+
- Version [e.g. 1.2.2]
27+
- Platfrom [e.g. x86, Jetson, ARM]
28+
- Runtime [e.g. CPU, CUDA]
29+
30+
**Additional context**
31+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for pushing RedisAI further
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# https://github.com/marketplace/actions/run-circle-ci-on-label
2+
name: build-and-test-gpu
3+
4+
on:
5+
pull_request:
6+
types:
7+
- labeled
8+
- synchronize
9+
- assigned
10+
11+
jobs:
12+
valgrind_general:
13+
if: github.event.label.name == 'ci-test'
14+
runs-on: ubuntu-latest
15+
name: Run build and test gpu
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: circle-ci job runner
20+
id: curl-circle-ci
21+
uses: Open-Source-Contrib/circle-ci-trigger-action@latest
22+
with:
23+
circle_ci_token: ${{ secrets.CIRCLE_CI_SECRET}}
24+
circle_ci_job: build-and-test-gpu
25+
circle_ci_project_url: ${{ github.event.pull_request.head.ref }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# https://github.com/marketplace/actions/run-circle-ci-on-label
2+
name: valgrind-general-run
3+
4+
on:
5+
pull_request:
6+
types:
7+
- labeled
8+
- synchronize
9+
- assigned
10+
11+
jobs:
12+
valgrind_general:
13+
if: github.event.label.name == 'ci-test'
14+
runs-on: ubuntu-latest
15+
name: Run valgrind general
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: circle-ci job runner
20+
id: curl-circle-ci
21+
uses: Open-Source-Contrib/circle-ci-trigger-action@latest
22+
with:
23+
circle_ci_token: ${{ secrets.CIRCLE_CI_SECRET}}
24+
circle_ci_job: valgrind-general
25+
circle_ci_project_url: ${{ github.event.pull_request.head.ref }}

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ option(BUILD_TF "Build the TensorFlow backend" ON)
5555
option(BUILD_TFLITE "Build the TensorFlow Lite backend" ON)
5656
option(BUILD_ORT "Build the ONNXRuntime backend" ON)
5757
option(BUILD_TORCH "Build the PyTorch backend" ON)
58-
58+
option(BUILD_REDISAI_LITE "Build the RedisAI Lite Varient" OFF)
5959
#----------------------------------------------------------------------------------------------
6060

6161
FUNCTION(ADD_LDFLAGS _TARGET NEW_FLAGS)
@@ -114,6 +114,9 @@ ENDIF()
114114

115115
SET(CMAKE_C_STANDARD 11)
116116
ADD_DEFINITIONS(-DREDISMODULE_EXPERIMENTAL_API)
117+
if(BUILD_REDISAI_LITE)
118+
ADD_DEFINITIONS(-DREDISAI_LITE)
119+
ENDIF()
117120

118121
# SET(CUDA_TOOLKIT_ROOT_DIR /usr/local/cuda-10.0)
119122

Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ARG OS=debian:buster-slim
1212
ARG ARCH=x64
1313

1414
ARG PACK=0
15+
ARG REDISAI_LITE=0
1516
ARG TEST=0
1617

1718
#----------------------------------------------------------------------------------------------
@@ -22,14 +23,17 @@ ARG OSNICK
2223
ARG OS
2324
ARG ARCH
2425
ARG REDIS_VER
26+
ARG REDISAI_LITE
27+
ARG PACK
28+
ARG TEST
2529

2630
RUN echo "Building for ${OSNICK} (${OS}) for ${ARCH} [with Redis ${REDIS_VER}]"
2731

2832
WORKDIR /build
2933
COPY --from=redis /usr/local/ /usr/local/
3034

3135
COPY ./opt/ opt/
32-
COPY ./tests/flow/test_requirements.txt tests/flow/
36+
ADD ./tests/flow/ tests/flow/
3337

3438
RUN FORCE=1 ./opt/readies/bin/getpy3
3539
RUN ./opt/system-setup.py
@@ -40,18 +44,16 @@ RUN if [ "$DEPS_ARGS" = "" ]; then ./get_deps.sh cpu; else env $DEPS_ARGS ./get_
4044

4145
ARG BUILD_ARGS=""
4246
ADD ./ /build
43-
RUN bash -l -c "make -C opt build $BUILD_ARGS SHOW=1"
47+
RUN bash -l -c "make -C opt build REDISAI_LITE=${REDISAI_LITE} $BUILD_ARGS SHOW=1"
4448

45-
ARG PACK
46-
ARG TEST
4749

4850
RUN mkdir -p bin/artifacts
4951
RUN set -e ;\
50-
if [ "$PACK" = "1" ]; then bash -l -c "make -C opt pack"; fi
52+
if [ "$PACK" = "1" ]; then bash -l -c "make -C opt pack REDISAI_LITE=${REDISAI_LITE}"; fi
5153

5254
RUN set -e ;\
5355
if [ "$TEST" = "1" ]; then \
54-
bash -l -c "TEST= make -C opt test $BUILD_ARGS NO_LFS=1" ;\
56+
bash -l -c "TEST= make -C opt test REDISAI_LITE=${REDISAI_LITE} $BUILD_ARGS NO_LFS=1" ;\
5557
if [[ -d test/logs ]]; then \
5658
tar -C test/logs -czf bin/artifacts/test-logs-cpu.tgz . ;\
5759
fi ;\
@@ -67,7 +69,7 @@ ARG REDIS_VER
6769
ARG PACK
6870

6971
RUN if [ ! -z $(command -v apt-get) ]; then apt-get -qq update; apt-get -q install -y libgomp1; fi
70-
RUN if [ ! -z $(command -v yum) ]; then yum install -y libgomp; fi
72+
RUN if [ ! -z $(command -v yum) ]; then yum install -y libgomp; fi
7173

7274
ENV REDIS_MODULES /usr/lib/redis/modules
7375
ENV LD_LIBRARY_PATH $REDIS_MODULES

Dockerfile.arm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ARG OS=debian:buster-slim
1212
ARG ARCH=arm64v8
1313

1414
ARG PACK=0
15+
ARG REDISAI_LITE=0
1516
ARG TEST=0
1617

1718
#----------------------------------------------------------------------------------------------
@@ -31,7 +32,7 @@ WORKDIR /build
3132
COPY --from=redis /usr/local/ /usr/local/
3233

3334
COPY ./opt/ opt/
34-
COPY ./tests/flow/test_requirements.txt tests/flow
35+
COPY ./tests/flow/tests_setup/test_requirements.txt tests/flow
3536

3637
RUN ./opt/readies/bin/getpy3
3738
RUN ./opt/system-setup.py
@@ -66,7 +67,7 @@ ARG REDIS_VER
6667
ARG PACK
6768

6869
RUN if [ ! -z $(command -v apt-get) ]; then apt-get -qq update; apt-get -q install -y libgomp1; fi
69-
RUN if [ ! -z $(command -v yum) ]; then yum install -y libgomp; fi
70+
RUN if [ ! -z $(command -v yum) ]; then yum install -y libgomp; fi
7071

7172
ENV REDIS_MODULES /usr/lib/redis/modules
7273
ENV LD_LIBRARY_PATH $REDIS_MODULES

Dockerfile.gpu

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ ARG ARCH=x64
1414
ARG CUDA_VER=11.0-cudnn8
1515

1616
ARG PACK=0
17+
ARG REDISAI_LITE=0
1718
ARG TEST=0
1819

1920
#----------------------------------------------------------------------------------------------
2021
FROM redisfab/redis:${REDIS_VER}-${ARCH}-${OSNICK} AS redis
21-
FROM nvidia/cuda:10.2-cudnn8-devel-${OS} AS cuda_10.2
2222
FROM nvidia/cuda:${CUDA_VER}-devel-${OS} AS builder
2323

2424
ARG OSNICK
@@ -35,13 +35,10 @@ ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
3535
WORKDIR /build
3636
COPY --from=redis /usr/local/ /usr/local/
3737

38-
COPY --from=cuda_10.2 /usr/local/cuda-10.2 /usr/local/cuda-10.2
39-
COPY --from=cuda_10.2 /usr/lib/x86_64-linux-gnu/libcu* /usr/lib/x86_64-linux-gnu/
40-
41-
RUN echo export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda-11.0/lib64:/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH > /etc/profile.d/cuda.sh
38+
RUN echo export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda-11.0/lib64:$LD_LIBRARY_PATH > /etc/profile.d/cuda.sh
4239

4340
COPY ./opt/ opt/
44-
COPY ./tests/flow/test_requirements.txt tests/flow/
41+
ADD ./tests/flow/ tests/flow/
4542

4643
RUN FORCE=1 ./opt/readies/bin/getpy3
4744
RUN ./opt/system-setup.py
@@ -55,11 +52,12 @@ ADD ./ /build
5552
RUN bash -l -c "make -C opt build GPU=1 $BUILD_ARGS SHOW=1"
5653

5754
ARG PACK
55+
ARG REDISAI_LITE
5856
ARG TEST
5957

6058
RUN mkdir -p bin/artifacts
6159
RUN set -e ;\
62-
if [ "$PACK" = "1" ]; then bash -l -c "make -C opt pack GPU=1"; fi
60+
if [ "$PACK" = "1" ]; then bash -l -c "make -C opt pack GPU=1 REDISAI_LITE=$REDISAI_LITE"; fi
6361

6462
RUN set -e ;\
6563
if [ "$TEST" = "1" ]; then \
@@ -75,13 +73,12 @@ FROM nvidia/cuda:${CUDA_VER}-runtime-${OS}
7573
ARG OS
7674

7775
RUN if [ ! -z $(command -v apt-get) ]; then apt-get -qq update; apt-get -q install -y libgomp1; fi
78-
RUN if [ ! -z $(command -v yum) ]; then yum install -y libgomp; fi
76+
RUN if [ ! -z $(command -v yum) ]; then yum install -y libgomp; fi
7977

8078
ENV REDIS_MODULES /usr/lib/redis/modules
8179
RUN mkdir -p $REDIS_MODULES/
8280

8381
COPY --from=redis /usr/local/ /usr/local/
84-
COPY --from=builder /usr/local/cuda-10.2 /usr/local/cuda-10.2
8582
COPY --from=builder /usr/lib/x86_64-linux-gnu/libcu* /usr/lib/x86_64-linux-gnu/
8683
COPY --from=builder /build/install-gpu/ $REDIS_MODULES/
8784

Dockerfile.gpu-test

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ ARG PACK=1
1717

1818
#----------------------------------------------------------------------------------------------
1919
FROM redisfab/redis:${REDIS_VER}-${ARCH}-${OSNICK} AS redis
20-
FROM nvidia/cuda:10.2-cudnn8-devel-${OS} AS cuda_10.2
2120
FROM nvidia/cuda:${CUDA_VER}-devel-${OS} AS builder
2221

2322
SHELL ["/bin/bash", "-c"]
@@ -28,14 +27,11 @@ ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
2827
WORKDIR /build
2928
COPY --from=redis /usr/local/ /usr/local/
3029

31-
COPY --from=cuda_10.2 /usr/local/cuda-10.2 /usr/local/cuda-10.2
32-
COPY --from=cuda_10.2 /usr/lib/x86_64-linux-gnu/libcu* /usr/lib/x86_64-linux-gnu/
33-
34-
RUN echo export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda-11.0/lib64:/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH > /etc/profile.d/cuda.sh
30+
RUN echo export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda-11.0/lib64:$LD_LIBRARY_PATH > /etc/profile.d/cuda.sh
3531

3632
COPY ./opt/ opt/
37-
COPY ./tests/flow/test_requirements.txt tests/flow/
38-
COPY ./tests/flow/Install_RedisGears.sh tests/flow/
33+
COPY ./tests/flow/tests_setup/test_requirements.txt tests/flow/tests_setup/
34+
COPY ./tests/flow/tests_setup/Install_RedisGears.sh tests/flow/tests_setup/
3935

4036
RUN VENV=venv FORCE=1 ./opt/readies/bin/getpy3
4137

Dockerfile.jetson

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ARG CUDA_VER=10.2-cudnn7
1616
ARG L4T_VER=r32.4.4
1717

1818
ARG PACK=0
19+
ARG REDISAI_LITE=0
1920
ARG TEST=0
2021

2122
#----------------------------------------------------------------------------------------------
@@ -38,7 +39,7 @@ WORKDIR /build
3839
COPY --from=redis /usr/local/ /usr/local/
3940

4041
COPY ./opt/ opt/
41-
COPY ./tests/flow/test_requirements.txt tests/flow/
42+
COPY ./tests/flow/tests_setup/test_requirements.txt tests/flow/
4243

4344
RUN FORCE=1 ./opt/readies/bin/getpy3
4445
RUN ./opt/system-setup.py
@@ -57,6 +58,7 @@ RUN bash -c "set -e ;\
5758
make -C opt build $BUILD_ARGS SHOW=1"
5859

5960
ARG PACK
61+
ARG REDISAI_LITE
6062
ARG TEST
6163

6264
RUN mkdir -p bin/artifacts

README.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![GitHub issues](https://img.shields.io/github/release/RedisAI/RedisAI.svg?sort=semver)](https://github.com/RedisAI/RedisAI/releases/latest)
22
[![CircleCI](https://circleci.com/gh/RedisAI/RedisAI/tree/master.svg?style=svg)](https://circleci.com/gh/RedisAI/RedisAI/tree/master)
3-
[![Dockerhub](https://img.shields.io/badge/dockerhub-redislabs%2Fredisai-blue)](https://hub.docker.com/r/redislabs/redisai/tags/)
3+
[![Dockerhub](https://img.shields.io/badge/dockerhub-redislabs%2Fredisai-blue)](https://hub.docker.com/r/redislabs/redisai/tags/)
44
[![codecov](https://codecov.io/gh/RedisAI/RedisAI/branch/master/graph/badge.svg)](https://codecov.io/gh/RedisAI/RedisAI)
55
[![Total alerts](https://img.shields.io/lgtm/alerts/g/RedisAI/RedisAI.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/RedisAI/RedisAI/alerts/)
66

@@ -23,13 +23,13 @@ If you want to run examples, make sure you have [git-lfs](https://git-lfs.github
2323
To quickly tryout RedisAI, launch an instance using docker:
2424

2525
```sh
26-
docker run -p 6379:6379 -it --rm redislabs/redisai
26+
docker run -p 6379:6379 -it --rm redislabs/redisai:edge-cpu
2727
```
2828

2929
For docker instance with GPU support, you can launch it from `tensorwerk/redisai-gpu`
3030

3131
```sh
32-
docker run -p 6379:6379 --gpus all -it --rm redislabs/redisai:latest-gpu
32+
docker run -p 6379:6379 --gpus all -it --rm redislabs/redisai:edge-gpu
3333
```
3434

3535
But if you'd like to build the docker image, you need a machine that has Nvidia driver (CUDA 10.0), nvidia-container-toolkit and Docker 19.03+ installed. For detailed information, checkout [nvidia-docker documentation](https://github.com/NVIDIA/nvidia-docker)
@@ -46,7 +46,7 @@ Note that Redis config is located at `/usr/local/etc/redis/redis.conf` which can
4646

4747
On the client, set the model
4848
```sh
49-
redis-cli -x AI.MODELSET foo TF CPU INPUTS a b OUTPUTS c BLOB < tests/test_data/graph.pb
49+
redis-cli -x AI.MODELSTORE foo TF CPU INPUTS 2 a b OUTPUTS 1 c BLOB < tests/test_data/graph.pb
5050
```
5151

5252
Then create the input tensors, run the computation graph and get the output tensor (see `load_model.sh`). Note the signatures:
@@ -69,7 +69,7 @@ redis-cli
6969

7070
## Building
7171

72-
You should obtain the module's source code and submodule using git like so:
72+
You should obtain the module's source code and submodule using git like so:
7373

7474
```sh
7575
git clone --recursive https://github.com/RedisAI/RedisAI
@@ -116,12 +116,22 @@ redis-server --loadmodule install-cpu/redisai.so
116116

117117
Some languages have client libraries that provide support for RedisAI's commands:
118118

119-
| Project | Language | License | Author | URL |
120-
| ------- | -------- | ------- | ------ | --- |
121-
| JRedisAI | Java | BSD-3 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/JRedisAI) |
122-
| redisai-py | Python | BSD-3 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/redisai-py) |
123-
| redisai-go | Go | BSD-3 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/redisai-go) |
124-
| redisai-js | Typescript/Javascript | BSD-3 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/redisai-js) |
119+
| Project | Language | License | Author | URL |
120+
| ------- | -------- | ------- | ------ | --- |
121+
| JRedisAI | Java | BSD-3 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/JRedisAI) |
122+
| redisai-py | Python | BSD-3 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/redisai-py) |
123+
| redisai-go | Go | BSD-3 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/redisai-go) |
124+
| redisai-js | Typescript/Javascript | BSD-3 | [RedisLabs](https://redislabs.com/) | [Github](https://github.com/RedisAI/redisai-js) |
125+
| redis-modules-sdk | TypeScript | BSD-3-Clause | [Dani Tseitlin](https://github.com/danitseitlin) | [Github](https://github.com/danitseitlin/redis-modules-sdk) |
126+
| redis-modules-java | Java | Apache-2.0 | [dengliming](https://github.com/dengliming) | [Github](https://github.com/dengliming/redis-modules-java) |
127+
| smartredis | C++ | BSD-2-Clause | [Cray Labs](https://github.com/CrayLabs) | [Github](https://github.com/CrayLabs/SmartRedis) |
128+
| smartredis | C | BSD-2-Clause | [Cray Labs](https://github.com/CrayLabs) | [Github](https://github.com/CrayLabs/SmartRedis) |
129+
| smartredis | Fortran | BSD-2-Clause | [Cray Labs](https://github.com/CrayLabs) | [Github](https://github.com/CrayLabs/SmartRedis) |
130+
| smartredis | Python | BSD-2-Clause | [Cray Labs](https://github.com/CrayLabs) | [Github](https://github.com/CrayLabs/SmartRedis) |
131+
132+
133+
134+
125135

126136
## Backend Dependancy
127137

0 commit comments

Comments
 (0)