diff --git a/README.md b/README.md index d696cb1..518f329 100644 --- a/README.md +++ b/README.md @@ -247,3 +247,37 @@ serverless invoke stepf -n rBuilds -d '{"force": true}' # Rebuild specific R versions serverless invoke stepf -n rBuilds -d '{"force": true, "versions": ["3.6.3", "4.0.2"]}' ``` + +## Testing + +To test the R builds locally, you can build the images: + +```bash +# Build images for all platforms +make docker-build + +# Or build the image for a single platform +(cd builder && docker-compose build ubuntu-2004) +``` + +Then run the build script: + +```bash +# Build R for all platforms +R_VERSION=4.0.5 make docker-build-r + +# Build R for a single platform +(cd builder && R_VERSION=4.0.5 docker-compose up ubuntu-2004) + +# Alternatively, run the build script from within a container +docker run -it --rm --entrypoint "/bin/bash" r-builds:ubuntu-2004 + +# Build R 4.0.5 +R_VERSION=4.0.5 ./build.sh + +# Build R devel +R_VERSION=devel ./build.sh + +# Build a prerelease version of R (e.g., alpha or beta) +R_VERSION=rc R_TARBALL_URL=https://cran.r-project.org/src/base-prerelease/R-latest.tar.gz ./build.sh +``` diff --git a/builder/Dockerfile.opensuse-15 b/builder/Dockerfile.opensuse-15 index e2f6ea2..6cf0a7b 100644 --- a/builder/Dockerfile.opensuse-15 +++ b/builder/Dockerfile.opensuse-15 @@ -43,9 +43,11 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \ shadow \ tcl-devel \ texinfo \ + texlive-ae \ texlive-bibtex \ texlive-cm-super \ texlive-dvips \ + texlive-fancyvrb \ texlive-helvetic \ texlive-inconsolata \ texlive-latex \ diff --git a/builder/Dockerfile.opensuse-152 b/builder/Dockerfile.opensuse-152 index 66c94ed..6990536 100644 --- a/builder/Dockerfile.opensuse-152 +++ b/builder/Dockerfile.opensuse-152 @@ -43,9 +43,11 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \ shadow \ tcl-devel \ texinfo \ + texlive-ae \ texlive-bibtex \ texlive-cm-super \ texlive-dvips \ + texlive-fancyvrb \ texlive-helvetic \ texlive-inconsolata \ texlive-latex \ diff --git a/builder/Dockerfile.opensuse-42 b/builder/Dockerfile.opensuse-42 index f7f9435..b98f498 100644 --- a/builder/Dockerfile.opensuse-42 +++ b/builder/Dockerfile.opensuse-42 @@ -35,8 +35,6 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \ pcre2-devel \ perl \ perl-macros \ - python \ - python-pip \ readline-devel \ rpm-build \ ruby \ @@ -44,9 +42,11 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \ shadow \ tcl-devel \ texinfo \ + texlive-ae \ texlive-bibtex \ texlive-cm-super \ texlive-dvips \ + texlive-fancyvrb \ texlive-helvetic \ texlive-inconsolata \ texlive-latex \ @@ -64,7 +64,10 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \ zlib-devel \ && zypper clean -RUN pip install awscli +RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ + unzip awscliv2.zip && \ + ./aws/install && \ + rm -rf aws awscliv2.zip # Pin fpm for compatibility with Ruby < 2.3 RUN gem install ffi:1.12.2 fpm:1.11.0 && \ diff --git a/builder/build.sh b/builder/build.sh index 2e43653..8f77a36 100755 --- a/builder/build.sh +++ b/builder/build.sh @@ -40,7 +40,10 @@ archive_r() { fetch_r_source() { echo "Downloading R-${1}" - if [ "${1}" = devel ]; then + if [ -n "${R_TARBALL_URL}" ]; then + # Custom tarball URL for testing (e.g., R alpha and beta releases) + wget -q "${R_TARBALL_URL}" -O /tmp/R-${1}.tar.gz + elif [ "${1}" = devel ]; then # Download the daily tarball of R devel wget -q https://stat.ethz.ch/R/daily/R-devel.tar.gz -O /tmp/R-devel.tar.gz else