From a9bd705af60cb4fea95f11b1aae7755b786d2509 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Tue, 17 Oct 2023 18:42:16 -0400 Subject: [PATCH] feat: use conda to manage exact package versions --- docker/spacesavers2/Dockerfile | 10 ++++------ docker/spacesavers2/environment.txt | 26 ++++++++++++++++++++++++++ docker/spacesavers2/r-packages.txt | 23 ----------------------- 3 files changed, 30 insertions(+), 29 deletions(-) create mode 100644 docker/spacesavers2/environment.txt delete mode 100644 docker/spacesavers2/r-packages.txt diff --git a/docker/spacesavers2/Dockerfile b/docker/spacesavers2/Dockerfile index 35acfaf..ea4f04b 100644 --- a/docker/spacesavers2/Dockerfile +++ b/docker/spacesavers2/Dockerfile @@ -8,12 +8,10 @@ ENV BUILD_TAG=${BUILD_TAG} ARG REPONAME="000000" ENV REPONAME=${REPONAME} -# install pandoc -RUN mamba install pandoc - -# install R packages -COPY r-packages.txt /data2/ -RUN R -e 'install.packages(readLines("r-packages.txt"), repos="http://cran.us.r-project.org")' +# install pandoc & R packages +COPY environment.txt /data/2 +RUN mamba install -c conda-forge -c r --file environment.txt +ENV R_LIBS_USER=/opt2/conda/lib/R/library/ # install quarto ENV QUARTO_VERSION="1.3.450" diff --git a/docker/spacesavers2/environment.txt b/docker/spacesavers2/environment.txt new file mode 100644 index 0000000..30dbd8f --- /dev/null +++ b/docker/spacesavers2/environment.txt @@ -0,0 +1,26 @@ +quarto +pandoc +r-base=4.3.1 +r-DT +r-RColorBrewer +r-bslib=0.5.1 +r-crosstalk +r-downlit +r-dplyr +r-ggplot2 +r-glue +r-here +r-janitor +r-knitr +r-lubridate +r-plotly +r-purrr +r-readr +r-rlang +r-rmarkdown +r-scales +r-shiny +r-stringr +r-tibble +r-tidyr +r-xml2 diff --git a/docker/spacesavers2/r-packages.txt b/docker/spacesavers2/r-packages.txt deleted file mode 100644 index 2a3d4cd..0000000 --- a/docker/spacesavers2/r-packages.txt +++ /dev/null @@ -1,23 +0,0 @@ -DT -RColorBrewer -bslib -downlit -dplyr -ggplot2 -glue -here -janitor -knitr -lubridate -plotly -purrr -readr -rlang -rmarkdown -scales -shiny -stringr -thematic -tibble -tidyr -xml2