Skip to content

v1.0 cherry picks #450

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 29 commits into from
Sep 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6d29eef
Introduced readies submodule (#377)
rafie May 19, 2020
94d79e5
[WIP] add C API reference to docs using auto tool (#368)
filipecosta90 May 20, 2020
87df138
[WIP] Enable AI.SCRIPTRUN on AI.DAGRUN* (#383)
filipecosta90 May 25, 2020
af92171
Add support for variadic arguments to SCRIPT (#395)
lantiga Jun 1, 2020
6500869
atomic ref count (#403)
DvirDukhan Jun 7, 2020
480d87c
Multi-platform build (#398)
rafie Jun 7, 2020
a19cc60
CircleCI: increased GPU test timeout to 40m (#404)
rafie Jun 7, 2020
f0fdbf1
CI: platform-build-defs -> on-master-and-version-tags (#405)
rafie Jun 7, 2020
b66585b
Llapi updates (#400)
DvirDukhan Jun 9, 2020
b360284
Avoid splitting outputs in batches when nbatches == 1 (#406)
lantiga Jun 10, 2020
0067c52
Update README.md
lantiga Jun 18, 2020
beb4de4
CircleCI: fixed redis installation in coverage builds (#423)
rafie Jun 28, 2020
f3ac365
Docker6.0.5 (#427)
gkorland Jul 4, 2020
39c3be9
submodule pull moved up (#428)
Jul 8, 2020
a023fab
Update mkdocs.yml (#432)
gkorland Jul 21, 2020
d76e38c
[add] Add relevant RedisAI config entries to the INFO output, so that…
filipecosta90 Jul 23, 2020
ce1ea3e
Updated support email and Orobix to Tensorwork on ramp file (#436)
filipecosta90 Jul 25, 2020
79b325b
CircleCI: Fixed problem with GPU testing (#440)
rafie Aug 6, 2020
2e21a99
Fixed platforms build problem (#441)
rafie Aug 8, 2020
6e3f9b9
Dependencies in ramp.yml (#444)
rafie Aug 16, 2020
0a9d953
Fixed flagged as "getkeys-api" during the registration ( AI.DAGRUN, A…
filipecosta90 Aug 7, 2020
cad07af
Safely add to arrays + fix for #443 (#449)
lantiga Aug 24, 2020
81a7ee9
fixed tests messages
DvirDukhan Aug 26, 2020
ed50d81
Shallow copy persisted tensor
lantiga Sep 1, 2020
256955e
Resolve log format warnings
lantiga Sep 1, 2020
68f7aac
Fix error message and test
lantiga Sep 1, 2020
d0f3d72
Fix memory management in local context dict
lantiga Sep 2, 2020
c3b3e7c
Fixed artifacts handling + added tests logs aggregation (#445)
rafie Aug 27, 2020
ba008bb
Build: setuptools-related fix (#455)
rafie Sep 1, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 64 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ commands:
command: |
./opt/readies/bin/getpy3
BREW_NO_UPDATE=1 ./opt/system-setup.py
# ./opt/readies/bin/getredis -v 6 --force
./opt/readies/bin/getredis -v 6 --force
./get_deps.sh cpu
- save_cache:
paths:
Expand All @@ -46,12 +46,17 @@ commands:
no_output_timeout: 20m
- run:
name: Package
command: make -C opt pack SHOW=1
command: |
make -C opt pack SHOW=1
(cd bin/artifacts; tar -cf snapshots-<<parameters.platform>>.tar snapshots/)
- persist_to_workspace:
root: bin/
paths:
- artifacts/*.zip
- artifacts/*.tgz
- artifacts/*.tar
# - artifacts/shapshots/*.zip
# - artifacts/shapshots/*.tgz
- store_artifacts:
path: test/logs

Expand All @@ -71,16 +76,27 @@ commands:
name: Build for platform
command: |
docker login -u redisfab -p $DOCKER_REDISFAB_PWD
cd opt/build/docker
pushd opt/build/docker
#@@ make build publish $(./version-params) CPU=1 OSNICK=<<parameters.platform>> X64=1 ARTIFACTS=1 TEST=1 VERBOSE=1
make build publish $(./version-params) CPU=1 OSNICK=<<parameters.platform>> X64=1 ARTIFACTS=1 VERBOSE=1
make build publish $(./version-params) GPU=1 OSNICK=<<parameters.platform>> X64=1 ARTIFACTS=1 VERBOSE=1
popd > /dev/null
logstar=bin/artifacts/tests-logs-cpu.tgz
logsdir=tests/logs/cpu
mkdir -p $logsdir
if [[ -e $logstar ]]; then tar -C $logsdir -xzf $logstar; fi
(cd bin/artifacts; tar -cf snapshots-<<parameters.platform>>.tar snapshots/)
no_output_timeout: 40m
- persist_to_workspace:
root: bin/
paths:
- artifacts/*.zip
- artifacts/*.tgz
- artifacts/*.tar
# - artifacts/shapshots/*.zip
# - artifacts/shapshots/*.tgz
- store_artifacts:
path: test/logs

deploy-steps:
parameters:
Expand All @@ -95,7 +111,7 @@ commands:
jobs:
build-debian:
docker:
- image: redisfab/rmbuilder:6.0.1-x64-buster
- image: redisfab/rmbuilder:6.0.5-x64-buster
steps:
- build-steps:
platform: debian
Expand All @@ -112,7 +128,7 @@ jobs:

coverage:
docker:
- image: redisfab/rmbuilder:6.0.1-x64-buster
- image: redisfab/rmbuilder:6.0.5-x64-buster
steps:
- checkout
- run:
Expand All @@ -136,7 +152,7 @@ jobs:
- run:
name: Test with coverage
command: |
make -C opt test SHOW=1 COV=1
make -C opt test SHOW=1 COV=1 CLUSTER=1
make -C opt cov-upload
no_output_timeout: 20m

Expand Down Expand Up @@ -202,22 +218,56 @@ jobs:
docker run --gpus all -v $HOME/tests:/build/test/logs -it --rm redisai-gpu:latest-x64-bionic-test
no_output_timeout: 40m
- store_artifacts:
path: tests
path: test/log

deploy-artifacts:
parameters:
package:
location:
type: string
docker:
- image: redisfab/rmbuilder:6.0.1-x64-buster
- image: redisfab/rmbuilder:6.0.5-x64-buster
steps:
- attach_workspace:
at: workspace
- run:
name: Deploy to S3
command: |
cd workspace
aws s3 cp artifacts/ s3://redismodules/$PACKAGE_NAME/ --acl public-read --recursive --exclude "*" --include "*.zip" --include "*.tgz"
cd "workspace/artifacts/<<parameters.location>>"
for f in *.zip snapshot/*.tgz; do
aws s3 cp $f s3://redismodules/$PACKAGE_NAME/<<parameters.location>>/ --acl public-read
done

deploy-snapshot:
docker:
- image: redisfab/rmbuilder:6.0.5-x64-buster
steps:
- attach_workspace:
at: workspace
- run:
name: Deploy Snapshots to S3
command: |
cd workspace/artifacts
for f in snapshots-*.tar; do
tar xf $f
done
cd snapshots
for f in *.zip *.tgz; do
aws s3 cp --no-progress $f s3://redismodules/$PACKAGE_NAME/snapshots/ --acl public-read
done

deploy-release:
docker:
- image: redisfab/rmbuilder:6.0.5-x64-buster
steps:
- attach_workspace:
at: workspace
- run:
name: Deploy Releases to S3
command: |
cd workspace/artifacts
for f in *.zip *.tgz; do
aws s3 cp --no-progress $f s3://redismodules/$PACKAGE_NAME/ --acl public-read
done


on-any-branch: &on-any-branch
Expand Down Expand Up @@ -296,14 +346,10 @@ workflows:
- build-multiarch-docker:
<<: *never # temporarily disabled
# <<: *on-version-tags
- deploy-artifacts:
name: deploy-branch
package: branch
- deploy-snapshot:
<<: *after-platform-builds
<<: *on-any-branch
- deploy-artifacts:
name: deploy-release
package: release
<<: *on-master
- deploy-release:
<<: *after-platform-builds
<<: *on-version-tags

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
python-version: '3.x'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install Doxygen
run: apt-get install -y doxygen
- name: Install docs dependencies
run: pip install -r docs/requirements.txt
- name: Get entire project
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")

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

#----------------------------------------------------------------------------------------------

Expand Down
19 changes: 13 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BUILD redisfab/redisai:${VERSION}-cpu-${ARCH}-${OSNICK}

ARG REDIS_VER=6.0.1
ARG REDIS_VER=6.0.5

# OSNICK=bionic|stretch|buster
ARG OSNICK=buster
Expand Down Expand Up @@ -31,7 +31,7 @@ COPY --from=redis /usr/local/ /usr/local/
COPY ./opt/ opt/
COPY ./test/test_requirements.txt test/

RUN ./opt/readies/bin/getpy3
RUN PIP=1 FORCE=1 ./opt/readies/bin/getpy3
RUN ./opt/system-setup.py

ARG DEPS_ARGS=""
Expand All @@ -40,17 +40,24 @@ RUN if [ "$DEPS_ARGS" = "" ]; then ./get_deps.sh cpu; else env $DEPS_ARGS ./get_

ARG BUILD_ARGS=""
ADD ./ /build
RUN set -e ;\
RUN bash -c "set -e ;\
. ./opt/readies/bin/sourced ./profile.d ;\
make -C opt build $BUILD_ARGS SHOW=1
make -C opt build $BUILD_ARGS SHOW=1"

ARG PACK
ARG TEST

RUN mkdir -p bin/artifacts
RUN if [ "$PACK" = "1" ]; then make -C opt pack; fi
RUN set -e ;\
if [ "$PACK" = "1" ]; then make -C opt pack; fi

RUN if [ "$TEST" = "1" ]; then TEST= make -C opt test $BUILD_ARGS NO_LFS=1; fi
RUN set -e ;\
if [ "$TEST" = "1" ]; then \
TEST= make -C opt test $BUILD_ARGS NO_LFS=1 ;\
if [[ -d test/logs ]]; then \
tar -C test/logs -czf bin/artifacts/test-logs-cpu.tgz . ;\
fi ;\
fi

#----------------------------------------------------------------------------------------------
FROM redisfab/redis:${REDIS_VER}-${ARCH}-${OSNICK}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.arm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BUILD redisfab/redisai:${VERSION}-cpu-${ARCH}-${OSNICK}

ARG REDIS_VER=6.0.1
ARG REDIS_VER=6.0.5

# OSNICK=bionic|stretch|buster
ARG OSNICK=buster
Expand Down
28 changes: 18 additions & 10 deletions Dockerfile.gpu
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# BUILD redisfab/redisai:${VERSION}-gpu-${ARCH}-${OSNICK}

ARG REDIS_VER=6.0.1
ARG REDIS_VER=6.0.5

# OSNICK=bionic|centos7|centos6
ARG OSNICK=bionic

# ARCH=x64|arm64v8|arm32v7
ARG ARCH=x64

# OS=ubuntu18.04|ubuntu16.04|centos7
ARG OS=ubuntu18.04

# ARCH=x64|arm64v8|arm32v7
ARG ARCH=x64

ARG CUDA_VER=10.1-cudnn7

ARG PACK=0
Expand All @@ -22,10 +22,11 @@ FROM nvidia/cuda:${CUDA_VER}-devel-${OS} AS builder

ARG OSNICK
ARG OS
ARG ARCH
ARG REDIS_VER
ARG CUDA_VER

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

ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
Expand All @@ -36,7 +37,7 @@ COPY --from=redis /usr/local/ /usr/local/
COPY ./opt/ opt/
COPY ./test/test_requirements.txt test/

RUN ./opt/readies/bin/getpy3
RUN PIP=1 FORCE=1 ./opt/readies/bin/getpy3
RUN ./opt/system-setup.py

ARG DEPS_ARGS=""
Expand All @@ -45,17 +46,24 @@ RUN if [ "$DEPS_ARGS" = "" ]; then ./get_deps.sh gpu; else env $DEPS_ARGS ./get_

ARG BUILD_ARGS=""
ADD ./ /build
RUN set -e ;\
RUN bash -c "set -e ;\
. ./opt/readies/bin/sourced ./profile.d ;\
make -C opt build GPU=1 $BUILD_ARGS SHOW=1
make -C opt build GPU=1 $BUILD_ARGS SHOW=1"

ARG PACK
ARG TEST

RUN mkdir -p bin/artifacts
RUN if [ "$PACK" = "1" ]; then make -C opt pack GPU=1; fi
RUN set -e ;\
if [ "$PACK" = "1" ]; then make -C opt pack GPU=1; fi

RUN if [ "$TEST" = "1" ]; then TEST= make -C opt test GPU=1 $BUILD_ARGS NO_LFS=1; fi
RUN set -e ;\
if [ "$TEST" = "1" ]; then \
TEST= make -C opt test GPU=1 $BUILD_ARGS NO_LFS=1 ;\
if [[ -d test/logs ]]; then \
tar -C test/logs -czf bin/artifacts/test-logs-gpu.tgz . ;\
fi ;\
fi

#----------------------------------------------------------------------------------------------
FROM nvidia/cuda:${CUDA_VER}-runtime-${OS}
Expand Down
9 changes: 5 additions & 4 deletions Dockerfile.gpu-test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BUILD redisfab/redisai:${VERSION}-gpu-${ARCH}-${OSNICK}-test

ARG REDIS_VER=6.0.1
ARG REDIS_VER=6.0.5

# OSNICK=bionic|centos7|centos6
ARG OSNICK=bionic
Expand Down Expand Up @@ -29,11 +29,12 @@ COPY --from=redis /usr/local/ /usr/local/
COPY ./opt/ opt/
COPY ./test/test_requirements.txt test/

RUN ./opt/readies/bin/getpy3
RUN ./opt/system-setup.py
RUN PIP=1 VENV=1 FORCE=1 ./opt/readies/bin/getpy3

RUN set -e ;\
python3 -m virtualenv venv --system-site-packages;\
python3 -m virtualenv venv --system-site-packages ;\
. venv/bin/activate ;\
python -m pip install pip==19.3.1 ;\
./opt/system-setup.py

ARG DEPS_ARGS=""
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ RedisAI currently supports PyTorch (libtorch), Tensorflow (libtensorflow), Tenso
| 0.3.1 | 1.1.0 | 1.12.0 | None | 0.4.0 |
| 0.4.0 | 1.2.0 | 1.14.0 | None | 0.5.0 |
| 0.9.0 | 1.3.1 | 1.14.0 | 2.0.0 | 1.0.0 |
| 1.0.0 | 1.5.0 | 1.15.0 | 2.0.0 | 1.2.0 |
| master | 1.5.0 | 1.15.0 | 2.0.0 | 1.2.0 |

Note: Keras and TensorFlow 2.x are supported through graph freezing. See [this script](https://github.com/RedisAI/RedisAI/blob/master/test/test_data/tf2-minimal.py) to see how to export a frozen graph from Keras and TensorFlow 2.x. Note that a frozen graph will be executed using the TensorFlow 1.15 backend. Should any 2.0 ops be not supported on the 1.15 after freezing, please open an Issue.
Expand Down
Loading