-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
159 lines (135 loc) · 4.13 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
FROM python:3.11.0-buster
ENV RNA /rna
WORKDIR $RNA
RUN apt update
RUN apt upgrade -y
# Install all required packages
RUN apt install -y \
bedtools \
ca-certificates \
curl \
default-mysql-client \
devscripts \
freetds-dev \
gawk \
gcc \
git \
gzip \
hmmer \
jq \
lftp \
libbz2-dev \
liblzma-dev \
libncurses5-dev \
libncursesw5-dev \
libsqlite3-dev \
libssl1.1 \
libxml2-utils \
libxml2-dev \
libzip-dev \
moreutils \
mysql-common \
openssl \
pandoc \
patch \
pgloader \
postgresql-11 \
postgresql-client-11 \
procps \
python3 \
python3-dev \
python3-pip \
rsync \
sbcl \
tabix \
tar \
time \
unzip \
zlib1g-dev\
wget
# Install Infernal
RUN \
cd $RNA/ && \
curl -OL http://eddylab.org/infernal/infernal-1.1.2.tar.gz && \
tar -xvzf infernal-1.1.2.tar.gz && \
rm infernal-1.1.2.tar.gz && \
cd infernal-1.1.2 && \
./configure --prefix=$RNA/infernal-1.1.2 && \
make && \
make install && \
cd easel && \
make install
# Install blat
RUN \
wget https://users.soe.ucsc.edu/~kent/src/blatSrc35.zip && \
unzip blatSrc35.zip && \
rm blatSrc35.zip && \
cd blatSrc && \
mkdir bin && \
make MACHTYPE=x86_64 BINDIR=$PWD/bin
# Install seqkit
RUN \
mkdir seqkit && \
cd seqkit && \
wget https://github.com/shenwei356/seqkit/releases/download/v0.10.0/seqkit_linux_amd64.tar.gz && \
tar xvf seqkit_linux_amd64.tar.gz && \
rm seqkit_linux_amd64.tar.gz
# Install ribovore
RUN git clone https://github.com/nawrockie/epn-ofile.git && cd epn-ofile && git fetch && git fetch --tags && git checkout ribovore-0.40
RUN git clone https://github.com/nawrockie/epn-options.git && cd epn-options && git fetch && git fetch --tags && git checkout ribovore-0.40
RUN git clone https://github.com/nawrockie/epn-test.git && cd epn-test && git fetch && git fetch --tags && git checkout ribovore-0.40
RUN git clone https://github.com/nawrockie/ribovore.git && cd ribovore && git fetch && git fetch --tags && git checkout ribovore-0.40
# Install htslib
RUN \
wget https://github.com/samtools/htslib/releases/download/1.18/htslib-1.18.tar.bz2 && \
tar -jxf htslib-1.18.tar.bz2 && \
rm htslib-1.18.tar.bz2 && \
cd htslib-1.18 && \
make && \
make install
# Install samtools
RUN \
wget https://github.com/samtools/samtools/releases/download/1.18/samtools-1.18.tar.bz2 && \
tar jxf samtools-1.18.tar.bz2 && \
rm samtools-1.18.tar.bz2 && \
cd samtools-1.18 && \
make && \
make install
# Install python requirements
ENV RNACENTRAL_IMPORT_PIPELINE "$RNA/rnacentral-import-pipeline"
# Install useful pip version
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py
# Install poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
COPY poetry.lock $RNACENTRAL_IMPORT_PIPELINE/poetry.lock
COPY pyproject.toml $RNACENTRAL_IMPORT_PIPELINE/pyproject.toml
WORKDIR "$RNA/rnacentral-import-pipeline"
RUN PATH="$PATH:/root/.local/bin" poetry config virtualenvs.create false
RUN PATH="$PATH:/root/.local/bin" poetry install
RUN python3 -m textblob.download_corpora && python3 -m nltk.downloader words
## Download Rust toolchain
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
COPY utils ./utils
COPY Makefile Makefile
COPY Cargo.toml Cargo.toml
COPY Cargo.lock Cargo.lock
ENV PATH="$PATH:/root/.cargo/bin"
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
RUN make rust
WORKDIR $RNA
# Setup environmental variables
ENV PERL5LIB="/usr/bin/env:$PERL5LIB"
ENV RIBOINFERNALDIR="$RNA/infernal-1.1.2/bin"
ENV RIBODIR="$RNA/ribovore"
ENV RIBOEASELDIR="$RNA/infernal-1.1.2/bin"
ENV EPNOPTDIR="$RNA/epn-options"
ENV EPNOFILEDIR="$RNA/epn-ofile"
ENV EPNTESTDIR="$RNA/epn-test"
ENV RIBOTIMEDIR="/usr/bin"
ENV BIOEASELDIR="$RNA/Bio-Easel/blib/lib:$RNA/Bio-Easel/blib/arch:$RNA/Bio-Easel:$RNA/Bio-Easel/lib"
ENV PERL5LIB="$BIOEASELDIR:$RIBODIR:$EPNOPTDIR:$EPNOFILEDIR:$EPNTESTDIR:$PERL5LIB"
ENV PATH="$RNA/infernal-1.1.2/bin:$PATH"
ENV PATH="$RNA/blatSrc/bin:$PATH"
ENV PATH="$RNA/seqkit:$PATH"
ENV PATH="$RNACENTRAL_IMPORT_PIPELINE:$PATH"
ENTRYPOINT ["/bin/bash"]