is there a way to call any files that are inside o...
# general
b
is there a way to call any files that are inside of the pex binary? like running a script that access files inside of the pex bundle
context is that
python_sources
cannot be added to
docker_image
target
c
This post is packed with useful information on pex:es and docker https://blog.pantsbuild.org/optimizing-python-docker-deploys-using-pants/
r
You can use PEX_MODULE
Copy code
PEX_MODULE=<module> (python) custom.pex
Not sure if you need python in the middle or not.
magic 1
All this magic is mentioned here
b
the blog post is very valid for python scripts. not for running a CLI like streamlit
assuming that the entrypoint is a python file, it works. but if the entrypoint is a module, then it gives a module not found. my limited python knowledge is not helping on this
r
what do you mean by file and module? In python world, module is a file.
e
This sounds similar to the OpenTelemetry case. @breezy-apple-27122 it would probably be best to file an issue pared down as much as possible, with links to what you're talking about. I.E.: what is a "streamlit" and what command lines are you running, etc. For reference - @famous-xylophone-36532 and I worked through this same sort of jungle here: https://github.com/pantsbuild/pex/issues/2065 He was kind enough to whip up an example repo demonstrating the problem.