This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM rocker/r-devel:latest | |
RUN apt update && apt install -y git flex | |
RUN git clone git://gcc.gnu.org/git/gcc.git gcc11 | |
RUN cd gcc11 && ./contrib/download_prerequisites | |
RUN mkdir gcc-build && cd gcc-build && ../gcc11/configure -disable-multilib --enable-languages=c,c++,fortran | |
RUN cd gcc-build && make -j4 && make install | |
RUN echo 'LD_LIBRARY_PATH="/usr/local/lib64:${R_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}"' >> /usr/lib/R/etc/ldpaths | |
RUN mkdir ~/.R && echo 'CXX11=/usr/local/bin/g++' > ~/.R/Makevars && echo 'CXX=/usr/local/bin/g++' >> ~/.R/Makevars && echo 'CC=/usr/local/bin/gcc' >> ~/.R/Makevars | |
RUN echo 'CCFLAGS = -Wall -pedantic -O2' >> ~/.R/Makevars && echo 'CXXFLAGS = -Wall -pedantic -O2' >> ~/.R/Makevars && echo 'CXX11FLAGS = -Wall -pedantic -O2' >> ~/.R/Makevars |