I am using
renv within a docker container.
renv::isolate() to make a self contained library. To save time and avoid re-downloding and re-building all packages I've tried doing the following in my
# Restore R packages # Copy renv.lock file COPY renv.lock /tmp/renv.lock # Change working directory WORKDIR /root/project/ # Copy renv directory with project library COPY ./renv . # Restore from renv.lock using binaries in the renv library RUN R -e "renv::restore(lockfile='/tmp/renv.lock', library='/root/project/renv/library/R-4.0/x86_64-pc-linux-gnu')"
renv still tries to re-download and re-install each package instead of using the library copied into
How can I avoid re-downloading and re-building the packages?