-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
docker/py/Dockerfile
Outdated
@@ -61,8 +61,12 @@ ENV RENKU_DISABLE_VERSION_CHECK 1 | |||
|
|||
ENV PATH=$HOME/.local/bin:$PATH | |||
|
|||
RUN pipx install --pip-args="--no-cache" renku && \ | |||
pipx inject --pip-args="--no-cache" renku sentry-sdk | |||
RUN mkdir -p $HOME/.local/bin && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user were to install renku as a library with pip install --user renku
- would the executable go to the same place? What happens in that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would overwrite it - bug or feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ie replace the symbolic link with the actual executable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes me think - should we give the user's version precedence, even without the --user flag? we could do this by appending $HOME/.local/bin
to the PATH rather than prepending it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think overwriting it and using the version coming from the pip install is what you would expect (then when you do import renku
it's importing the same code as the CLI is using). Anything else would be wrong. I just wasn't sure if it would throw an error of any kind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the user won't be able to install it without the --user flag... afaik
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right... at least not inside a running session. but by adding it to the project requirements.txt they can. In that case, conda will actually update the path again during the install and prepend its location, which makes the path look like
/opt/conda/bin:/opt/conda/condabin:/home/jovyan/.local/bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
which gives the conda-installed version precedence. I'd have the tendency to
- create the symbolic link to location where it won't be overwritten
- add this location to the end of the path such that user-installed renku versions always win.
wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
430207d
to
cafec1e
Compare
cafec1e
to
d0054c2
Compare
#187 changed where renku is installed. renku is now in either `$HOME/.renku/bin` or `/share/bin` (batch)
#187 changed where renku is installed. renku is now in either `$HOME/.renku/bin` or `/share/bin` (batch)
This PR is a reaction to a breaking change of setuptools which in turn broke our builds as pipx just pullst the latest of setuptools on a regular basis. We have therefore decided to remove pipx as it makes for non-reproducible builds.