-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update packages, drop unused code, ingest stage running w/o error #61
Changes from 45 commits
9a09d7c
91d1862
8723659
b16a3e6
186fe1e
331b241
0144f28
af287d2
b616399
25f2850
9f1c1ca
aedd58b
7ae4f6b
fd6538b
7b39d2f
65948dd
dab451c
d41f6b9
626d34d
904e2a3
1eba9ca
dde61a6
24cf223
6772f45
ec1c35f
ce0a293
ae750d5
57bb779
3efb3eb
64cc14d
87a6671
3140824
ba7b677
1411406
10809f9
e724755
9336108
71e44a8
4578c72
7f9587f
81824d9
78f1307
fb6da59
8cfecac
6bd4ffb
fc503f3
2cf6ceb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
README.Rmd | ||
README.md | ||
docs/ | ||
input/ | ||
renv/library/ | ||
renv/sandbox/ | ||
renv/staging/ | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ | |
.Rproj.user/ | ||
|
||
# knitr and R markdown default cache directories | ||
/*_cache/ | ||
/cache/ | ||
*_cache/ | ||
cache/ | ||
|
||
# Temporary files created by R markdown | ||
*.utf8.md | ||
|
@@ -21,11 +21,3 @@ | |
*.xlsx | ||
*.xlsm | ||
*.html | ||
|
||
# Ignore python environment | ||
pipenv/ | ||
pipenv | ||
|
||
# Reporting files | ||
*.html | ||
|
||
Comment on lines
-24
to
-31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dropping these since we dropped all Python deps in this repo. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
README.Rmd | ||
pipeline/00-ingest.R | ||
pipeline/06-export.R | ||
pipeline/07-api.R | ||
reports/ | ||
pipeline/05-finalize.R | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Thought, non-blocking] Instead of ignoring the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately it seems like having But let me play around with it some more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 2cf6ceb! |
||
pipeline/07-export.R | ||
pipeline/08-api.R | ||
Comment on lines
+3
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Praise] Oops, I missed this during #62, thanks for catching! |
||
reports/* | ||
cache/* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,50 @@ | ||
FROM rocker/r-ver:4.3.1 | ||
FROM rocker/r-ver:4.3.2 | ||
|
||
# Set the working directory to setup. Uses a dedicated directory instead of | ||
# root since otherwise renv will try to scan every subdirectory | ||
WORKDIR /setup | ||
Comment on lines
+3
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Slight re-configuration of the Dockerfile here. |
||
|
||
# Use PPM for binary installs | ||
ENV RENV_CONFIG_REPOS_OVERRIDE "https://packagemanager.posit.co/cran/__linux__/jammy/latest" | ||
ENV RENV_CONFIG_SANDBOX_ENABLED FALSE | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm still not clear what this does but starting R inside the container recommends settings it ~for speed~. |
||
ENV RENV_PATHS_LIBRARY renv/library | ||
ENV RENV_PATHS_CACHE /setup/cache | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the actual location in the container the packages get installed to. They're then symlinked in the actual working dir. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Praise] Thanks for the clear explanations of the renv choices here! |
||
|
||
# Install system dependencies | ||
RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
libcurl4-openssl-dev libssl-dev libxml2-dev libgit2-dev git \ | ||
libudunits2-dev python3-dev python3-pip libgdal-dev libgeos-dev \ | ||
libproj-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev pandoc \ | ||
curl gdebi-core | ||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends -y \ | ||
libcurl4-openssl-dev libssl-dev libxml2-dev libgit2-dev git \ | ||
libudunits2-dev python3-dev python3-pip libgdal-dev libgeos-dev \ | ||
libproj-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev pandoc \ | ||
curl gdebi-core && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Quarto | ||
RUN curl -o quarto-linux-amd64.deb -L \ | ||
https://github.com/quarto-dev/quarto-cli/releases/download/v1.3.450/quarto-1.3.450-linux-amd64.deb | ||
RUN gdebi -n quarto-linux-amd64.deb | ||
|
||
# Install pipenv for Python dependencies | ||
RUN pip install pipenv | ||
|
||
# Copy pipenv files into the image. The reason this is a separate step from | ||
# the later step that adds files from the working directory is because we want | ||
# to avoid having to reinstall dependencies every time a file in the directory | ||
# changes, as Docker will bust the cache of every layer following a layer that | ||
# needs to change | ||
COPY Pipfile . | ||
COPY Pipfile.lock . | ||
|
||
# Install Python dependencies | ||
RUN pipenv install --system --deploy | ||
Comment on lines
-19
to
-31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't need any of this now. We only need DVC. |
||
# Install pipeline Python dependencies globally | ||
RUN pip install --no-cache-dir dvc[s3] | ||
|
||
# Copy R bootstrap files into the image | ||
COPY renv.lock . | ||
COPY renv.lock .Rprofile ./ | ||
COPY renv/profiles/reporting/renv.lock reporting-renv.lock | ||
COPY .Rprofile . | ||
COPY renv/ renv/ | ||
|
||
# Install R dependencies | ||
RUN Rscript -e 'renv::restore()' | ||
# 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()' | ||
RUN Rscript -e 'renv::restore(lockfile = "reporting-renv.lock")' | ||
|
||
# Set the working directory to the app dir | ||
WORKDIR /model-res-avm/ | ||
|
||
# Copy the directory into the container | ||
ADD ./ model-res-avm/ | ||
COPY ./ . | ||
|
||
# Copy R dependencies into the app directory | ||
RUN rm -Rf model-res-avm/renv | ||
RUN mv renv model-res-avm/ | ||
|
||
# Set the working directory to the app dir | ||
WORKDIR model-res-avm/ | ||
RUN rm -Rf /model-res-avm/renv && \ | ||
mv /setup/renv /model-res-avm/renv | ||
|
||
CMD dvc pull && dvc repro |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both Pipfile things were removed since they existed mostly to support sales validation. DVC is installed directly in the Dockerfile without a lock file. |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignoring this when using
COPY
in Docker since it's manually replaced with the installed libraries.