Skip to content

Commit

Permalink
determine and install dependencies with {pak} (#97)
Browse files Browse the repository at this point in the history
closes #96
  • Loading branch information
cjyetman authored Feb 9, 2024
1 parent 230a11a commit 44758b9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
FROM --platform=linux/amd64 rocker/tidyverse

RUN Rscript -e 'install.packages(c("pak", "renv"))'
RUN Rscript -e 'install.packages("pak")'

COPY . /workflow.data.preparation

WORKDIR /workflow.data.preparation

RUN Rscript -e '\
readRenviron(".env"); \
non_cran_pkg_deps <- c("RMI-PACTA/pacta.scenario.preparation", "RMI-PACTA/pacta.data.preparation", "RMI-PACTA/pacta.data.scraping"); \
cran_pkg_deps <- setdiff(renv::dependencies()$Package, basename(non_cran_pkg_deps)); \
pak::pkg_install(pkg = c(non_cran_pkg_deps, cran_pkg_deps)); \
pak::local_install_deps(); \
'

CMD Rscript run_pacta_data_preparation.R

0 comments on commit 44758b9

Please sign in to comment.