Trouble Building PyMC Docker Image on Windows

Hi!
It seems bash scripts/docker_container.sh build calls for building an image using the Dockerfile and inside the Dockerfile step 3 is the following:

RUN mamba env create -f environment-dev.yml && \
    /bin/bash -c ". activate pymc-dev && \
    mamba install -c conda-forge -y pymc" && \
    conda clean --all -f -y

This tries to create an environment using the environment-dev.yml file.

In turn, the environment-dev.yml file specifies that
- git+https://github.com/pymc-devs/pymc-sphinx-theme
should be installed, and this requires GIT.

The starting image jupyter/base-notebook:python-3.9.12 has not git installed, so the process fails.

Unfortunately, it seems the starting image also does not give sudo/root permission to adding a simple “RUN apt update;apt install git” inside the Dockerfile won’t suffice either.

Assuming that you just want to run the following Build documentation locally — PyMC 5.10.3 documentation, my workaround would be to just run a docker image with conda such as continuumio/miniconda3 and try from there.

Something like:

git clone https://github.com/pymc-devs/pymc.git
cd pymc
docker run -it -v $(pwd):/workspace continuumio/miniconda3 bash

Then inside the docker:

cd workspace
conda env create -f conda-envs/environment-docs.yml  

And then go on with the rest of the guide (pip install -e… etc.)

Note: conda install -f conda-envs/environment-docs.yml in the documentation is wrong.
To install a conda env with the environment.yml file the command is the above
conda env create -f conda-envs/environment-docs.yml

2 Likes