Skip to content

Commit

Permalink
Temporarily simplify Dockerfile to test caching
Browse files Browse the repository at this point in the history
  • Loading branch information
jeancochrane committed Oct 24, 2023
1 parent b93c3a6 commit d74fb4b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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')"
Expand All @@ -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/
Expand Down

0 comments on commit d74fb4b

Please sign in to comment.