Does anyone have an example of a dockerfile that they have used to get Pystan 2.19 working?
All my attempts so far have resulted in me getting the same error when I go to compile a model: distutils.errors.CompileError: command ‘gcc’ failed with exit status 1
Here is my (non-working dockerfile):
RUN echo ‘deb Index of /debian testing main’ >> /etc/apt/sources.list
&& apt-get update -y
&& apt-get install -y gcc
&& rm -rf /var/lib/apt/lists/*
RUN pip install numpy
And when I run the command gcc --version in the container I get: gcc (Debian 11.2.0-12) 11.2.0
I appreciate any ideas. Thank you.
Could you try installing build-essential?
You might also need python-dev.
You could also try using a non-slim base image, e.g.
That sufficed for the latest version of pystan a month ago:
Can confirm that this does appear to work just fine on the non-slim base image (and with no need to install gcc)
RUN pip install numpy cython pystan==22.214.171.124
(I tested it with the 8schools example on the Pystan2 getting started page and it compiled and sampled successfully)