Closed chStaiger closed 1 year ago
I was able to build it. I saw the same notes, but then it went on.
Building takes long. rstan
is a big beast and installs lots of dependencies. We only use a relatively simple function stan::Rhat()
from it. Are you suggesting we consider removing it?
I gave it another try. But still no success with the installation. Next to the warnings, there are also some errors:
ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
* removing ‘/usr/local/lib/R/site-library/lme4’
ERROR: dependency ‘lme4’ is not available for package ‘jomo’
* removing ‘/usr/local/lib/R/site-library/jomo’
ERROR: dependencies ‘jomo’, ‘haven’ are not available for package ‘mitml’
* removing ‘/usr/local/lib/R/site-library/mitml’
ERROR: dependency ‘mitml’ is not available for package ‘mice’
* removing ‘/usr/local/lib/R/site-library/mice’
ERROR: dependency ‘mice’ is not available for package ‘miceadds’
* removing ‘/usr/local/lib/R/site-library/miceadds’
The problem is with two R packages: building nloptr
requires the cmake
library and building haven
requires the zlib1g-dev
linux library. I composed a Dockerfile as
FROM rocker/r-ver:4.3.1
ARG R_VERSION=4.3.1
ARG OS_IDENTIFIER=ubuntu-2004
# nloptr needs cmake
# haven needs zlib1g-dev
RUN apt update && \
apt -y install cmake && \
apt -y install zlib1g-dev
RUN echo 'options(repos = c(CRAN = "https://cloud.r-project.org"))' >>"${R_HOME}/etc/Rprofile.site"
RUN R -e "install.packages('remotes')"
RUN R -e "remotes::install_github('amices/mice')"
CMD ["bash"]
Please try it. If all is well, it should install around (or exactly!) 100 R packages, including the dev version of mice
:
/usr/local/lib/R/library /usr/local/lib/R/site-library
29 71
> packageVersion("mice")
[1] ‘3.16.4’
Many many thanks! It works!
Describe the bug I am installing mice in Docker rocker/r-ver:4.3.1:
Mice depends on Rstan. When installing this package it stalls at this error message:
To Reproduce You can use the following Dockerfile: