calm-alarm-89082
11/15/2021, 5:20 PMcalm-alarm-89082
11/15/2021, 5:21 PMhundreds-father-404
11/15/2021, 5:47 PMexecution_mode
field also? https://www.pantsbuild.org/v2.8/docs/reference-pex_binary#codeexecution_modecodevictorious-hamburger-92357
11/15/2021, 5:51 PMwitty-crayon-22786
11/15/2021, 6:02 PMvenv
mode creates the venv, it becomes “just a venv”witty-crayon-22786
11/15/2021, 6:03 PMwitty-crayon-22786
11/15/2021, 6:03 PMenough-analyst-54434
11/15/2021, 6:07 PM--venv
mode PEX file and run `PEX_TOOLS=1 ./my.pex venv create/venv/here`That would allow you to use the PEX to eliminate PEX in a Dockerfile RUN step. Once you do so, there will be a create/venv/here/pex
file that can be executed just as if it were the original PEX file.enough-analyst-54434
11/15/2021, 6:10 PMCOPY my.pex /my.pex
RUN PEX_TOOLS=1 /my.pex venv /my && \
rm /my.pex
ENTRYPOINT ["/my/pex"]
enough-analyst-54434
11/15/2021, 6:13 PM/my
will be a standard venv and /my/pex
will be a script at its root (not in /my/bin/
) that runs just like the original /my.pex
file would have. This mode of container setup avoids the startup overhead of the /my.pex
--venv
PEX file turning itself into a venv automatically on 1st run; i.e.: You turn venv creation into an image build time step instead of a just-in-time runtime step.ancient-france-42909
11/15/2021, 6:22 PMenough-analyst-54434
11/15/2021, 6:26 PMenough-analyst-54434
11/15/2021, 6:28 PMcalm-alarm-89082
11/15/2021, 9:01 PM