-
Notifications
You must be signed in to change notification settings - Fork 181
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
Simplifying Python installation scripts and rename install_binder.sh
to install_jupyter.sh
#494
Conversation
…on-proxy for Binder
and remove unwanted installations from install_python script
Thanks, I agree with the motivation here, but need a bit more time to review and maybe anticipate if there's any particularly adverse consequences. In general it makes sense to allow other tools (like I'm not sure pyenv was ever a great choice, but as these scripts show it's not all that straight forward to get pyenv+pipenv set up so that a user can easily switch between different versions of python. The route Meanwhile, I support the changes here, and I think we can add more documentation and maybe helper scripts where appropriate to deal with the many edge cases (including those annoying BLAS issues). thanks for the great work here! |
In my opinion, users who need such complex configurations will have to learn how to configure conda (mamba), pyenv, pipenv or poetry themselves anyway. I think the configuration would be far simpler if the final user account installed pyenv, etc. as needed, as installing these tools by the root user and share them is definitely complicating things here. |
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.
ok, finished going through this. Much more streamlined, let's merge and we can flush out the documentation (or point to better sources for doing so) down the road.
My one on-the-fence comment is whether we should also just go ahead and update-alternatives
to standard BLAS to avoid the reticulate-crash on numpy, or if that should just go in docs?
Thanks for checking this.
I do not fully understand how numpy crashes can be reproduced. |
Re BLAS, there's a user-reported reprex here: rstudio/reticulate#1133 |
Thank you for letting me know that. export ARCH=$(uname -m)
update-alternatives --set "libblas.so.3-${ARCH}-linux-gnu" "/usr/lib/${ARCH}-linux-gnu/blas/libblas.so.3" |
Thanks @eitsupi . Do you think it would be too aggressive to set the alternatives by default, with documentation stating why we do this and how to switch it back on? I think it kinda makes sense that the default behavior "just works" and the docs cover the optional configuration that may improve performance. Particularly given that the segfault in this case gives very little information that would point a user to BLAS (though that might change if (ps I think the notes should also include |
Since |
yup, I think it would be good to add that in install_python.sh I don't think this issue impacts jupyter/ binder users, but yeah anywhere reticulate it used, switching back to default BLAS/LAPACK is probably the best default in my opinion. (I don't really understand why the numpy libraries can't be pluggable to BLAS in this regard; I've never encountered this issue with R package binaries crashing because they were built on a system with a different BLAS, but that's above my scope! Dirk understands these things much better) |
I added lines for switching BLAS in f4c2347 |
Awesome, thanks. good to merge I think! 🎉 |
close #443, close #484, close #495
Remove pyenv and venv related settings and unnecessary lines from Python related scripts and Dockerfiles.
Motivation
As for why
install_python.sh
usespyenv
, therocker/ml
description says:However, the
greta
package recommends setting up a Python environment using conda as follows.https://greta-stats.org/articles/get_started.html
I think the current Python configuration is overly complex.
And instead of trying to cover a wide variety of Python setups with defaults (maybe not possible), I think default settings should be kept to a minimum and left to the user to configure.
As far as I know, some users use Docker to escape the complexity of Python configuration (i.e., they don't want to bother with venv and pyenv even in a Docker container).
ToDo
rocker/cuda
's usage website#54)