Created
August 6, 2023 16:24
-
-
Save mojaveazure/78b658ce67eae0a81fe8791942cebf68 to your computer and use it in GitHub Desktop.
Example Dockerfile showcasing S4 method caching at build-time
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
FROM rocker/r-ver:4.2.2 | |
RUN apt-get update && apt-get upgrade -y | |
RUN Rscript -e "\ | |
install.packages('remotes'); \ | |
remotes::install_version('Matrix', '1.5.1'); \ | |
install.packages('SeuratObject', repos = 'https://cloud.r-project.org')" | |
RUN Rscript -e "print(packageVersion('Matrix'))" | |
RUN Rscript -e "install.packages('Matrix')" | |
RUN Rscript -e "\ | |
suppressPackageStartupMessages(library(SeuratObject)); \ | |
data('pbmc_small'); \ | |
graph <- pbmc_small[['RNA_snn']]; \ | |
print(class(graph)); \ | |
print(getClass('Graph')); \ | |
cat('\n'); \ | |
print('Attempting to show a Graph'); \ | |
tryCatch(show(graph), error = function(e) {print(e$message); NULL}); \ | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment