Hi @andrew1, sorry I didnāt see this thread earlier. For what itās worth, I have a very opinionated answer to your question.
You are making a few common mistakes due to IMO lack of documentationā¦
- Youāre mixing the
anaconda
channel (managed by Continuum Analytics) with the conda-forge
channel (community managed). Namely you are using the continuumio/anaconda3
Docker image, which comes preinstalled with several hundred MB of conda packages from the anaconda
channel, and then installing pymc3
from the conda-forge
channel. This is a recipe for conflicts. Since the current versions of PyMC3 on conda-forge
and anaconda
are 3.11.2 and 3.8 respectively, I would recommend using conda-forge
, and thus choosing a different Docker image.
- Youāre using the
conda
command, which uses an incredibly slow and outdated solver. For any package with complex dependencies like PyMC3, you will be waiting potentially several hours for the conda
solver to complete. I highly recommend switching to mamba
, which is effectively a drop-in replacement for conda
with a much, much, much better solver.
With all that said, IMO if you are using the tools correctly, then conda-forge
should transparently handle all the dependency management issues for you. In case it does not work, and there is some problem with the resulting installation, then there is a bug in the recipe. (Indeed this is often the case.) For such a bug, it should be reported on the PyMC3 conda-forge feedstock, so that we can fix it.
Finally, my recommendation for your Dockerfile is
FROM condaforge/mambaforge:4.10.1-0
RUN mamba install pymc3
These āmistakesā regarding mixing of channels and using conda
instead of mamba
are extremely, extremely common. I know, because I made them myself not so long ago. And if everyoneās always making the same mistakes, that indicates to me that thereās a documentation problem.
Regarding the documentation, in particular wrt mamba, I have already raised the issue a few months ago on the conda-forge gitter. The upshot seems to be that there is support for improving the documentation, and there is an ongoing project, so hopefully things will improve soon. If you are so inclined, Iād encourage you to share your experience on Gitter, in particular regarding how the documentation could be improved.
Regarding the mixing of channels, I think a bit of the difficulty is that conda-forge
and Continuum IO are distinct entities. Even though there is perhaps some ācompetitionā between the two, Continuum hosts the massive conda-forge
package library. The relationship seems to be very symbiotic, but personally I found it quite confusing at first.
I hope that helps to explain the situation a bit. Best of luck, and please let me know if I can be of further help.