Should I include secondary dependencies in my conda environment.yml?

Viewed 90

Ok, longtime JS dev, psuedo-new Python dev here. I've been using conda for a while in my team's repo, and I'm confused about some dependency behavior. I'm unsure if this is best-practice, but we're including secondary dependencies in our environment.yml.

In Node.js land, you obviously don't do this, and Node knows to take care of this (by installing as many copies of each secondary dep as needed), thus the ~8TB node_modules everyone has. Conda on the other hand, seems to only allow a single copy of each dep in your ~/opt/pkgs/ (if you're on a Mac, ~/anaconda/pkgs/ on Windows), which really throws a wrench through the windshield if you have different dependencies with hard requirements for certain versions.

So, my main question is: should I include all dependencies I have (top-level, secondary, so on) in my environment.yml? What are best practices here?

My second question is why does Conda resolve dependencies this way? Everyone one has massive hard drives, I haven't met a hard drive in the last decade that couldn't handle two different copies of one dependency.

Thanks in advance, any resources/help/opinions/insults are all appreciated.

0 Answers
Related