-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
91 lines (84 loc) · 3.17 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
FROM r-base:4.0.5
LABEL maintainer="Nacho Garcia <[email protected]>"
ENV PATH="/home/docker/miniconda3/envs/pangolin/bin:/home/docker/Scripts:/home/docker/miniconda3/bin:${PATH}"
ARG PATH="/home/docker/miniconda3/envs/pangolin/bin:/home/docker/Scripts:/home/docker/miniconda3/bin:${PATH}"
RUN apt-get update -qq \
&& apt-get -y --no-install-recommends install \
liblzma-dev \
libcurl4-openssl-dev \
libxml2-dev \
libgc-dev \
libssl-dev \
gcc-9 \
libpoppler-cpp-dev \
nano \
procps \
wget \
git-all \
bc \
rsync \
nodejs \
npm
RUN mkdir -p /home/docker/Scripts /home/docker/Data /home/docker/CommonFiles /home/docker/Fastq /home/docker/Binaries \
&& npm install --global @nextstrain/[email protected]
RUN userdel docker && useradd -ms /bin/bash docker
ARG USER=docker
ARG GROUP=docker
ARG UID
ARG GID
ENV USER=$USER
ENV GROUP=$GROUP
ENV UID=$UID
ENV GID=$GID
ENV HOME="/home/${USER}"
USER docker
RUN cd /home/docker \
&& wget \
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& mkdir /home/docker/.conda \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh \
&& conda config --add channels defaults \
&& conda config --add channels bioconda \
&& conda config --add channels conda-forge \
&& conda install ivar \
&& conda install -c bioconda seqkit \
&& conda update -n base -c defaults conda \
&& conda install -c bioconda bedtools \
&& conda install -c bioconda nextalign \
&& conda install seaborn \
&& git clone https://github.com/cov-lineages/pangolin \
&& cd pangolin \
&& conda env create -f environment.yml \
&& pip install . \
&& pip install seaborn \
&& pip install matplotlib \
&& cd /home/docker \
&& git clone https://github.com/artic-network/fieldbioinformatics \
&& cd fieldbioinformatics \
&& conda env create -f environment.yml
RUN /bin/bash -c ". activate artic && \
cd /home/docker/fieldbioinformatics && \
python setup.py install"
USER root
RUN Rscript -e "install.packages(c('doSNOW', \
'progress','foreach','parallel', 'pdftools', 'doParallel', \
'BiocManager', 'ggplot2', 'seqinr', 'xgboost', 'reshape2', 'httr','phangorn','ggpubr' ,'ape','readxl', 'geomnet','rvest', 'tidyverse','writexl','nnet', 'stringr', 'devtools'))"
RUN Rscript -e "devtools::install_github('sctyner/geomnet')"
RUN rm -rf /var/lib/apt/lists/* \
&& rm /usr/bin/gcc /usr/bin/gcc-ar /usr/bin/gcc-nm /usr/bin/gcc-ranlib \
&& ln /usr/bin/gcc-nm-9 /usr/bin/gcc-nm \
&& ln /usr/bin/gcc-ar-9 /usr/bin/gcc-ar \
&& ln /usr/bin/gcc-9 /usr/bin/gcc \
&& ln /usr/bin/gcc-ranlib-9 /usr/bin/gcc-ranlib \
&& ln -s /home/docker/miniconda3/lib/libcrypto.so.1.1 /home/docker/miniconda3/lib/libcrypto.so.1.0.0
RUN Rscript -e "BiocManager::install(c('msa','GenomicAlignments','ggtree'))"
COPY CommonFiles/ /home/docker/CommonFiles/
COPY Scripts/ /home/docker/Scripts/
COPY Binaries/ /home/docker/Binaries/
RUN chmod +x /home/docker/Binaries/* \
&& chmod +x /home/docker/Scripts/* \
&& chmod -R 777 /home/docker/CommonFiles\
&& mv /home/docker/Binaries/* /usr/bin
USER docker
WORKDIR /home/docker/Fastq