forked from sanger-pathogens/ariba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
63 lines (52 loc) · 1.76 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
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
# Software version numbers
ARG BOWTIE2_VERSION=2.2.9
ARG SPADES_VERSION=3.13.1
ARG ARIBA_TAG=master
ARG ARIBA_BUILD_DIR=/ariba
ARG LOCALE_COUNTRY=en_GB
RUN apt-get -qq update && \
apt-get install --no-install-recommends -y \
build-essential \
cd-hit \
curl \
git \
libbz2-dev \
liblzma-dev \
mummer \
python3-dev \
python3-setuptools \
python3-pip \
python3-tk \
python3-matplotlib \
unzip \
wget \
zlib1g-dev
# Install locales
RUN apt-get update && apt-get install -y locales-all && rm -rf /var/lib/apt/lists/*
# Set a default locale.
ENV LANG=${LOCALE_COUNTRY}.UTF-8 \
LANGUAGE=${LOCALE_COUNTRY}:en
# Install bowtie
RUN wget -q http://downloads.sourceforge.net/project/bowtie-bio/bowtie2/${BOWTIE2_VERSION}/bowtie2-${BOWTIE2_VERSION}-linux-x86_64.zip \
&& unzip bowtie2-${BOWTIE2_VERSION}-linux-x86_64.zip \
&& rm -f bowtie2-${BOWTIE2_VERSION}-linux-x86_64.zip
# Install SPAdes
RUN wget -q https://github.com/ablab/spades/releases/download/v${SPADES_VERSION}/SPAdes-${SPADES_VERSION}-Linux.tar.gz \
&& tar -zxf SPAdes-${SPADES_VERSION}-Linux.tar.gz \
&& rm -f SPAdes-${SPADES_VERSION}-Linux.tar.gz
# Need MPLBACKEND="agg" to make matplotlib work without X11, otherwise get the error
# _tkinter.TclError: no display name and no $DISPLAY environment variable
ENV ARIBA_BOWTIE2=$PWD/bowtie2-${BOWTIE2_VERSION}/bowtie2 ARIBA_CDHIT=cdhit-est MPLBACKEND="agg"
ENV PATH=$PATH:$PWD/SPAdes-${SPADES_VERSION}-Linux/bin
RUN ln -s -f /usr/bin/python3 /usr/local/bin/python
# Install Ariba
RUN mkdir -p $ARIBA_BUILD_DIR
COPY . $ARIBA_BUILD_DIR
RUN cd $ARIBA_BUILD_DIR \
&& python3 setup.py clean --all \
&& python3 setup.py test \
&& python3 setup.py install \
&& rm -rf $ARIBA_BUILD_DIR
CMD ariba