Skip to content

Commit 310f7d7

Browse files
author
DvirDukhan
committed
Merge branch 'lite_build' of https://github.com/RedisAI/RedisAI into lite_build
2 parents b52bc50 + c2509f2 commit 310f7d7

File tree

90 files changed

+4829
-3034
lines changed

Some content is hidden

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

90 files changed

+4829
-3034
lines changed

.circleci/config.yml

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ commands:
1919
circleci step halt
2020
fi
2121
22+
abort_for_noci:
23+
steps:
24+
- run:
25+
name: Ignore CI for specific branches
26+
command: |
27+
if [[ $CIRCLE_BRANCH == *noci ]]; then
28+
echo "Identifies as actively ignoring CI, no testing required."
29+
circleci step halt
30+
fi
31+
32+
2233
early_return_for_forked_pull_requests:
2334
description: >-
2435
If this build is from a fork, stop executing the current job and return success.
@@ -40,8 +51,8 @@ commands:
4051
sudo apt-get -qq update
4152
sudo apt-get -q install -y git openssh-client curl ca-certificates make tar gzip
4253
bash <(curl -fsSL https://get.docker.com)
43-
- setup_remote_docker:
44-
docker_layer_caching: true
54+
# - setup_remote_docker:
55+
# docker_layer_caching: true
4556

4657
relocate-docker-storage:
4758
steps:
@@ -84,6 +95,7 @@ commands:
8495
type: string
8596
steps:
8697
- abort_for_docs
98+
- abort_for_noci
8799
- checkout-all
88100
- restore_cache:
89101
keys:
@@ -129,18 +141,22 @@ commands:
129141
platforms-build-steps:
130142
steps:
131143
- abort_for_docs
144+
- abort_for_noci
145+
- early_return_for_forked_pull_requests
132146
- checkout-all
133147
- relocate-docker-storage
134148
- setup-automation
135149
- run:
136150
name: Build for platform
137151
command: |
138152
pushd opt/build/docker
153+
docker login -u redisfab -p $DOCKER_REDISFAB_PWD
139154
for osnick in bionic xenial; do
140-
make CPU=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build
141-
make CPU=1 LITE=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build
142-
make GPU=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build
143-
make GPU=1 LITE=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build
155+
make CPU=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build publish
156+
make GPU=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build publish
157+
make CPU=1 LITE=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build publish
158+
make GPU=1 LITE=1 OSNICK=$osnick ARTIFACTS=1 VERBOSE=1 build publish
159+
docker image prune -f
144160
done
145161
popd > /dev/null
146162
logstar=bin/artifacts/tests-logs-cpu.tgz
@@ -149,18 +165,6 @@ commands:
149165
if [[ -e $logstar ]]; then tar -C $logsdir -xzf $logstar; fi
150166
(cd bin/artifacts; tar -cf snapshots.tar snapshots/)
151167
no_output_timeout: 40m
152-
- early_return_for_forked_pull_requests
153-
- run:
154-
name: Build for platform (publish)
155-
command: |
156-
docker login -u redisfab -p $DOCKER_REDISFAB_PWD
157-
cd opt/build/docker
158-
for osnick in bionic xenial; do
159-
make CPU=1 OSNICK=$osnick VERBOSE=1 publish
160-
make CPU=1 LITE=1 OSNICK=$osnick VERBOSE=1 publish
161-
make GPU=1 OSNICK=$osnick VERBOSE=1 publish
162-
make GPU=1 LITE=1 OSNICK=$osnick VERBOSE=1 publish
163-
done
164168
- persist_to_workspace:
165169
root: bin/
166170
paths:
@@ -176,6 +180,7 @@ commands:
176180
type: string
177181
steps:
178182
- abort_for_docs
183+
- abort_for_noci
179184
- early_return_for_forked_pull_requests
180185
- run:
181186
name: Deploy to S3
@@ -188,6 +193,8 @@ jobs:
188193
docker:
189194
- image: redislabsmodules/llvm-toolset:latest
190195
steps:
196+
- abort_for_docs
197+
- abort_for_noci
191198
- checkout-all
192199
- setup-build-system
193200
- run:
@@ -202,12 +209,14 @@ jobs:
202209
- build-steps:
203210
platform: debian
204211

212+
# this build runs on a fixed machine, due to a storage need
213+
# nothing about it necessitates the machine itself, other than the need for more disk.
205214
platforms-build:
206215
machine:
207216
enabled: true
208217
docker_layer_caching: true
209-
resource_class: gpu.nvidia.small
210-
image: ubuntu-1604-cuda-11.1:202012-01
218+
resource_class: medium
219+
image: ubuntu-2004:202101-01
211220
steps:
212221
- platforms-build-steps
213222

@@ -216,6 +225,7 @@ jobs:
216225
- image: redisfab/rmbuilder:6.2.1-x64-buster
217226
steps:
218227
- abort_for_docs
228+
- abort_for_noci
219229
- checkout-all
220230
- restore_cache:
221231
keys:
@@ -247,6 +257,7 @@ jobs:
247257
- image: redisfab/rmbuilder:6.2.1-x64-buster
248258
steps:
249259
- abort_for_docs
260+
- abort_for_noci
250261
- checkout-all
251262
- restore_cache:
252263
keys:
@@ -276,8 +287,9 @@ jobs:
276287
docker:
277288
- image: redisfab/rmbuilder:6.2.1-x64-buster
278289
steps:
279-
- early_return_for_forked_pull_requests
280290
- abort_for_docs
291+
- abort_for_noci
292+
- early_return_for_forked_pull_requests
281293
- checkout-all
282294
- restore_cache:
283295
keys:
@@ -347,6 +359,7 @@ jobs:
347359

348360
steps:
349361
- abort_for_docs
362+
- abort_for_noci
350363
- checkout-all
351364
- run:
352365
name: Relocate docker overlay2 dir
@@ -378,6 +391,7 @@ jobs:
378391
- image: redisfab/rmbuilder:6.2.1-x64-buster
379392
steps:
380393
- abort_for_docs
394+
- abort_for_noci
381395
- early_return_for_forked_pull_requests
382396
- attach_workspace:
383397
at: workspace
@@ -395,6 +409,7 @@ jobs:
395409
- image: redisfab/rmbuilder:6.2.1-x64-buster
396410
steps:
397411
- abort_for_docs
412+
- abort_for_noci
398413
- early_return_for_forked_pull_requests
399414
- attach_workspace:
400415
at: workspace
@@ -418,6 +433,7 @@ jobs:
418433
- image: redisfab/rmbuilder:6.2.1-x64-buster
419434
steps:
420435
- abort_for_docs
436+
- abort_for_noci
421437
- early_return_for_forked_pull_requests
422438
- attach_workspace:
423439
at: workspace
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.

.github/workflows/trigger-build-and-test-gpu.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
pull_request:
66
types:
77
- labeled
8+
- synchronize
9+
- assigned
810

911
jobs:
1012
valgrind_general:

.github/workflows/trigger-valgrind.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
pull_request:
66
types:
77
- labeled
8+
- synchronize
9+
- assigned
810

911
jobs:
1012
valgrind_general:

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ WORKDIR /build
2929
COPY --from=redis /usr/local/ /usr/local/
3030

3131
COPY ./opt/ opt/
32-
COPY ./tests/flow/test_requirements.txt tests/flow/
32+
ADD ./tests/flow/ tests/flow/
3333

3434
RUN FORCE=1 ./opt/readies/bin/getpy3
3535
RUN ./opt/system-setup.py
@@ -67,7 +67,7 @@ ARG REDIS_VER
6767
ARG PACK
6868

6969
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
70+
RUN if [ ! -z $(command -v yum) ]; then yum install -y libgomp; fi
7171

7272
ENV REDIS_MODULES /usr/lib/redis/modules
7373
ENV LD_LIBRARY_PATH $REDIS_MODULES

Dockerfile.arm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ WORKDIR /build
3131
COPY --from=redis /usr/local/ /usr/local/
3232

3333
COPY ./opt/ opt/
34-
COPY ./tests/flow/test_requirements.txt tests/flow
34+
COPY ./tests/flow/tests_setup/test_requirements.txt tests/flow
3535

3636
RUN ./opt/readies/bin/getpy3
3737
RUN ./opt/system-setup.py

Dockerfile.gpu

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ ARG TEST=0
1818

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

2423
ARG OSNICK
@@ -35,13 +34,10 @@ ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
3534
WORKDIR /build
3635
COPY --from=redis /usr/local/ /usr/local/
3736

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
37+
RUN echo export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda-11.0/lib64:$LD_LIBRARY_PATH > /etc/profile.d/cuda.sh
4238

4339
COPY ./opt/ opt/
44-
COPY ./tests/flow/test_requirements.txt tests/flow/
40+
ADD ./tests/flow/ tests/flow/
4541

4642
RUN FORCE=1 ./opt/readies/bin/getpy3
4743
RUN ./opt/system-setup.py
@@ -75,13 +71,12 @@ FROM nvidia/cuda:${CUDA_VER}-runtime-${OS}
7571
ARG OS
7672

7773
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
74+
RUN if [ ! -z $(command -v yum) ]; then yum install -y libgomp; fi
7975

8076
ENV REDIS_MODULES /usr/lib/redis/modules
8177
RUN mkdir -p $REDIS_MODULES/
8278

8379
COPY --from=redis /usr/local/ /usr/local/
84-
COPY --from=builder /usr/local/cuda-10.2 /usr/local/cuda-10.2
8580
COPY --from=builder /usr/lib/x86_64-linux-gnu/libcu* /usr/lib/x86_64-linux-gnu/
8681
COPY --from=builder /build/install-gpu/ $REDIS_MODULES/
8782

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ WORKDIR /build
3838
COPY --from=redis /usr/local/ /usr/local/
3939

4040
COPY ./opt/ opt/
41-
COPY ./tests/flow/test_requirements.txt tests/flow/
41+
COPY ./tests/flow/tests_setup/test_requirements.txt tests/flow/
4242

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

0 commit comments

Comments
 (0)