Skip to content

Commit f7bd76a

Browse files
committed
Using opencv-python-headless Python library for Docker
1 parent e63d08d commit f7bd76a

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
### Features / Enhancements
66

7+
- Update dashboards for Grafana 8.2 #9
8+
9+
### Bugfix
10+
11+
- Using opencv-python-headless Python library for Docker
12+
713
## v1.2.0 (2021-08-18)
814

915
### Features / Enhancements

Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,14 @@ ARG MODULES=/var/opt/redislabs/lib/modules
88
ARG RG=${MODULES}/redisgears.so
99
ARG REDIS="redis-server --loadmodule ${RG} Plugin /var/opt/redislabs/modules/rg/plugin/gears_python.so"
1010

11-
ARG DEPS="python3-opencv"
1211
ARG REQ="numpy \
1312
Pillow \
14-
opencv-python"
13+
opencv-python-headless"
1514

1615
# Set up a build environment
1716
WORKDIR /data
1817
RUN set -ex;\
19-
deps="$DEPS";\
20-
apt-get update;\
21-
apt-get install -y --no-install-recommends $deps;
18+
apt-get update;
2219

2320
# Copy RedisTimeSeries
2421
COPY --from=redistimeseries ${LD_LIBRARY_PATH}/*.so ${LD_LIBRARY_PATH}/
@@ -28,7 +25,7 @@ COPY --from=redisai ${LD_LIBRARY_PATH}/redisai.so ${LD_LIBRARY_PATH}/
2825
COPY --from=redisai ${LD_LIBRARY_PATH}/backends ${LD_LIBRARY_PATH}/backends
2926

3027
# Start Redis and install Deps
31-
RUN nohup bash -c "${REDIS}&" && sleep 4 && redis-cli RG.PYEXECUTE "GearsBuilder().run()" REQUIREMENTS $REQ \
28+
RUN nohup bash -c "${REDIS}&" && sleep 4 && redis-cli RG.PYEXECUTE "import cv2; GearsBuilder().run()" REQUIREMENTS $REQ \
3229
&& redis-cli save
3330

3431
ENTRYPOINT ["redis-server"]

0 commit comments

Comments
 (0)