Hi, I wonder how to export dependencies as require...
# general
h
Hi, I wonder how to export dependencies as requirements.txt from a given PEX file. I do see the benefit of embedding deps as one single artifact. But for procedural reasons it's a bit rigid to ship an artifact along with the dependencies in some cases. I hope there is some support in PEX / Pants. Thanks!
f
hi! 🙂 is it possible that you may instead benefit from using a Python wheel? A wheel would include the Python sources from your project and a specification of the 3rd party requirements. When a wheel is installed, the source code it contains will be installed and the dependencies will be downloaded from the available origins (public or private PyPIs)
h
You can also use this option on
pex_binary
to leave off third-party deps 🙂 https://www.pantsbuild.org/docs/reference-pex_binary#codeinclude_requirementscode
🎯 1
h
Has there been any investigation on what produces the quickest docker build times and minimal images? Pex is nice because it's all packaged together, but it seems like what you save in dockerfile simplicity, you could potentially lose in the pex building stage. I've generally seen stuff be fast so not too much of a concern. Mostly just curious.