I'm trying to follow the best practice of installing fully pinned dependencies (for repeatable builds and better Docker caching, see this pythonspeed.com article).
My project needs to use both conda and pip (conda for complex ML packages, pip for stuff not available on conda). The conda-lock and pip-compile tools are able to generate all transitive dependencies at pinned versions. However, these tools are independent: when I run pip-compile, it's not aware of the dependencies that conda-lock wants to install, and vice versa.
This results in different package versions, causing wasted space in the Docker image and potentially causing breakage/incompatibility, as the pip install
step installs different versions of some transitive dependencies.
Does anyone have a better solution for creating pinned Python dependency lists when using both conda and pip?
(Edit: here's a github ticket on conda-lock to support pip dependencies: https://github.com/conda-incubator/conda-lock/issues/4)