https://pantsbuild.org/ logo
#general
Title
# general
p

plain-sundown-25537

06/24/2021, 8:24 PM
Hi! This is a PEX problem - is it possible to get a python process to load the venv which defined by a PEX (better to use the same procrss). Example application is Ray.io lib wheee we want the remote workers the load Venv packaged in a PEX
h

happy-kitchen-89482

06/25/2021, 12:52 AM
Not sure what you mean by "load a venv"?
PEX can optionally splat itself out into a venv and run from there, if that is helpful
p

plain-sundown-25537

06/25/2021, 2:15 PM
That is a good starting point - load an env - what I meant is given a python process and an PEX, “replace” the particular python process venv with the one defined in PEX, ideally - or spinning a new worker/process with the PEX as venv. Is there something I can read?
h

happy-kitchen-89482

06/25/2021, 2:20 PM
The pex venv is created in some "secret" helper location, I'm not sure if there's a way to create one at a location of your choice
This is an optimization for multiple runs of the same pex
👍 1
future runs will reuse the same venv
p

plain-sundown-25537

06/27/2021, 7:46 AM
What is the process to dropping a python process into the context of PEX - I remember before we had a boostrap process that can do that (load a pex)
2 Views