RedisGears / EdgeRealtimeVideoAnalytics

An example of using Redis Streams, RedisGears, RedisAI and RedisTimeSeries for Realtime Video Analytics (i.e. counting people)
https://redisgears.io
Apache License 2.0
397 stars 69 forks source link

redislabs/redisedge:latest is very old , info modules shows invalid versions and various other issues #31

Open karanveersingh5623 opened 4 years ago

karanveersingh5623 commented 4 years ago

Hi , tried changing the Dockerfile under redisedge folder , below are the contents , one of the issues is python3 virtual environment is not getting picked up when running RG.PYEXECUTE gears in init.py .

` FROM redislabs/redismod:latest

ENV DEPS "python python3-pip python3-setuptools libglib2.0-0 libsm6 libxrender1 libxext6 libgomp1" RUN set -ex; \ apt-get update; \ apt-get install -y --no-install-recommends $DEPS;

RUN set -ex; \ pip3 install -U pipenv;

ADD ./requirements.txt /tmp/requirements.txt RUN set -ex; \ cd /var/opt/redislabs/modules/rg/python3; \ pipenv run pip3 install -r /tmp/requirements.txt;

ADD ./redisedge.conf /usr/local/etc/redisedge.conf

CMD ["/usr/local/etc/redisedge.conf"]`

Below is the error trace of init.py docker container logs

$ docker logs 6b01e31dea1e Loading model - b'OK' Loading script - b'OK' Creating timeseries keys and downsampling rules - [b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK', b'OK'] Traceback (most recent call last): File "init.py", line 72, in <module> res = conn.execute_command('RG.PYEXECUTE', gear) File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 775, in execute_command return self.parse_response(connection, command_name, **options) File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 789, in parse_response response = connection.read_response() File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 642, in read_response raise response redis.exceptions.ResponseError: ['Traceback (most recent call last):\n', ' File "<string>", line 3, in <module>\n', "ModuleNotFoundError: No module named 'cv2'\n"]

karanveersingh5623 commented 4 years ago

Also with building up with docker-compose , below is the trace seen for redisedge Dockerfile `Step 6/8 : RUN set -ex; cd /var/opt/redislabs/modules/rg/python3; pipenv run pip3 install -r /tmp/requirements.txt; ---> Running in bf49cce7aa5f

✔ Successfully created virtual environment! Virtualenv location: /root/.local/share/virtualenvs/python3-AuMyyDKG Creating a Pipfile for this project...`