VSCode R development docker image with some popular single cell libs installed
10K+
This Docker image contains the following packages:
FROM rocker/r-ver:4.3
# Update apt-get
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y libglpk-dev libharfbuzz-dev libfribidi-dev libhdf5-dev patch liblzma-dev libbz2-dev libclang-dev libgsl-dev
# create a place for a volume to be mounted for vscode server
ARG vscode_server=/root/.vscode-server
RUN mkdir -p ${vscode_server} \
&& mkdir -p /root/code
# Set the working directory to vscode home
WORKDIR /root/code
# copy docker/r-packages.r to container and run it to install packages
# install Seurat, BiocManager, devtools, remotes all at once using 4 Ncpus
RUN R -e "install.packages(c('Seurat', 'BiocManager', 'devtools', 'remotes', 'languageserver', \
'Signac', 'tidyverse', 'rjson', 'harmony', 'patchwork', 'future', 'here', 'IRkernel') , Ncpus = 24)"
# install ‘GenomeInfoDb’, ‘GenomicRanges’, ‘IRanges’, ‘Rsamtools’, ‘S4Vectors’, ‘BiocGenerics’ from Bioconductor
RUN R -e "BiocManager::install(c('Rhtslib', 'GenomeInfoDb', 'GenomicRanges', 'IRanges', 'Rsamtools', 'S4Vectors', \
'BiocGenerics', 'Rsamtools', 'zellkonverter', 'SingleCellExperiment', 'cicero', \
'EnsDb.Mmusculus.v79', 'BSgenome.Mmusculus.UCSC.mm10'))"
RUN R -e "BiocManager::install(c('chromVAR', 'motifmatchr', 'ComplexHeatmap'))"
# install devtools::install_github("satijalab/seurat-data")
RUN R -e "devtools::install_github(c('satijalab/seurat-data', 'caleblareau/BuenColors', 'buenrostrolab/FigR'))"
# install remotes::install_github("mojaveazure/seurat-disk")
RUN R -e "remotes::install_github(c('mojaveazure/seurat-disk'))"
# JUPYTER
RUN R -r "IRkernel::installspec(user = FALSE)"
# install python jupyter
RUN apt-get install -y python3-pip
RUN pip3 install jupyterlab numpy pandas matplotlib seaborn scikit-learn scipy statsmodels scanpy anndata muon
# install other python packages
RUN jupyter labextension install @techrah/text-shortcuts
# make it stay alive
CMD ["tail", "-f", "/dev/null"]
Below is an example of how to run using Docker compose:
version: "3"
volumes:
vscode_server: null
r_site_library: null
r_library: null
services:
r-lang:
# NOTE: if you already built this, just use the already built image
build:
# NOTE: change to where the Dockerfile for python dev container is located
context: ./docker
dockerfile: Dockerfile
image: alexdaiii/r_single_cell_base:0.0.1
volumes:
- vscode_server:/root/.vscode-server
- r_site_library:/usr/local/lib/R/site-library
- r_library:/usr/local/lib/R/library
# NOTE: change to where the code for python dev container is located
- .:/root/${WORKDIR:-code}
ports:
- ${REST_PORT:-8000}:8000
init: true
Content type
Image
Digest
sha256:a93b8dd14…
Size
2.1 GB
Last updated
over 2 years ago
docker pull alexdaiii/r_single_cell_base