download r-builds from aws s3

This commit is contained in:
Patrick Schratz 2024-09-04 23:31:30 +02:00
commit 344e5d860a
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -24,7 +24,7 @@ RUN apk add -q --no-cache R-dev curl ca-certificates bash g++ tzdata openjdk17 t
RUN mkdir ~/.R && echo -e "CXXFLAGS+=-D__MUSL__\nCPPFLAGS+= -D__MUSL__\nLDFLAGS+=-fPIC" >> ~/.R/Makevars
### INSTALL R
RUN curl -O https://devxy-r-builds.s3.eu-central-003.backblazeb2.com/alpine320/r-4.4.1_1_$(arch).apk
RUN curl -O https://devxy-r-builds.s3.eu-central-2.amazonaws.com/alpine320/r-4.4.1_1_$(arch).apk
RUN apk add --allow-untrusted r-4.4.1_1_$(arch).apk && rm r-4.4.1_1_$(arch).apk
RUN R -q -e 'install.packages("remotes", repo = "cloud.r-project.org"); remotes::install_github("pat-s/pak@alpine")'
@ -33,6 +33,6 @@ COPY . .
# FIXME: switch to pak after https://github.com/r-lib/pak/issues/628
RUN export ARCH=$(echo $(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')) && \
R -q -e 'Sys.setenv(PKG_SYSREQS = TRUE, PKG_SYSREQS_VERBOSE = TRUE); options(Ncpus = 4, repos = structure(c(devxy = sprintf("https://cran.devxy.io/%s/alpine320/latest", Sys.getenv("ARCH")), CRAN = "https://cloud.r-project.org"))); install.packages("remotes"); remotes::install_deps()'
RUN r-pkg-binaries
RUN rm -rf r-pkg-binaries
CMD ["/bin/bash"]