Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use virtualenv manually instead of pipx for renku install #187

Merged
merged 1 commit into from
Sep 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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