Hi , I’m new to both open source contributions and PyMC.Since building document is not supported on windows i am trying to run PYMC in docker but I am running into this error while building a docker image.
after executing this cmd - bash scripts/docker_container.sh build
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:
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.
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
I was trying the workaround inside a docker in a Linux machine and it was taking forever to create the environment from the yml file (it was stuck at “solving the environment”).
I added the following step before the conda env create and it created the environment in like a couple of minutes: conda update -n base conda
then conda env create -f conda-envs/environment-docs.yml
Thanks for the reply @ec_ai . I don’t know why but after executing - $ docker run -it -v $(pwd):/workspace continuumio/miniconda3 bash
the workspace is not in the same dir -
(base) root@fd6a07342dab:/# cd workspace
bash: cd: workspace: No such file or directory
(base) root@fd6a07342dab:/# ls
'\Program Files\Git\workspace' boot etc lib media opt root sbin sys usr
bin dev home lib64 mnt proc run srv tmp var
And of course if i navigate to '\Program Files\Git\workspace' then for conda env create -f conda-envs/environment-docs.yml it’s saying no such file or dir.
Ps: I ran the $ docker run -it -v $(pwd):/workspace continuumio/miniconda3 bash while I was in the right dir i.e pymc