-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
52 lines (39 loc) · 2.05 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# syntax=docker/dockerfile:1.3-labs
#############################################
# Dockerfile to build scSpotlight container #
#############################################
## From seurat docker
FROM r-base:4.4.0
## Maintainer
MAINTAINER oben <obennoname@gmail.com>
## Install pre-requisites
USER root
## BPCells requires libhdf5, which will not be properly handled when installing with pak
RUN apt update && apt install -y libhdf5-dev libxml2-dev libgsl-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype-dev libpng-dev libtiff5-dev libjpeg-dev libglpk-dev libcurl4-openssl-dev pandoc python3
## Install pak
RUN Rscript -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
## Set workdir
WORKDIR /app
## Copy repo from host into the container
COPY . .
## Install the app
RUN Rscript -e 'pak::pkg_install("local::.");'
## Install suggested packages
RUN Rscript -e 'pak::repo_add(bpcells = "https://bnprks.r-universe.dev"); pak::pkg_install("BPCells")'
RUN Rscript -e 'pak::repo_add(satijalab = "https://satijalab.r-universe.dev"); pak::pkg_install(c("presto", "glmGamPoi"))'
## Follow Dockstore's guide
## switch back to the ubuntu user so this tool (and the files written) are not owned by root
RUN groupadd -r -g 1001 ubuntu && useradd -m -r -g ubuntu -u 1001 ubuntu
USER ubuntu
## Install scVI
WORKDIR /work
##RUN wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge-pypy3-Linux-x86_64.sh && bash Miniforge-pypy3-Linux-x86_64.sh -b -p /home/ubuntu/miniforge-pypy3 && rm Miniforge-pypy3-Linux-x86_64.sh
## Use interactive shell (-i) to source ~/.bashrc
SHELL ["/bin/bash", "-c", "-i"]
##RUN /home/ubuntu/miniforge-pypy3/bin/mamba init
##RUN conda config --set auto_activate_base false
##RUN mamba create -n scvi-env python=3.9 -y && mamba clean -t -c
# expose 80 port
EXPOSE 8081
## setup default cmd
CMD ["Rscript", "-e", "scSpotlight::run_app(options = list(port = 8081, host = '0.0.0.0', launch.browser = FALSE), runningMode = 'processing')"]