From d74fb4b6231751639f3f70fa45bceb31bb77562f Mon Sep 17 00:00:00 2001 From: Jean Cochrane Date: Tue, 24 Oct 2023 15:57:10 -0500 Subject: [PATCH] Temporarily simplify Dockerfile to test caching --- Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index f65b4ae3..1453ef73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ libudunits2-dev python3-dev python3-pip # Install pipenv for Python dependencies -RUN pip install pipenv +RUN --mount=type=cache,target=/root/.cache/pip,from=pip_cache pip install pipenv # Install renv for R dependencies RUN Rscript -e "install.packages('renv')" @@ -26,14 +26,11 @@ RUN Rscript -e "install.packages('renv')" COPY Pipfile . COPY Pipfile.lock . -# Install Python dependencies -RUN --mount=type=cache,target=/root/.cache/pip,from=pip_cache pipenv install --deploy --system - # Copy R lockfile COPY renv.lock . # Install R dependencies -RUN --mount=type=cache,target=/root/.cache/R,from=r_cache Rscript -e 'renv::restore()' +RUN --mount=type=cache,target=/root/.cache/R,from=r_cache Rscript -e 'renv::install("ccao")' # Copy the directory into the container ADD ./ model-res-avm/