Hey all! I’m migrating a repo to pants at the mome...
# general
s
Hey all! I’m migrating a repo to pants at the moment and had a question about Python dependencies. I have moved all our dependencies to 3rdparty/python/requirements.txt, but I need to install dependencies in a docker image for one of my components. The relevant dependencies need to be in the image, not part of a .pex file. I’ve tried using
pants dependencies
and
pants peek
but these don’t seem to do what I need. Is there a recommended way to achieve this?
b
A common approach (e.g. the one we use, and it works well) is to use a PEX as a vehicle for manipulating the dependencies, but unpack it all to a normal venv within the image: https://blog.pantsbuild.org/optimizing-python-docker-deploys-using-pants/
s
that’s awesome, thanks!