Shared python environment on network? #281
Replies: 3 comments 2 replies
-
I think most people try to isolate the python env being used at least on the physical host if not even in the individual worker dirs. Have you seen conda pack? A lot of people are using that to help get python shipped out to the workers...otherwise, there used to be these pre-compiled wheels for python on windows that you can use to build a portable python distro (yuck!). @mnfienen probably has the scoop on the last and greatest approach... |
Beta Was this translation helpful? Give feedback.
-
hey @RyanConway91 - I've done both approaches ... sharing an env across a network and distributing it via copies. In both cases, I highly recommend using conda pack to zip up your conda/mamba made env. Then, you can either unzip it on each worker or path to it. But....rather than calling the activate.bat script (I agree, in your original post, that sounds like an issue), you can unzip the conda pack directory in a central location and just add |
Beta Was this translation helpful? Give feedback.
-
My approach is to (re)create a Python virtual environment for each of my agent with
Like this, every agent is independent. |
Beta Was this translation helpful? Give feedback.
-
I recently tried using a shared network python environment for a PESTPP run across an in-house compute pool (~12 servers). I use:
CALL"X:\X\X\python_env\Scripts\activate.bat" at the start of a .bat that launches all my workers on each machine. It seems to work fine, but randomly some runs fail with a python error (the error I have seen is something about matplotlib not getting a lock on some library). I set up PESTPP to try to rerun failed runs, and all failed runs were re-ran successfully, so I am guessing this error is from having so many workers (~300) calling the python environment at the same time.
So I think I like this approach, it is much easier to make one python environment on the network rather than clone a venv all over my compute pool. Anyone aware of any risks in doing this?
Beta Was this translation helpful? Give feedback.
All reactions