MOFA2 icon indicating copy to clipboard operation
MOFA2 copied to clipboard

Add GPU/CUDA support in Docker image

Open frederikziebell opened this issue 1 year ago • 0 comments

I have been working on creating a Docker image that allows to run MOFA2 in GPU mode. Here's the modified Dockerfile that can be used to create the image

FROM rocker/cuda:4.2.1-cuda11.1

WORKDIR /mofa2
ADD . /mofa2

RUN apt-get update && apt-get install -f && apt-get install -y python3 python3-setuptools python3-dev python3-pip
RUN pip3 install cupy-cuda111
RUN apt-get install -y libcurl4-openssl-dev 
RUN apt-get install -y libcairo2-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev libxt-dev libharfbuzz-dev libfribidi-dev

# Install mofapy2
RUN python3 -m pip install 'https://github.com/bioFAM/mofapy2/tarball/master'

# Install bioconductor dependencies
RUN R --vanilla -e "\
  if (!requireNamespace('BiocManager', quietly = TRUE)) install.packages('BiocManager', repos = 'https://cran.r-project.org'); \
  sapply(c('rhdf5', 'dplyr', 'tidyr', 'reshape2', 'pheatmap', 'corrplot', \
           'ggplot2', 'ggbeeswarm', 'scales', 'GGally', 'doParallel', 'RColorBrewer', \
           'cowplot', 'ggrepel', 'foreach', 'reticulate', 'HDF5Array', 'DelayedArray', \
           'ggpubr', 'forcats', 'Rtsne', 'uwot', \
           'systemfonts', 'ragg', 'Cairo', 'ggrastr', 'basilisk', 'mvtnorm'), \ 
         BiocManager::install)"
RUN R CMD INSTALL --build .

CMD []

Could you maybe add this to the repo and upload to Dockerhub?

The Docker image is about ~11GB, the corresponding singularity image has ~5GB.

frederikziebell avatar Jul 18 '22 07:07 frederikziebell