When I try to run your dockerfile, I seem to get an error about this line failing:
COPY R/Makevars /root/.R/Makevars
If I comment that out, I get an issue with compiling rstan, which I am unsure about how to resolve:
^~~~
make: *** [lang__grammars__expression_grammar_inst.o] Error 1
ERROR: compilation failed for package ‘rstan’
* removing ‘/usr/local/lib/R/site-library/rstan’
which I have yet to find a workaround that works properly. Would you know how to fix this so rstan compiles correctly?
EDIT::Sorry, after adding the Makevars file, the image seems to work. Can you explain what exactly the Makevars file does for the container? Not sure I fully understand why it is needed.
Related: stan-dev/rstan#441