-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (44 loc) · 1.98 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
## Start from this Docker image
FROM r-base:3.6.2
#FROM ubuntu
## Install R in Docker image
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y locales \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& update-locale LANG=en_US.UTF-8
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen
ENV PYTHONIOENCODING=utf-8
#RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y r-base
## Install R packages in Docker image
RUN Rscript -e 'install.packages("BiocManager"); BiocManager::install("S4Vectors")'
RUN echo "r <- getOption('repos'); r['CRAN'] <- 'http://cran.us.r-project.org'; options(repos = r);" > ~/.Rprofile
RUN Rscript -e "install.packages('readr')"
RUN Rscript -e "install.packages('dplyr')"
RUN Rscript -e "install.packages('reshape2')"
RUN Rscript -e "install.packages('caret')"
RUN Rscript -e "install.packages('e1071')"
RUN Rscript -e "install.packages('randomForest')"
RUN Rscript -e "install.packages('import')"
RUN Rscript -e "install.packages('foreach')"
RUN Rscript -e "install.packages('xgboost')"
RUN Rscript -e "install.packages('pls')"
#RUN Rscript -e 'install.packages("BiocManager"); BiocManager::install("DESeq2")'
RUN Rscript -e "install.packages('survival')"
RUN Rscript -e 'install.packages("BiocManager"); BiocManager::install("limma")'
RUN Rscript -e 'install.packages("BiocManager"); BiocManager::install("WGCNA")'
## Copy your files into Docker image
USER root
RUN mkdir /rds
#COPY model-fits.rds /rds/
#COPY dnaseqGenes.rds /rds/
#COPY rnaseqGenes.rds /rds/
#COPY rna-preProc.rds /rds/
COPY coxph-fit.rds /rds/
COPY beatAML_pred.R /usr/local/bin/
COPY predict_response.R /usr/local/bin/
RUN chmod a+x /usr/local/bin/beatAML_pred.R
RUN chmod a+x /usr/local/bin/predict_response.R
## Make Docker container executable
ENTRYPOINT Rscript --vanilla /usr/local/bin/predict_response.R