re-using virtual environment (Linux) #3894
Replies: 2 comments 4 replies
-
The best solution for this is to have a single build of PETSc that can be reused between venvs. To do this you need to:
|
Beta Was this translation helpful? Give feedback.
-
Thanks a lot, looking at the virtual environment created this way (did not test yet), I see it has a size of about 1.9 GB instead of 6.4 GB. This is a huge improvement in light-weightedness! 👍 Anyway of pre-building and sharing any of those across virtual envs? |
Beta Was this translation helpful? Give feedback.
-
Thank you all for the fantastic work!
I am finding integrating firedrake to our group workflow slightly difficult.
We execute many projects per year and those that use python, and for the sake of reproducibility, each specify they requirements independently.
A new person working on the project, would clone the corresponding repository and create a local virtual environment using the given requirements.
For firedrake we provide a special script (basically get the install script and install).
Most of the python projects extend the functionality in the python virtual environment. That is they install other python tools on top of what firedrake already installs.
The issue is the following: if the user already has another project already using firedrake, how can they reuse the already existing virtual environment?
The naive answer is to just use the existing virtual env. However, if the new project installs more python dependencies or has version conflicts with other projects using the same firedrake virtual env, problems arise (firedrake arguments agaisnt Conda for a similar reason: it doesn't isolates well). In the former case the firedrake virtual env gets polluted (and updates become increasingly expensive), in the latter case the projects working env breaks.
A simple example
project2 pays the whole price and doesn't resuse builds from project1
Ideal workflow
So the questions :
Maybe you have other ideas/solutions!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions