Skip to content

Commit

Permalink
Replacing redis-server with redis-py
Browse files Browse the repository at this point in the history
  • Loading branch information
jordancaraballo committed Jan 18, 2024
1 parent 84d261c commit d94af0c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docker/ilab-base/Dockerfile.ilab-base
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ RUN python -m pip install Pysal
RUN python -m pip install PyYAML
RUN python -m pip install rasterio
RUN python -m pip install redis
RUN python -m pip install redis-server
#RUN python -m pip install redis-server
RUN python -m pip install redis-py
RUN python -m pip install requests
RUN python -m pip install rioxarray
RUN python -m pip install scikit-image
Expand All @@ -93,15 +94,15 @@ RUN python -m pip cache purge

# Add redis-server binary to /usr/local/bin
# export pyVer=`python --version | awk -F' ' '{print $2}' | awk -F'.' '{print $1"."$2}'`
RUN ln -sf /usr/local/lib/python3.8/dist-packages/redis_server/bin/redis-server /usr/local/bin/redis-server
# RUN ln -sf /usr/local/lib/python3.8/dist-packages/redis_server/bin/redis-server /usr/local/bin/redis-server

# 3/11/22 modified by Caleb for verson 2.0.0 for testing of 2 lines below
# 5/4/22 Testing passed. nepac and.. app containers also passed so making this ilab-base-3.3.3-v2 the new production version 2.
# Setup redis-server daemon. Sets REDIS_PORT env variable for celery-based applications to reference the correct redis port at run-time.
# echo "export REDIS_PORT=\"\$(python -c 'import socket; s = socket.socket(); s.bind((\"\", 0)); print(s.getsockname()[1]); s.close();')\"" > $REDIS_FILE
RUN echo "redis-server --daemonize yes --port \$REDIS_PORT" >> $REDIS_FILE;
RUN echo "export SINGULARITYENV_REDIS_PORTS=\$REDIS_PORT" >> $REDIS_FILE;
RUN chmod +x $REDIS_FILE;
# RUN echo "redis-server --daemonize yes --port \$REDIS_PORT" >> $REDIS_FILE;
# RUN echo "export SINGULARITYENV_REDIS_PORTS=\$REDIS_PORT" >> $REDIS_FILE;
# RUN chmod +x $REDIS_FILE;

# TODO: Automate REDIS life-cycle.
### %runscript
Expand All @@ -113,4 +114,4 @@ RUN chmod +x $REDIS_FILE;
### #/bin/bash -c "export REDIS_PORT=6379"
### exec /bin/bash -c "source /etc/profile.d/redis_server.sh"
###
### %test
### %test

0 comments on commit d94af0c

Please sign in to comment.