-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-celery
216 lines (192 loc) · 10.5 KB
/
Dockerfile-celery
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
FROM ubuntu:16.04
RUN dpkg --add-architecture i386 # for sspro4
RUN apt-get update
RUN apt-get install -y build-essential git wget gfortran libc6:i386 libncurses5:i386 libstdc++5:i386
RUN mkdir -p /usr/src/app
RUN mkdir -p /deps
# kmad
RUN apt-get install -y libboost-all-dev libconfig++-dev
RUN git clone https://github.com/cmbi/kmad.git /deps/kmad ;\
cd /deps/kmad ;\
git checkout v1.08 ;\
cd /deps/kmad ; ./configure ; make -j ; make install ;\
rm -rf /deps/kmad
# Tisean
RUN wget -q http://www.mpipks-dresden.mpg.de/%7Etisean/TISEAN_3.0.1.tar.gz -P /deps ;\
mkdir -p /deps/tisean ; tar zxf /deps/TISEAN_3.0.1.tar.gz -C /deps/tisean --strip-components=1 ;\
cd /deps/tisean ; export FC=gfortran ;\
./configure ; make -j ; cp source_c/sav_gol /usr/local/bin ;\
rm /deps/TISEAN_3.0.1.tar.gz ; rm -rf /deps/tisean
# GlobPipe
COPY globplot-fix_biopython.diff /usr/src/app
RUN wget -q http://globplot.embl.de/html/GlobPipe-2.3.tgz -P /deps;\
mkdir -p /deps/globpipe ; tar zxf /deps/GlobPipe-2.3.tgz -C /deps/globpipe --strip-components=1 ;\
patch /deps/globpipe/GlobPipe.py /usr/src/app/globplot-fix_biopython.diff ;\
cp /deps/globpipe/GlobPipe.py /usr/local/bin ;\
rm /deps/GlobPipe-2.3.tgz ; rm -rf /deps/globpipe
# netphos
# TODO: edit tsch script variables with sed
RUN apt-get install -y tcsh gawk
COPY vendor/netphos-3.1.Linux.tar.Z /deps
RUN mkdir -p /deps/netphos ; tar zxf /deps/netphos-3.1.Linux.tar.Z -C /deps/netphos --strip-components=1
RUN ln -s /deps/netphos/ape /usr/local/bin/netphos-3.1 ;\
ln -s /usr/local/bin/netphos-3.1 /usr/local/bin/netphos ;\
# Set environment variables
sed -i '21s/.*/setenv APE \/deps\/netphos/' /deps/netphos/ape ;\
sed -i '28s/.*/setenv TMP \/tmp/' /deps/netphos/ape ;\
rm /deps/netphos-3.1.Linux.tar.Z
# TODO: When the test below fails, docker can't detect it (tcsh related?)
RUN wget -q "https://www.rcsb.org/pdb/download/downloadFastaFiles.do?structureIdList=1CRN&compressionType=uncompressed" -O 1crn.fasta ;\
netphos 1crn.fasta ;\
rm 1crn.fasta
# ncbi blast
# version 2.2.26 for blastpgp
# TODO: copy above executables only
RUN wget -q ftp://ftp.ncbi.nlm.nih.gov/blast/executables/legacy.NOTSUPPORTED/2.2.26/blast-2.2.26-x64-linux.tar.gz -P /deps ;\
mkdir -p /deps/blast ;\
tar zxf /deps/blast-2.2.26-x64-linux.tar.gz -C /deps/blast --strip-components=1 ;\
cp /deps/blast/bin/blastpgp /usr/local/bin/ ;\
cp /deps/blast/bin/makemat /usr/local/bin/ ;\
cp -r /deps/blast/data /usr/local/bin/ ;\
rm /deps/blast-2.2.26-x64-linux.tar.gz ; rm -rf /deps/blast
# version 2.5.0 for blastp, psiblast
RUN wget -q ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.5.0/ncbi-blast-2.5.0+-x64-linux.tar.gz -P /deps ;\
mkdir -p /deps/blast ;\
tar zxf /deps/ncbi-blast-2.5.0+-x64-linux.tar.gz -C /deps/blast --strip-components=1 ;\
cp /deps/blast/bin/blastp /usr/local/bin ;\
cp /deps/blast/bin/psiblast /usr/local/bin ;\
rm /deps/ncbi-blast-2.5.0+-x64-linux.tar.gz ; rm -rf /deps/blast
# disopred
RUN wget -q http://bioinfadmin.cs.ucl.ac.uk/downloads/DISOPRED/OLD/DISOPRED3.15.tar.gz -P /deps;\
mkdir -p /deps/disopred ; tar zxf /deps/DISOPRED3.15.tar.gz -C /deps/disopred --strip-components=1 ;\
cd /deps/disopred/src; make; make install ;\
rm /deps/DISOPRED3.15.tar.gz ;\
sed -i '23s/-a 1 /-a 15 /' /deps/disopred/run_disopred.pl ;\
sed -i '18s/.*/my $NCBI_DIR = "\/usr\/local\/bin\/";/' /deps/disopred/run_disopred.pl ;\
sed -i '19s/.*/my $SEQ_DB = "\/data\/uniref\/uniref90";/' /deps/disopred/run_disopred.pl
# sspro4
# depends on volume mounts for nr, big
# depends on nciblast2.2.8
# TODO: edit process-blast.pl with sed (in readme)
# TODO: get libstdc++.so.5
# TODO: install?
COPY vendor/sspro4.tar.gz /deps
RUN mkdir -p /deps/sspro4 ; tar zxf /deps/sspro4.tar.gz -C /deps/sspro4 --strip-components=1 ;\
cd /deps/sspro4 ;\
mkdir -p /data/nr ; mkdir -p /data/big ;\
# Set paths for installation and databanks
sed -i '24s/.*/$install_dir = "\/deps\/sspro4"; chdir $install_dir;/' configure.pl ;\
sed -i '44s/.*/$nr_db_dir = "\/data\/";/' configure.pl ;\
sed -i '47s/.*/$big_db_dir = "\/data\/big\/";/' configure.pl ;\
sed -i '48s/blastpgp -i/blastpgp -a 15 -i /' script/generate_flatblast.pl ;\
sed -i '49s/blastpgp -i/blastpgp -a 15 -i /' script/generate_flatblast.pl ;\
# Remove lines that check if the databanks are present. These will be
# mounted later when the container runs.
sed -i '72,77 d' configure.pl ;\
sed -i '73,79 d' configure.pl ;\
sed -i '93,97 d' configure.pl ;\
# make symlinks to the pdb databases
ln -s /data/pdb_large/ /deps/sspro4/data/pdb_large ;\
ln -s /data/pdb_small/ /deps/sspro4/data/pdb_small ;\
sed -i '69,70 d' configure.pl ;\
sed -i '/data_dir/d' configure.pl ;\
sed -i '/test_dir/d' configure.pl ;\
# Fix process-blast
sed -i "s/$fileo.'.app'/$fileo/g" script/process-blast.pl ;\
./configure.pl
# version 2.2.8 for sspro4
RUN wget -q ftp://ftp.ncbi.nlm.nih.gov/blast/executables/legacy.NOTSUPPORTED/2.2.8/blast-2.2.8-amd64-linux.tar.gz -P /deps/sspro4 ;\
mkdir -p /deps/sspro4/blast2.2.8 ; \
tar zxf /deps/sspro4/blast-2.2.8-amd64-linux.tar.gz -C /deps/sspro4/blast2.2.8 --strip-components=1 ;\
rm /deps/sspro4/blast-2.2.8-amd64-linux.tar.gz ;
# predisorder
# TODO: get libstdc++.so.5
RUN wget -q http://sysbio.rnet.missouri.edu/multicom_toolbox/tools/predisorder1.1.tar.gz -P /deps;\
mkdir -p /deps/predisorder ; tar zxf /deps/predisorder1.1.tar.gz -C /deps/predisorder --strip-components=1 ;\
cd /deps/predisorder ;\
# Set paths for installation and sspro4
sed -i '17s/.*/$install_dir = "\/deps\/predisorder";/' configure.pl ;\
sed -i '20s/.*/$pspro_dir = "\/deps\/sspro4";/' configure.pl ;\
chmod a+x configure.pl ;\
chmod a+x /deps/predisorder/bin/predict_diso.sh ;\
chmod a+x /deps/predisorder/script/predict_diso.pl ;\
chmod a+x /deps/predisorder/server/predict_seq ; \
./configure.pl ;\
rm /deps/predisorder1.1.tar.gz
RUN wget -q "https://www.rcsb.org/pdb/download/downloadFastaFiles.do?structureIdList=1CRN&compressionType=uncompressed" -O 1crn.fasta ;\
/deps/predisorder/bin/predict_diso.sh 1crn.fasta test_name ;\
rm 1crn.fasta
RUN wget -q http://bioinfadmin.cs.ucl.ac.uk/downloads/psipred/old_versions/psipred3.5.tar.gz -P /deps;\
mkdir -p /deps/psipred3.5 ; tar zxf /deps/psipred3.5.tar.gz -C /deps/psipred3.5 --strip-components=1 ;\
cd /deps/psipred3.5/src ; make -j ; make install ;\
rm /deps/psipred3.5.tar.gz ; rm -rf /deps/psipred3.5
# psipred
# TODO: follow instructions in readme
# TODO: set paths in runpsipred
RUN wget -q http://bioinfadmin.cs.ucl.ac.uk/downloads/psipred/old_versions/psipred.4.0.tar.gz -P /deps;\
mkdir -p /deps/psipred ; tar zxf /deps/psipred.4.0.tar.gz -C /deps/psipred --strip-components=1 ;\
cd /deps/psipred/src ; make -j ; make install ;\
sed -i '20s/.\/bin/\/deps\/psipred\/bin/' /deps/psipred/runpsipred ; \
sed -i '23s/.\/data/\/deps\/psipred\/data/' /deps/psipred/runpsipred ; \
sed -i '36s/blastpgp/blastpgp -a 15 /' /deps/psipred/runpsipred ;\
sed -i 's/uniref90/\/data\/uniref\/uniref90/' /deps/psipred/runpsipred ;\
rm /deps/psipred.4.0.tar.gz
RUN wget -q "https://www.rcsb.org/pdb/download/downloadFastaFiles.do?structureIdList=1CRN&compressionType=uncompressed" -O 1crn.fasta ;\
/deps/psipred/runpsipred 1crn.fasta ;\
rm 1crn.fasta
# spine-x
# The sed command sets fortran, removing the prompt for a compiler.
RUN wget -q https://servers.sparks-lab.org/downloads/spineXpublic.tgz -P /deps;\
mkdir -p /deps/spinex ; tar zxf /deps/spineXpublic.tgz -C /deps/spinex --strip-components=1
RUN cd /deps/spinex/code ;\
sed -i '6s/read complr/complr=gfortran/' compile ;\
./compile ;\
rm /deps/spineXpublic.tgz
ENV spineXcodir /deps/spinex/code
ENV spineXblast /usr
# iupred
COPY vendor/iupred.tar.gz /deps
RUN mkdir -p /deps/iupred ;\
tar zxf /deps/iupred.tar.gz -C /deps/iupred --strip-components=1 ;\
cd /deps/iupred ;\
sed -i 's/ allocate enough memory: %d bytes/ allocate enough memory: %zu bytes/g' iupred.c &&\
cc iupred.c -o iupred ;\
rm /deps/iupred.tar.gz
# spine-d
RUN wget -q https://servers.sparks-lab.org/downloads/spinedlocal_v2.0.tar.gz -P /deps ;\
mkdir -p /deps/spined ; tar zxf /deps/spinedlocal_v2.0.tar.gz -C /deps/spined --strip-components=1 ;\
sed -i '16s/.*/blastprog=\/usr\/local\/bin\/psiblast/' /deps/spined/bin/run_spine-d && \
sed -i '38s/ncpu=4/ncpu=7/' /deps/spined/bin/run_spine-d && \
sed -i '19s/.*/nrdb=\/data\/nr/' /deps/spined/bin/run_spine-d && \
sed -i '22s/.*/spx=\/deps\/spinex/' /deps/spined/bin/run_spine-d && \
sed -i '25s/.*/export spd=\/deps\/spined/' /deps/spined/bin/run_spine-d && \
sed -i '28s/.*/export IUPred_PATH=\/deps\/iupred/' /deps/spined/bin/run_spine-d && \
sed -i 's/${workdir}\/compile/bash ${workdir}\/compile/g' /deps/spined/bin/run_spine-d && \
rm /deps/spinedlocal_v2.0.tar.gz
# clustalo/clustalw
RUN wget -q http://www.clustal.org/omega/clustalo-1.2.3-Ubuntu-x86_64 -P /deps ;\
mv /deps/clustalo-1.2.3-Ubuntu-x86_64 /usr/local/bin/clustalo; \
chmod +x /usr/local/bin/clustalo
RUN wget -q http://www.clustal.org/download/current/clustalw-2.1-linux-x86_64-libcppstatic.tar.gz -P /deps ;\
mkdir -p /deps/clustalw ; tar zxf /deps/clustalw-2.1-linux-x86_64-libcppstatic.tar.gz -C /deps/clustalw --strip-components=1 ;\
cp /deps/clustalw/clustalw2 /usr/local/bin ; \
chmod +x /usr/local/bin/clustalw2 ; \
rm /deps/clustalw-2.1-linux-x86_64-libcppstatic.tar.gz ; rm -rf /deps/clustalw
# mafft
RUN apt-get update
RUN apt-get install --fix-missing -y mafft
# muscle
RUN wget -q http://www.drive5.com/muscle/downloads3.8.31/muscle3.8.31_i86linux64.tar.gz -P /deps ;\
mkdir -p /deps/muscle ; tar zxf /deps/muscle3.8.31_i86linux64.tar.gz -C /deps/muscle ;\
cp /deps/muscle/muscle3.8.31_i86linux64 /usr/local/bin/muscle && \
rm /deps/muscle3.8.31_i86linux64.tar.gz ; rm -rf /deps/muscle
# tcoffee
RUN wget http://www.tcoffee.org/Packages/Stable/Latest/T-COFFEE_distribution_Version_13.41.0.28bdc39.tar.gz -P /deps ;\
mkdir -p /deps/tcoffee ; tar zxf /deps/T-COFFEE_distribution_Version_13.41.0.28bdc39.tar.gz -C /deps/tcoffee --strip-components=1 ;\
cd /deps/tcoffee/t_coffee_source ; make -j t_coffee && cp /deps/tcoffee/t_coffee_source/t_coffee /usr/local/bin
COPY requirements.txt .
RUN apt-get install -y python-pip
RUN pip install --upgrade pip
RUN pip install --no-cache -r requirements.txt
COPY . /usr/src/app
WORKDIR /usr/src/app