Skip to content

Commit

Permalink
Ignore unnecessary renv files
Browse files Browse the repository at this point in the history
  • Loading branch information
dfsnow committed Dec 1, 2023
1 parent 4578c72 commit 7f9587f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
README.Rmd
README.md
.dvc/
.git/
docs/
input/
renv/library/
renv/sandbox/
renv/staging/
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ WORKDIR /setup
# Use PPM for binary installs
ENV RENV_CONFIG_REPOS_OVERRIDE "https://packagemanager.posit.co/cran/__linux__/jammy/latest"
ENV RENV_CONFIG_SANDBOX_ENABLED FALSE
ENV RENV_PATHS_LIBRARY renv/library
ENV RENV_PATHS_CACHE /setup/cache

# Install system dependencies
Expand All @@ -27,14 +28,14 @@ RUN gdebi -n quarto-linux-amd64.deb
RUN pip install --no-cache-dir dvc[s3]

# Copy R bootstrap files into the image
COPY renv.lock .Rprofile .gitignore .renvignore ./
COPY renv.lock .Rprofile ./
COPY renv/profiles/reporting/renv.lock reporting-renv.lock
COPY renv/ renv/

# Install R dependencies. Restoring renv first ensures that it's
# using the same version as recorded in the lockfile
RUN Rscript -e 'renv::restore(packages = "renv"); renv::restore(clean = FALSE)'
RUN Rscript -e 'renv::restore(lockfile = "reporting-renv.lock", clean = FALSE)'
RUN Rscript -e 'renv::restore(packages = "renv"); renv::restore()'
RUN Rscript -e 'renv::restore(lockfile = "reporting-renv.lock")'

# Set the working directory to the app dir
WORKDIR /model-res-avm/
Expand Down

0 comments on commit 7f9587f

Please sign in to comment.