Installing nutpie in Docker with pymc5

Thanks a lot for your hint @ricardoV94

Indeed,this helped - the only missing dependency was a package called numba (installable via pip)

So for anyone who wants to dockerize a pymc-based module using the nutpie sampler, here a working Dockerfile:

FROM python:3.11.2-slim-buster

# - - - - - - UNIX-LEVEL INSTALLTIONS - - - - - - - - 
USER root
RUN apt update && apt upgrade -y \
  && apt -y install --no-install-recommends -qq \
     curl ca-certificates make g++ git vim-tiny openssh-client \
     unzip tzdata htop \
  && apt clean && rm -rf /var/lib/apt/lists/*

RUN apt-get update && \
    apt-get -y install gcc mono-mcs && \
    rm -rf /var/lib/apt/lists/*

RUN apt-get update && apt-get install -y \
    build-essential \
    libedit-dev  \
    llvm
# - - - - - - - - - - - - - - - - - - - - - - - - - -


# - - - - - - INSTALL PACKAGES - - - - - - - - - - - 
RUN pip install --upgrade pip
RUN pip install "pymc>=5"
RUN pip install "google-cloud-storage" \
                "google-cloud-bigquery" \
                "arviz" \
                "matplotlib" \
                "numpy" \
                "pandas" \
                "seaborn" \
                "rich" \
                "pandas_gbq" \
                "numba"
# - - - - - - - - - - - - - - - - - - - - - - - - - -


# - - - - - - IMPORT FILES AND GRANT ACCESS - - - - - 
COPY . /app
WORKDIR /app
RUN useradd -ms /bin/bash admin
RUN chown -R admin:admin /app
RUN chmod 755 /app
USER admin
# - - - - - - - - - - - - - - - - - - - - - - - - - -



# - - - - - - INSTALL NUPIE SAMPLER - - - - - - - - -
RUN curl https://sh.rustup.rs  -sSf | bash -s -- -y
# RUN apt -y install gcc
ENV PATH="$PATH:/home/admin/.cargo/bin"
#llvm, gfortran
RUN pip install 'nutpie[pymc]'
# - - - - - - - - - - - - - - - - - - - - - - - - - -


CMD ["python", "run_model.py"]