anaconda / anaconda-project

Tool for encapsulating, running, and reproducing data science projects
https://anaconda-project.readthedocs.io/en/latest/
Other
217 stars 88 forks source link

Allow one to use `--override-channels` for reproducibility. #336

Closed mforbes closed 2 years ago

mforbes commented 2 years ago

Since the goal of anaconda-project is reproducibility, would it not make sense that --override-channels be allowed so that channels are specified precisely in anaconda-project.yml and not sullied by global config files? It seems that perhaps this should even be the default behavior.

I am running into a problem on CoCalc where I am trying to use anaconda-project to initialize an environment. The problem is that the base conda environment has a .condarc with a large list of channels such that anaconda-project prepare runs out of memory (limited to 1GB by default for small projects). I have the same issue with conda env create which is thwarted by the inability of this command to accept --override-channels (I am using pip packages too, so conda env create is kind of needed):

Briefly looking at the code, it seems that it would be pretty easy to add the --override-channels flag so that the channels can be completely (and reproducibly) specified in the anaconda-project.yaml file. This would allow anaconda-project to bypass these conda issues providing a more reproducible alternative to conda env create.

AlbertDeFusco commented 2 years ago

I see, good catch. I've got a streamlined Conda invocation in #352 where I think we can include this fix and tests as well.

AlbertDeFusco commented 2 years ago

This is fixed by #352