From 88e0ecb95f42293f40fb36acd869585d90424c21 Mon Sep 17 00:00:00 2001 From: Alex Kerney Date: Tue, 16 Aug 2022 13:46:19 -0400 Subject: [PATCH] Use Rprofile.site --- r/Dockerfile | 4 +--- r/Rprofile.site | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 r/Rprofile.site diff --git a/r/Dockerfile b/r/Dockerfile index af86ab4..969674b 100644 --- a/r/Dockerfile +++ b/r/Dockerfile @@ -92,13 +92,11 @@ RUN Rscript -e "remotes::install_cran('assertthat', dependencies=FALSE, upgrade_ Rscript -e "remotes::install_github('kwstat/pals', dependencies=FALSE, upgrade_dependencies=FALSE, upgrade=FALSE)" COPY CONDARC ./.condarc +COPY Rprofile.site /opt/conda/lib/R/etc/ ENV PATH /usr/lib/rstudio-server/bin/:${PATH} ENV LD_LIBRARY_PATH=${CONDA_DIR}/lib -ENV PROJ_LIB=${CONDA_DIR}/share/proj -ENV GDAL_DATA=${CONDA_DIR}/share/gdal -ENV GDAL_DRIVER_PATH=${CONDA_DIR}/lib/gdalplugins # USER root # RUN chown -R jovyan ${CONDA_DIR} diff --git a/r/Rprofile.site b/r/Rprofile.site new file mode 100644 index 0000000..3d92622 --- /dev/null +++ b/r/Rprofile.site @@ -0,0 +1,5 @@ +local({ + Sys.setenv(PROJ_LIB="/opt/conda/share/proj") + Sys.setenv(GDAL_DATA="/opt/conda/share/gdal") + Sys.setenv(GDAL_DRIVER_PATH="/opt/conda/lib/gdalplugins") +})