I've got a PEX generated by Pants, which is gettin...
# general
a
I've got a PEX generated by Pants, which is getting periodically launched by a launcher of some description, and appears to be bootstrapping itself into a new directory in
/tmp
on every launch. When do PEXes get extracted into
/tmp
, and is there a way to reuse the bootstrap across multiple launches?
r
I think you can define a fixed location using
PEX_ROOT
https://pex.readthedocs.io/en/v2.1.155/api/vars.html#PEX_ROOT
a
And if PEX root isn't set, it uses tmp instead of ~/.pex?
r
You might also need to set
PEX_VENV
To reuse PEX_ROOT https://pex.readthedocs.io/en/v2.1.155/api/vars.html#PEX_ROOT
Are you using AWS lambda? I had tmp issues there
a
No, it's a cron job running in a docker container for various reasons
b
I think it falls back to a temporary directory if the default
~/.pex
path (or whatever it is) isn't writeable. It may log some info about this, although you may need to set
PEX_VERBOSE=1
or something higher to see it
a
Right. I think I can debug that