Skip to content

Commit

Permalink
installation: untar libzmq in venv folder instead of /usr/local
Browse files Browse the repository at this point in the history
- on a linux-host docker build, the user can't write to /usr/local and installing pyzmq fails
- normal installation also changed because it's sensible to have all pyzmq dependencies in the venv
- jukebox.Dockerfile: removing ZMQ_PREFIX=${PREFIX} since PREFIX variable doesn't exist in docker environment
- jukebox.Dockerfile: use ENV to set ZMQ_DRAFT_API
  • Loading branch information
notapirate committed Mar 20, 2024
1 parent cfd72b2 commit 227795b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docker/jukebox.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ RUN pip install --no-cache-dir -r ${INSTALLATION_PATH}/requirements.txt

ENV ZMQ_TMP_DIR libzmq
ENV ZMQ_VERSION 4.3.5
ENV ZMQ_PREFIX /usr/local
ENV ZMQ_PREFIX ${VIRTUAL_ENV}
ENV ZMQ_DRAFT_API 1

RUN [ "$(uname -m)" = "aarch64" ] && ARCH="arm64" || ARCH="$(uname -m)"; \
wget https://github.com/pabera/libzmq/releases/download/v${ZMQ_VERSION}/libzmq5-${ARCH}-${ZMQ_VERSION}.tar.gz -O libzmq.tar.gz; \
tar -xzf libzmq.tar.gz -C ${ZMQ_PREFIX}; \
rm -f libzmq.tar.gz;

RUN export ZMQ_PREFIX=${PREFIX} && export ZMQ_DRAFT_API=1
RUN pip install -v --no-binary pyzmq pyzmq

EXPOSE 5555 5556
Expand Down
2 changes: 1 addition & 1 deletion installation/routines/setup_jukebox_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Constants
JUKEBOX_ZMQ_TMP_DIR="${HOME_PATH}/libzmq"
JUKEBOX_ZMQ_PREFIX="/usr/local"
JUKEBOX_ZMQ_PREFIX="${VIRTUAL_ENV}"
JUKEBOX_ZMQ_VERSION="4.3.5"

JUKEBOX_PULSE_CONFIG="${HOME_PATH}"/.config/pulse/default.pa
Expand Down

0 comments on commit 227795b

Please sign in to comment.