Skip to content

Commit

Permalink
fix: use virtualenv manually instead of pipx for renku install
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Bleuler authored and ableuler committed Sep 9, 2021
1 parent 37143ec commit ba6cccc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
16 changes: 8 additions & 8 deletions docker/batch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ RUN apt-get update -y && \
apt-get purge && \
apt-get clean && \
apt autoremove --yes && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/*

RUN pip install pipx
# Install Renku python without pipx in a non-user location
RUN python3 -m pip install --no-cache pipenv
RUN virtualenv /share/.renku && \
. /share/.renku/bin/activate && \
pip install --no-cache renku && \
deactivate && \
ln -s /share/.renku/bin/renku /share/bin

# override default locations of pipx and app installation
ENV PIPX_BIN_DIR /share/bin
ENV PIPX_HOME /share/pipx
ENV PATH /share/bin:$PATH

# install renku-python
RUN pipx install --pip-args="--no-cache" renku

# inject entrypoint.sh
COPY --from=renku_base /entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
10 changes: 7 additions & 3 deletions docker/py/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,14 @@ RUN conda install gxx_linux-64 && \
# install renku-python
ENV RENKU_DISABLE_VERSION_CHECK 1

ENV PATH=$HOME/.local/bin:$PATH
ENV PATH=$PATH:$HOME/.renku/bin

RUN pipx install --pip-args="--no-cache" renku && \
pipx inject --pip-args="--no-cache" renku sentry-sdk
RUN mkdir -p $HOME/.renku/bin && \
virtualenv $HOME/.renku/venv && \
source $HOME/.renku/venv/bin/activate && \
pip install --no-cache renku sentry-sdk && \
deactivate && \
ln -s $HOME/.renku/venv/bin/renku $HOME/.renku/bin/renku

# configure git
COPY git-config.bashrc /home/$NB_USER/
Expand Down
3 changes: 2 additions & 1 deletion docker/py/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ jupyterlab-git==0.30.1
jupyterlab-system-monitor~=0.8.0
jupyterlab~=3.0.0
papermill~=2.3.0
pipx>=0.15.0.0
powerline-shell~=0.7.0
requests>=2.20.0
setuptools==57.5.0
virtualenv>=20.7.2

0 comments on commit ba6cccc

Please sign in to comment.