use ARG ARCH instead of ENV ARCH

This commit is contained in:
Patrick Schratz 2024-11-27 17:46:27 +01:00
commit cc983c5bc9
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -12,7 +12,7 @@ ENV PATH=/opt/R/${R_VERSION}/bin:$PATH
ENV TZ="Europe/Berlin"
ENV DEBIAN_FRONTEND=noninteractive
ENV ARCH=arm64
ARG ARCH=arm64
ENV NCPUS=2
ENV R_LIBS_USER=/mnt/cache/R-pkgs
ENV R_PKG_CACHE_DIR=/mnt/cache/pkgcache
@ -47,7 +47,7 @@ RUN R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/
RUN mkdir -p /root/.R && bash -c 'echo -e "CXX_STD = CXX14\nCFLAGS += -flax-vector-conversions\nCC=ccache gcc\nCPP=gcc -E\nCXXCPP=gcc -e\nCXX=ccache g++\nCXX11=ccache g++\nCXX14=ccache g++\nCXX17=ccache g++\nF77=gfortran\nFC=gfortran" >> /root/.R/Makevars'
# R repos
RUN bash -c 'echo -e "options(pkg.sysreqs_verbose = TRUE, crayon.enabled = TRUE, Ncpus = ${NCPUS}, future.globals.onReference = NULL, repos = structure(c(CRAN = \"https://cran.devxy.io/amd64/noble/latest\", INLA = \"https://inla.r-inla-download.org/R/stable\")))" > ~/.Rprofile'
RUN bash -c 'echo -e "options(pkg.sysreqs_verbose = TRUE, crayon.enabled = TRUE, Ncpus = ${NCPUS}, future.globals.onReference = NULL, repos = structure(c(CRAN = \"https://cran.devxy.io/$ARCH/noble/latest\", INLA = \"https://inla.r-inla-download.org/R/stable\")))" > ~/.Rprofile'
# these dirs will later be used by the CI with existing mounts
RUN mkdir -p /mnt/cache/packages /mnt/cache/pkgcache /mnt/cache/R-pkgs