Skip to content
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

Add #133 #135

Merged
merged 1 commit into from
Apr 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ Imports:
Depends:
R (>= 3.5.0)
VignetteBuilder: knitr
LazyData: true
29 changes: 29 additions & 0 deletions R/memo_misc.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,35 @@ NULL
invisible()
}

## data generation
## ---
## recipes <- list()
## recipes["texlive"] <- "## install texlive\nRUN apt-get install -y pandoc pandoc-citeproc texlive"
## recipes["texlivefull"] <- "## install texlive-full\nRUN apt-get install -y pandoc pandoc-citeproc texlive-full"
## recipes["quarto"] <- "## install quarto (latest)\nRUN apt-get install -y curl git && curl -LO https://quarto.org/download/latest/quarto-linux-amd64.deb && dpkg -i quarto-linux-amd64.deb && quarto install tool tinytex && rm quarto-linux-amd64.deb"
## recipes["clean"] <- "## Clean up caches\nRUN rm -rf /var/lib/apt/lists/* && if [ -d \"$CACHE_PATH\" ]; then rm -rf $CACHE_PATH; fi"
## recipes["make"] <- "## install GNU make\nRUN apt-get -y install make"
## usethis::use_data(recipes, overwrite = TRUE)

#' Recipes for Building Container Images
#'
#' A list containing several useful recipes for container building. Useful for the `post_installation_steps` argument of [dockerize()]. Available recipes are:
#' * `texlive`: install pandoc and LaTeX, useful for rendering RMarkdown
#' * `texlivefull`: Similar to the above, but install the full distribution of TeX Live (~ 3GB)
#' * `quarto`: install quarto and tinytex
#' * `clean`: clean up the container image by removing cache
#' * `make`: install GNU make
#' @examples
#' \donttest{
#' if (interactive()) {
#' graph <- resolve(pkgs = c("openNLP", "LDAvis", "topicmodels", "quanteda"),
#' snapshot_date = "2020-01-16")
#' ## install texlive
#' dockerize(graph, ".", post_installation_steps = recipes[['texlive']])
#' }
#' }
"recipes"

## internal data generation
## ---
## ### Supported OS Versions
Expand Down
Binary file added data/recipes.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion inst/update.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ rang <- resolve(here::here(),

## You might want to edit `post_installation_steps` or `cache`
dockerize(rang, output_dir = here::here(), verbose = TRUE, cache = TRUE,
post_installation_steps = c("RUN apt-get install make"),
post_installation_steps = c(recipes[['make']], recipes[['texlive']], recipes[['clean']]),
insert_readme = FALSE,
copy_all = TRUE)
33 changes: 33 additions & 0 deletions man/recipes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.