Skip to content

Meshinchi-Lab/renv_bioc_rstudio_docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rstudio with Bioconductor and Seurat Dependencies

  1. Build the image with
docker build \
    --build-arg QUARTO_ARCH=amd64 \
    --build-arg ROOT=true \
    -t ghcr.io/meshinchi-lab/bioc_seurat_azimuth:2026.01 .
  1. Run a container interactively

Be sure to define a location for the RENV cache and possible just used a shared RENV library PATH, to avoid installing the same software packages everytime the container is re-started.

Most Ubuntu package dependencies needed for scRNA-seq and other high-level data analysis packages are installed in the docker container, like HDF5, lib-gsl, magick etc.

The container image also includes the most complex Bioconductor packages already installed, like Seurat, SeuratObject, GSVA, and spatial analyses dependencies.

# renv cache and library paths
# note: these R package directories are NOT github repositories, but exist next to the github analysis code repos that use these R packages. 
CACHE="$HOME/github_repos/R" 
LIBRARY="$HOME/github_repos/R-4.5"

docker run  \
    -e USERID=$(id -u) \
    -e GROUPID=$(id -g) \
    -e DEFAULT_USER=$USER \
    -e ROOT=true   \
    -e RENV_PATHS_CACHE=$CACHE \
    -e RENV_PATHS_LIBRARY=$LIBRARY \
    -v $HOME/github_repos:/$HOME/github_repos \
    -v /mnt:/mnt   \
    --memory-reservation 64GB \
    --cpus 8 \
    --rm -ti -p 127.0.0.1:8780:8787 \
   ghcr.io/meshinchi-lab/bioc_seurat_azimuth:2026.01

See the official documentation for more information on RStudio server using Docker.

  1. Open a project with RENV or initialze a new RENV

Initialize:

# R console
# to access the Seurat, GSVA, packages from the container, you must set the external paths during renv initialization
renv_settings <- list("external.libraries"="/usr/local/lib/R/site-library")
renv::init(settings = renv_settings)
# confirm that it includes "/usr/local/lib/R/site-library" 
.libPaths()
library(Seurat)
library(GSVA)
Author

Jenny L. Smith https://orcid.org/0000-0003-0402-2779

About

Dockerfile to build rstudio server with bioconductor and renv

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors