Skip to content

Commit

Permalink
Switch installation to use pak::pkg_install
Browse files Browse the repository at this point in the history
  • Loading branch information
lianos committed Sep 17, 2024
1 parent a506584 commit fa70ed9
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions facilebio_base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ LABEL maintainer="Steve Lianoglou ([email protected])"
# Newer versions of bioconductor_docker image sets options::repos to a
# frozen RSPM date. This is good for reproducibility at large, but I like
# to live on the edge/latest.
RUN sudo echo 'options(repos = c(CRAN = "https://packagemanager.rstudio.com/all/__linux__/bionic/latest"))' >> /usr/local/lib/R/etc/Rprofile.site
# Figure out the URL for the CRAN repository to use to install binary packages
# using this tool:
# https://packagemanager.posit.co/client/#/repos/cran/setup
# RUN sudo echo 'options(repos = c(CRAN = "https://packagemanager.rstudio.com/all/__linux__/bionic/latest"))' >> /usr/local/lib/R/etc/Rprofile.site
# RUN sudo echo 'options(repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/jammy/latest"))' >> /usr/local/lib/R/etc/Rprofile.site

# Use pak?
RUN Rscript -e "install.packages('pak')"

# Required for textshaping library
RUN sudo apt-get update -y
Expand All @@ -34,7 +41,7 @@ ADD base-packages.txt /tmp/
# and RSPM.
# https://community.rstudio.com/t/package-manager-and-travis/73816
RUN Rscript -e "\
install.packages(c(\
pak::pkg_install(c(\
'RApiSerialize', \
'Rcpp', \
'cpp11', \
Expand All @@ -58,8 +65,8 @@ RUN R -f /tmp/base-packages-install.R
# every now and again without reinstalling all of them again, so we can
# do that here. Run a no-op command to flip this on/of/rerun
# RUN pwd
RUN Rscript -e "options(repos = 'https://cran.rstudio.com/'); BiocManager::install(update = TRUE, ask = FALSE)" \
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds
# RUN Rscript -e "options(repos = 'https://cran.rstudio.com/'); BiocManager::install(update = TRUE, ask = FALSE)" \
# && rm -rf /tmp/downloaded_packages/ /tmp/*.rds

# Init command for s6-overlay
CMD ["/init"]

0 comments on commit fa70ed9

Please sign in to comment.