forked from SamuelNicaise/variantconvert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (45 loc) · 1.91 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
FROM centos:7
MAINTAINER Samuel Nicaise
LABEL Software="tsvconvert"
RUN yum -y install sudo make wget bzip2 gcc
#conda
RUN cd /tmp
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
RUN bash Miniconda3-latest-Linux-x86_64.sh -b -p /usr/local/lib/miniconda3/
RUN echo 'export PATH="$PATH:/usr/local/lib/miniconda3/bin"' > /etc/profile.d/miniconda.sh
RUN chmod 755 /etc/profile.d/miniconda.sh
ENV PATH="$PATH:/usr/local/lib/miniconda3/bin"
RUN chmod -R 755 /usr/local/lib/miniconda3/
RUN rm -f /tmp/Miniconda3-latest-Linux-x86_64.sh
#work env
RUN conda create -n common python=3.9.7 pandas
RUN /usr/local/lib/miniconda3/envs/common/bin/pip install pyfaidx
RUN /usr/local/lib/miniconda3/envs/common/bin/pip install natsort
#bcftools
ENV BCFTOOLS_INSTALL_DIR=/opt/bcftools
ENV BCFTOOLS_VERSION=1.14
RUN yum -y install zlib-devel xz-devel bzip2-devel libcurl-devel
WORKDIR /tmp
RUN wget https://github.com/samtools/bcftools/releases/download/$BCFTOOLS_VERSION/bcftools-$BCFTOOLS_VERSION.tar.bz2 && \
tar --bzip2 -xf bcftools-$BCFTOOLS_VERSION.tar.bz2
WORKDIR /tmp/bcftools-$BCFTOOLS_VERSION
RUN make prefix=$BCFTOOLS_INSTALL_DIR && \
make prefix=$BCFTOOLS_INSTALL_DIR install
WORKDIR /
RUN ln -s $BCFTOOLS_INSTALL_DIR/bin/bcftools /usr/bin/bcftools && \
rm -rf /tmp/bcftools-$BCFTOOLS_VERSION
#htslib
ENV HTSLIB_INSTALL_DIR=/opt/htslib
ENV HTSLIB_VERSION=1.14
WORKDIR /tmp
RUN wget https://github.com/samtools/htslib/releases/download/$HTSLIB_VERSION/htslib-$HTSLIB_VERSION.tar.bz2 && \
tar --bzip2 -xf htslib-$HTSLIB_VERSION.tar.bz2
WORKDIR /tmp/htslib-$HTSLIB_VERSION
RUN make prefix=$HTSLIB_INSTALL_DIR && \
make prefix=$HTSLIB_INSTALL_DIR install
WORKDIR /
RUN ln -s $HTSLIB_INSTALL_DIR/bin/bgzip /usr/bin/bgzip
RUN ln -s $HTSLIB_INSTALL_DIR/bin/tabix /usr/bin/tabix
RUN rm -rf /tmp/htslib-$HTSLIB_VERSION
RUN echo "source activate common" > ~/.bashrc
ENTRYPOINT ["/usr/local/lib/miniconda3/envs/common/bin/python"]