Skip to content

Commit ef5af98

Browse files
authored
Merge pull request #642 from RedisAI/v1.2.2
V1.2.2
2 parents 2354df4 + 379f48f commit ef5af98

File tree

117 files changed

+1636
-1249
lines changed

Some content is hidden

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

117 files changed

+1636
-1249
lines changed

.circleci/config.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,29 @@
11
version: 2.1
22

33
commands:
4+
abort_for_docs:
5+
steps:
6+
- run:
7+
name: Avoid tests for docs
8+
command: |
9+
if [[ $CIRCLE_BRANCH == *_docs ]]; then
10+
echo "Identifies as documents PR, no testing required"
11+
circleci step halt
12+
fi
13+
14+
early_return_for_forked_pull_requests:
15+
description: >-
16+
If this build is from a fork, stop executing the current job and return success.
17+
This is useful to avoid steps that will fail due to missing credentials.
18+
steps:
19+
- run:
20+
name: Early return if this build is from a forked PR
21+
command: |
22+
if [[ -n "$CIRCLE_PR_NUMBER" ]]; then
23+
echo "Nothing to do for forked PRs, so marking this step successful"
24+
circleci step halt
25+
fi
26+
427
setup-executor:
528
steps:
629
- run:
@@ -25,6 +48,7 @@ commands:
2548
platform:
2649
type: string
2750
steps:
51+
- abort_for_docs
2852
- checkout
2953
- run:
3054
name: Submodule checkout
@@ -72,6 +96,7 @@ commands:
7296

7397
platforms-build-steps:
7498
steps:
99+
- abort_for_docs
75100
- checkout
76101
- run:
77102
name: Relocate docker overlay2 dir
@@ -117,6 +142,8 @@ commands:
117142
from:
118143
type: string
119144
steps:
145+
- abort_for_docs
146+
- early_return_for_forked_pull_requests
120147
- run:
121148
name: Deploy to S3
122149
command: |
@@ -158,6 +185,7 @@ jobs:
158185
docker:
159186
- image: redisfab/rmbuilder:6.0.9-x64-buster
160187
steps:
188+
- abort_for_docs
161189
- checkout
162190
- run:
163191
name: Submodule checkout
@@ -191,6 +219,7 @@ jobs:
191219
docker:
192220
- image: redisfab/rmbuilder:6.0.9-x64-buster
193221
steps:
222+
- abort_for_docs
194223
- checkout
195224
- run:
196225
name: Submodule checkout
@@ -219,18 +248,20 @@ jobs:
219248
macos:
220249
xcode: 11.3.0
221250
steps:
251+
- abort_for_docs
222252
- run:
223253
name: Fix macOS Python installation
224254
command: |
225255
brew reinstall -f python2
226256
- build-steps:
227-
platform: macosx
257+
platform: macos
228258

229259
build-multiarch-docker:
230260
machine:
231261
enabled: true
232262
image: cimg/base:2020.01
233263
steps:
264+
- abort_for_docs
234265
- checkout
235266
- run:
236267
name: Submodule checkout
@@ -262,6 +293,7 @@ jobs:
262293
resource_class: gpu.nvidia.small
263294
image: ubuntu-1604-cuda-11.1:202012-01
264295
steps:
296+
- abort_for_docs
265297
- checkout
266298
- run:
267299
name: Submodule checkout
@@ -295,6 +327,8 @@ jobs:
295327
docker:
296328
- image: redisfab/rmbuilder:6.0.9-x64-buster
297329
steps:
330+
- abort_for_docs
331+
- early_return_for_forked_pull_requests
298332
- attach_workspace:
299333
at: workspace
300334
- run:
@@ -310,6 +344,8 @@ jobs:
310344
docker:
311345
- image: redisfab/rmbuilder:6.0.9-x64-buster
312346
steps:
347+
- abort_for_docs
348+
- early_return_for_forked_pull_requests
313349
- attach_workspace:
314350
at: workspace
315351
- run:
@@ -331,6 +367,8 @@ jobs:
331367
docker:
332368
- image: redisfab/rmbuilder:6.0.9-x64-buster
333369
steps:
370+
- abort_for_docs
371+
- early_return_for_forked_pull_requests
334372
- attach_workspace:
335373
at: workspace
336374
- run:

CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
4444

4545
# Add -fno-omit-frame-pointer to avoid seeing incomplete stack traces
4646
set(CMAKE_COMMON_FLAGS_DEBUG "-g -ggdb -fno-omit-frame-pointer -D_DEBUG -DVALGRIND -include \
47-
${CMAKE_CURRENT_SOURCE_DIR}/src/common.h -I${CMAKE_CURRENT_SOURCE_DIR}/opt")
47+
${CMAKE_CURRENT_SOURCE_DIR}/src/config/gdb_config.h -I${CMAKE_CURRENT_SOURCE_DIR}/opt")
4848
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_COMMON_FLAGS_DEBUG}")
4949
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_COMMON_FLAGS_DEBUG}")
5050

@@ -98,6 +98,7 @@ GET_FILENAME_COMPONENT(installAbs
9898
#----------------------------------------------------------------------------------------------
9999

100100
INCLUDE_DIRECTORIES(${depsAbs}/dlpack/include)
101+
INCLUDE_DIRECTORIES(src)
101102
IF(BUILD_TF)
102103
INCLUDE_DIRECTORIES(${depsAbs}/libtensorflow/include)
103104
ENDIF()
@@ -182,7 +183,7 @@ IF(BUILD_TFLITE)
182183
# Find TensorFlow Lite stuff and build our wrapper
183184
INCLUDE_DIRECTORIES(util/libtflite_c)
184185

185-
ADD_SUBDIRECTORY(src/libtflite_c)
186+
ADD_SUBDIRECTORY(src/backends/libtflite_c)
186187
ENDIF()
187188

188189
#----------------------------------------------------------------------------------------------
@@ -194,12 +195,13 @@ IF(BUILD_TORCH)
194195

195196
INCLUDE_DIRECTORIES(util/libtorch_c)
196197

197-
ADD_SUBDIRECTORY(src/libtorch_c)
198+
ADD_SUBDIRECTORY(src/backends/libtorch_c)
198199
ENDIF()
199200

200201
#----------------------------------------------------------------------------------------------
201202

202203
ADD_SUBDIRECTORY(src)
204+
ADD_SUBDIRECTORY(tests/module)
203205
ADD_LIBRARY(redisai SHARED $<TARGET_OBJECTS:redisai_obj>)
204206

205207
TARGET_LINK_LIBRARIES(redisai ${CMAKE_DL_LIBS})

Dockerfile.gpu-test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ RUN echo export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda-11.0/lib64
3535

3636
COPY ./opt/ opt/
3737
COPY ./tests/flow/test_requirements.txt tests/flow/
38+
COPY ./tests/flow/Install_RedisGears.sh tests/flow/
3839

3940
RUN VENV=venv FORCE=1 ./opt/readies/bin/getpy3
4041

Dockerfile.jetson

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ ARG OS
8181
ARG L4T_VER
8282

8383
RUN if [ ! -z $(command -v apt-get) ]; then apt-get -qq update; apt-get -q install -y libgomp1; fi
84-
RUN if [ ! -z $(command -v yum) ]; then yum install -y libgomp; fi
84+
RUN if [ ! -z $(command -v yum) ]; then yum install -y libgomp; fi
8585

8686
ENV REDIS_MODULES /usr/lib/redis/modules
8787
RUN mkdir -p $REDIS_MODULES/
@@ -96,4 +96,5 @@ COPY --from=builder /build/bin/artifacts/ /var/opt/redislabs/artifacts
9696
WORKDIR /data
9797
EXPOSE 6379
9898
# CMD ["/usr/local/bin/redis-server", "/usr/local/etc/redis/redis.conf", "--loadmodule", "/usr/lib/redis/modules/redisai.so"]
99+
RUN rm -rf /root/.cache /usr/local/cuda/lib64/*.a /usr/local/cuda/doc /usr/local/cuda/samples
99100
CMD ["/usr/local/bin/redis-server", "--loadmodule", "/usr/lib/redis/modules/redisai.so"]

README.md

Lines changed: 3 additions & 3 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-
[![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/redisai/redisai.svg)](https://hub.docker.com/r/redisai/redisai/builds/)
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 redisai/redisai
26+
docker run -p 6379:6379 -it --rm redislabs/redisai
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 redisai/redisai:latest-gpu
32+
docker run -p 6379:6379 --gpus all -it --rm redislabs/redisai:latest-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)

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RedisAI is a joint effort between [Redis Labs](https://www.redislabs.com) and [T
1717
## Quick Links
1818
* [Source code repository](https://github.com/RedisAI/RedisAI)
1919
* [Releases](https://github.com/RedisAI/RedisAI/releases)
20-
* [Docker image](https://hub.docker.com/r/redisai/redisai/)
20+
* [Docker image](https://hub.docker.com/r/redislabs/redisai/)
2121

2222
## Contact Us
2323
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/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Backend libraries are dynamically loaded as needed, but can also be loaded durin
124124
The easiest way to get a standalone Redis server with RedisAI bootstrapped locally is to use the official RedisAI Docker container image:
125125

126126
```
127-
docker run -d --name redisai -p 6379:6379 redisai/redisai:latest
127+
docker run -d --name redisai -p 6379:6379 redislabs/redisai:latest
128128
```
129129

130130
??? info "Further reference"

docs/quickstart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ The quickest way to try RedisAI is by launching its official Docker container im
88

99
### On a CPU only machine
1010
```
11-
docker run -p 6379:6379 redisai/redisai:latest
11+
docker run -p 6379:6379 redislabs/redisai:latest
1212
```
1313

1414
### On a GPU machine
1515

1616
```
17-
docker run -p 6379:6379 --gpus all -it --rm redisai/redisai:latest-gpu
17+
docker run -p 6379:6379 --gpus all -it --rm redislabs/redisai:latest-gpu
1818
```
1919

2020
## Download

docs/requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
mkdocs==1.0.4
2-
mkdocs-material==4.6.3
1+
mkdocs==1.1.2
2+
mkdocs-material==6.2.2
33
-e git+https://github.com/RedisLabs/mkdocs-versions-menu.git#egg=mkdocs-versions-menu
44
-e git+https://github.com/RedisLabs/mkdocs-include.git#egg=mkdocs-include
5+
-e git+https://github.com/RedisLabs/mkdocs-modules-template.git#egg=mkdocs-modules-template
56
# uncomment requirement to build LL API
67
# -e git+https://github.com/matusnovak/doxybook.git#egg=doxybook

get_deps.sh

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
1212
if [[ $1 == --help || $1 == help ]]; then
1313
cat <<-END
1414
[ARGVARS...] get_deps.sh [cpu|gpu] [--help|help]
15-
15+
1616
Argument variables:
1717
CPU=1 Get CPU dependencies
1818
GPU=1 Get GPU dependencies
@@ -70,7 +70,7 @@ MKL=mkl
7070
ONNXRUNTIME=onnxruntime
7171

7272
######################################################################################## DLPACK
73-
DLPACK_VERSION="v0.3"
73+
DLPACK_VERSION="v0.4"
7474
if [[ $WITH_DLPACK != 0 ]]; then
7575
[[ $FORCE == 1 ]] && rm -rf $DLPACK
7676

@@ -103,7 +103,7 @@ if [[ $WITH_TF != 0 ]]; then
103103
fi
104104
if [[ $ARCH == x64 ]]; then
105105
TF_ARCH=x86_64
106-
106+
107107
LIBTF_URL_BASE=https://storage.googleapis.com/tensorflow/libtensorflow
108108
elif [[ $ARCH == arm64v8 ]]; then
109109
TF_ARCH=arm64
@@ -134,7 +134,7 @@ if [[ $WITH_TF != 0 ]]; then
134134
mkdir $LIBTENSORFLOW.x
135135
tar xf $LIBTF_ARCHIVE --no-same-owner -C $LIBTENSORFLOW.x
136136
mv $LIBTENSORFLOW.x $LIBTENSORFLOW
137-
137+
138138
echo "Done."
139139
else
140140
echo "TensorFlow is in place."
@@ -152,7 +152,7 @@ if [[ $WITH_TFLITE != 0 ]]; then
152152

153153
if [[ ! -d $LIBTFLITE ]]; then
154154
echo "Installing TensorFlow Lite ..."
155-
155+
156156
LIBTF_URL_BASE=https://s3.amazonaws.com/redismodules/tensorflow
157157
if [[ $OS == linux ]]; then
158158
TFLITE_OS="linux"
@@ -183,7 +183,7 @@ if [[ $WITH_TFLITE != 0 ]]; then
183183
mkdir $LIBTFLITE.x
184184
tar xf $LIBTFLITE_ARCHIVE --no-same-owner -C $LIBTFLITE.x
185185
mv $LIBTFLITE.x $LIBTFLITE
186-
186+
187187
echo "Done."
188188
else
189189
echo "TensorFlow Lite is in place."
@@ -241,14 +241,14 @@ if [[ $WITH_PT != 0 ]]; then
241241

242242
[[ ! -f $LIBTORCH_ARCHIVE || $FORCE == 1 ]] && wget -q $LIBTORCH_URL
243243
fi
244-
244+
245245
rm -rf $LIBTORCH.x
246246
mkdir $LIBTORCH.x
247247

248248
tar xf $LIBTORCH_ARCHIVE --no-same-owner -C $LIBTORCH.x
249249
mv $LIBTORCH.x/libtorch $LIBTORCH
250250
rmdir $LIBTORCH.x
251-
251+
252252
echo "Done."
253253
else
254254
echo "libtorch is in place."
@@ -282,7 +282,7 @@ fi
282282

283283
################################################################################### ONNXRUNTIME
284284

285-
ORT_VERSION="1.6.0"
285+
ORT_VERSION="1.7.1"
286286

287287
if [[ $WITH_ORT != 0 ]]; then
288288
[[ $FORCE == 1 ]] && rm -rf $ONNXRUNTIME
@@ -297,15 +297,13 @@ if [[ $WITH_ORT != 0 ]]; then
297297
else
298298
ORT_BUILD="-gpu"
299299
fi
300+
ORT_URL_BASE=https://s3.amazonaws.com/redismodules/onnxruntime
300301
if [[ $ARCH == x64 ]]; then
301302
ORT_ARCH=x64
302-
ORT_URL_BASE=https://github.com/microsoft/onnxruntime/releases/download/v${ORT_VERSION}
303303
elif [[ $ARCH == arm64v8 ]]; then
304304
ORT_ARCH=arm64
305-
ORT_URL_BASE=https://s3.amazonaws.com/redismodules/onnxruntime
306305
elif [[ $ARCH == arm32v7 ]]; then
307306
ORT_ARCH=arm
308-
ORT_URL_BASE=https://s3.amazonaws.com/redismodules/onnxruntime
309307
fi
310308
elif [[ $OS == macos ]]; then
311309
ORT_OS=osx
@@ -322,7 +320,7 @@ if [[ $WITH_ORT != 0 ]]; then
322320
mkdir $ONNXRUNTIME.x
323321
tar xzf ${ORT_ARCHIVE} --no-same-owner --strip-components=1 -C $ONNXRUNTIME.x
324322
mv $ONNXRUNTIME.x $ONNXRUNTIME
325-
323+
326324
echo "Done."
327325
else
328326
echo "ONNXRuntime is in place."

mkdocs.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,24 @@ plugins:
5353
- search
5454
- include:
5555
src_path: docs/snippets
56+
- modules-template:
57+
try-for-free: false
58+
modules:
59+
- name: 'Search'
60+
link: '/redisearch'
61+
62+
- name: 'Time Series'
63+
link: '/redistimeseries'
64+
65+
- name: 'Bloom'
66+
link: '/redisbloom'
67+
68+
- name: 'Graph'
69+
link: '/redisgraph'
70+
71+
- name: 'JSON'
72+
link: '/redisjson'
73+
74+
- name: 'Gears'
75+
link: '/redisgears'
5676
- versions-menu:

0 commit comments

Comments
 (0)