Last active
April 17, 2020 12:22
-
-
Save boennecd/fd0625daf11aae3304e9e9a9a6cfea7d to your computer and use it in GitHub Desktop.
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
## Essentially identical to | |
## https://github.com/r-hub/rhub-linux-builders/blob/7af50594ab7a3076adb6e52cce5a912d513a9faa/fedora/Dockerfile | |
## | |
## in the start | |
FROM fedora:30 | |
## Set a default user. Available via runtime flag | |
RUN useradd docker | |
RUN dnf install -y \ | |
gcc-gfortran \ | |
less \ | |
ca-certificates \ | |
curl \ | |
java-1.8.0-openjdk \ | |
bzip2-devel \ | |
cairo-devel \ | |
ghostscript \ | |
libcurl-devel \ | |
libicu-devel \ | |
libjpeg-turbo-devel \ | |
pango-devel \ | |
pcre-devel \ | |
libpng-devel \ | |
readline-devel \ | |
libtiff-devel \ | |
libX11-devel \ | |
libXt-devel \ | |
subversion \ | |
tcl-devel \ | |
texinfo \ | |
texlive-latex \ | |
texlive-collection-fontsextra \ | |
texlive-scheme-basic \ | |
tk-devel \ | |
unzip \ | |
xorg-x11-proto-devel \ | |
findutils \ | |
make \ | |
texinfo-tex \ | |
xz-devel \ | |
zlib-devel \ | |
libXmu-devel \ | |
tar \ | |
texlive-ec \ | |
texlive-parskip \ | |
texlive-collection-fontsrecommended \ | |
which \ | |
xorg-x11-server-Xvfb | |
RUN dnf install -y \ | |
dnf-plugins-core | |
RUN dnf install -y glibc-langpack-en.x86_64 | |
RUN dnf install -y valgrind | |
RUN dnf install -y qpdf | |
RUN curl -o /usr/bin/pandoc.gz \ | |
https://files.r-hub.io/pandoc/linux-64/pandoc.gz && \ | |
gzip -d /usr/bin/pandoc.gz && \ | |
curl -o /usr/bin/pandoc-citeproc.gz \ | |
https://files.r-hub.io/pandoc/linux-64/pandoc-citeproc.gz && \ | |
gzip -d /usr/bin/pandoc-citeproc.gz && \ | |
chmod +x /usr/bin/pandoc /usr/bin/pandoc-citeproc | |
RUN dnf install -y aspell aspell-en | |
RUN dnf install -y file | |
RUN dnf install -y xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi | |
ENV LC_ALL en_US.UTF-8 | |
ENV LANG en_US.UTF-8 | |
## Need serial version of openblas | |
RUN dnf install -y openblas-serial \ | |
tar \ | |
rsync \ | |
gcc \ | |
gcc-c++ \ | |
java-1.8.0-openjdk-devel \ | |
openssl-devel \ | |
libxml2-devel | |
## install R. See | |
## https://www.stats.ox.ac.uk/pub/bdr/Rconfig/r-devel-linux-x86_64-fedora-gcc | |
ENV _R_CHECK_INSTALL_DEPENDS_ true | |
ENV _R_CHECK_SUGGESTS_ONLY_ false | |
ENV _R_CHECK_NO_RECOMMENDED_ true | |
ENV _R_CHECK_DOC_SIZES2_ true | |
ENV _R_CHECK_DEPRECATED_DEFUNCT_ true | |
ENV _R_CHECK_SCREEN_DEVICE_ warn | |
ENV _R_CHECK_REPLACING_IMPORTS_ true | |
ENV _R_CHECK_TOPLEVEL_FILES_ true | |
ENV _R_CHECK_DOT_FIRSTLIB_ true | |
ENV _R_CHECK_RD_LINE_WIDTHS_ true | |
ENV _R_CHECK_S3_METHODS_NOT_REGISTERED_ true | |
ENV _R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_ true | |
ENV _R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_ TRUE | |
ENV _R_CHECK_NATIVE_ROUTINE_REGISTRATION_ true | |
ENV _R_CHECK_FF_CALLS_ registration | |
ENV _R_CHECK_PRAGMAS_ true | |
ENV _R_CHECK_COMPILATION_FLAGS_ true | |
ENV _R_CHECK_R_DEPENDS_ true | |
ENV _R_CHECK_PACKAGES_USED_IN_TESTS_USE_SUBDIRS_ true | |
ENV _R_CHECK_PKG_SIZES_ false | |
ENV _R_CHECK_SHLIB_OPENMP_FLAGS_ true | |
ENV _R_CHECK_LIMIT_CORES_ true | |
ENV _R_S3_METHOD_LOOKUP_BASEENV_AFTER_GLOBALENV_ true | |
ENV _R_CHECK_COMPILATION_FLAGS_KNOWN_ "-Wno-deprecated-declarations -Wno-ignored-attributes -Wno-parentheses-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2" | |
ENV _R_CHECK_AUTOCONF_ true | |
ENV _R_CHECK_THINGS_IN_CHECK_DIR_ true | |
ENV _R_CHECK_THINGS_IN_TEMP_DIR_ true | |
ENV _R_CHECK_THINGS_IN_TEMP_DIR_EXCLUDE_ "^ompi" | |
ENV _R_CHECK_BASHISMS_ true | |
ENV _R_CHECK_DEPENDS_ONLY_DATA_ true | |
RUN mkdir "$HOME/.R" && \ | |
echo "MAKEFLAGS = -j 6" >> "$HOME/.R/Makevars" && \ | |
export R_MAKEVARS_USER="$HOME/.R/Makevars" && \ | |
cd /tmp/ && \ | |
curl -o R-devel.tar.gz \ | |
https://stat.ethz.ch/R/daily/R-devel.tar.gz && \ | |
tar -zxvf R-devel.tar.gz && \ | |
rm -f R-devel.tar.gz && \ | |
cd R-devel && \ | |
./tools/rsync-recommended && \ | |
./configure \ | |
CFLAGS="-g -O2 -Wall -pedantic -mtune=native" \ | |
FFLAGS="-g -O2 -mtune=native -Wall -pedantic" \ | |
MAKEFLAGS="-j 6" \ | |
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk \ | |
--with-x --with-recommended-packages --enable-R-shlib --enable-R-static-lib \ | |
CXXFLAGS="-g -O2 -Wall -pedantic -mtune=native -Wno-ignored-attributes -Wno-deprecated-declarations" \ | |
--prefix=/opt/R-devel \ | |
--with-blas="/usr/lib64/libopenblas.so.0" && \ | |
make && \ | |
make install | |
RUN echo "options(repos = structure(c(CRAN = 'http://cran.rstudio.com')))" >> \ | |
/opt/R-devel/lib64/R/etc/Rprofile.site && \ | |
/opt/R-devel/lib64/R/bin/R -e "install.packages('devtools')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment