narrow-activity-1740501/24/2023, 11:28 AM
to a pex file? Some of our code depends on
- when I run
becomes false. But it seems that when I run
remains true. The same result with
🙂 Not sure how this is supposed to work... But I would like to turn on optimizations for production images based on pex files. Thanks for hints.
python -O file.pex
enough-analyst-5443401/24/2023, 4:28 PM
or else you install your PEX as a venv using pex-tools in your image, this works. You want to be doing the latter anyhow! For more on installing a PEX file in an image instead of just running it - which is not optimal in a number of dimensions - see: + https://pex.readthedocs.io/en/v2.1.121/recipes.html#pex-app-in-a-container + https://blog.pantsbuild.org/optimizing-python-docker-deploys-using-pants/
narrow-activity-1740501/25/2023, 9:15 AM
enough-analyst-5443401/25/2023, 10:41 AM
RUN PEX_TOOLS=1 PYTHON OPTIMIZE=1 ...
narrow-activity-1740501/25/2023, 10:44 AM
are still executed. The BUILD files were updated according to what you suggested. Any idea, please? 🙂 I also tried to work with a pex file without docker, but it is (obviously) the same.
and runs the code from sources?
enough-analyst-5443404/18/2023, 2:50 PM