RcppCore / RcppEigen

Rcpp integration for the Eigen templated linear algebra library
Other
110 stars 40 forks source link

Error while trying to create shinyproxy image #121

Closed quentinroyer1 closed 1 year ago

quentinroyer1 commented 1 year ago

Hello,

I am having an issue since a week now trying to create a shinyproxy image with glmnet package. Dockerfile :

FROM rocker/r-ver:4.0.5

RUN apt-get update && apt-get install -y \ sudo \ pandoc \ pandoc-citeproc \ libcurl4-gnutls-dev \ libcairo2-dev \ libxt-dev \ libssl-dev \ libssh-dev \ libssl1.1

RUN R -e "install.packages(c('glmnet'), repos='https://cloud.r-project.org/')"

RUN R -e "install.packages(c('shiny'), repos='https://cloud.r-project.org/')"

RUN R -e "install.packages(c('shinyalert','shinydashboard','rlang','data.table','DT','utils','ggplot2','data.table','lubridate', 'plyr','dplyr','tidyr','MASS','stargazer', 'httr','jsonlite','stringr','reshape2','caret','readxl','writexl','shinyjs'), repos='https://cloud.r-project.org/')"

RUN mkdir /root/myapp COPY OEMT /root/myapp

EXPOSE 3838

CMD ["R", "-e", "shiny::runApp('/root/myapp', port = 3838, host = '0.0.0.0')"]

During the installation of the RcppEigen package (dependency of glmnet), I have the following error : g++: fatal error: Killed signal terminated program cc1plus compilation terminated. make: *** [/usr/local/lib/R/etc/Makeconf:181: fastLm.o] Error 1 ERROR: compilation failed for package ‘RcppEigen’

After some research it seems to be linked to a memory issue during the compilation of the package. Do you know why I have to compile this package ? Is there any workaround ?

Thank you in advance for your help, Kind regard

eddelbuettel commented 1 year ago

That usually indicates that the build is starved of RAM and the OS cuts of the compiler. Hence the "fatal error: Killed".

One rememdy is to use binaries. I have also maintain r-cran-rcppeigen for many years in Debian and Ubuntu, you could just use that. For a particularly easy way to combine an Ubuntu base with binaries look at r2u which gives you 20k binaries for all of CRAN plus quite a bit of BioConductor on both Ubuntu 20.04 and 22.04.

As this is not a failure in RcppEigen I am closing this.