Skip to content

Commit 9a9ff2e

Browse files
committed
fix where packages are installed
1 parent b850557 commit 9a9ff2e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

images/py-rocket-geospatial-2/Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ RUN rm -rf /tmp2
2323
USER root
2424
# install the geospatial libraries and R spatial; the rocket script are part of py-rocket-base
2525
# need to ensure that it installs to the site-library (that user can control) and with a clean PATH
26-
RUN echo '.libPaths(file.path(Sys.getenv("R_HOME"), "site-library"))' > /tmp/rprofile.site
27-
RUN env R_PROFILE=/tmp/rprofile.site \
28-
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
29-
/rocker_scripts/install_geospatial.sh
30-
RUN rm /tmp/rprofile.site
31-
26+
# Ensure packages go to site-library whether installed via R, Rscript, or littler (r)
27+
RUN echo '.libPaths("/usr/local/lib/R/site-library")' > /etc/littler.r && \
28+
echo '.libPaths("/usr/local/lib/R/site-library")' > /tmp/rprofile.site && \
29+
R_PROFILE=/tmp/rprofile.site \
30+
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
31+
/rocker_scripts/install_geospatial.sh && \
32+
rm /etc/littler.r /tmp/rprofile.site
33+
3234
# Install cwutils
3335
RUN cd /tmp && \
3436
wget https://www.star.nesdis.noaa.gov/socd/coastwatch/cwf/cwutils-4_0_0_198-linux-x86_64.tar.gz && \

0 commit comments

Comments
 (0)