I'm slowly starting to understand Pex a bit better...
# general
g
I'm slowly starting to understand Pex a bit better; and each time I do so I find new confusions. I've followed https://blog.pantsbuild.org/optimizing-python-docker-deploys-using-pants/ in our deployment flows at work. The article claims that setting
execution_mode="venv"
is optimal for Docker builds. However, that is a runtime setting -- not a build time setting. Since the guide then recommends explicitly constructing the
venv
as part of the Dockerfile step, discarding the pex itself, I'm wondering if that is actually completely pointless to specify? Or does
pex --include-tools -o some.pex ; PEX_TOOLS=1 ./some-pex venv
change behavior if
--venv
was added when building the pex? It seems like it wouldn't, it just specifies that would be the default behavior?
👀 1