-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve docker build speed and caching
- Loading branch information
1 parent
a1e6e0d
commit 1e0eb50
Showing
5 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
FROM rocker/tidyverse:4.4.1 | ||
|
||
WORKDIR /pkg | ||
ADD preprocessing . | ||
COPY preprocessing/renv.lock ./renv.lock | ||
|
||
# Speed up building by setting make with multiple cores from env | ||
ARG CORES | ||
ENV MAKE="make -j${CORES}" | ||
|
||
RUN install2.r --error --skipinstalled renv remotes && \ | ||
R -e 'renv::restore()' && \ | ||
rm -rf /tmp/downloaded_packages | ||
|
||
ADD preprocessing . | ||
|
||
RUN R -e 'remotes::install_local(path = ".", dependencies = TRUE)' | ||
|
||
CMD ["R", "-e", "omopcat.preprocessing::preprocess()"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters