-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.base
69 lines (57 loc) · 2.71 KB
/
Dockerfile.base
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
# This Dockerfile builds the quatradis base image with all main dependencies which are not
# dependent on any other source code. Using this image as the base provides a big speed up
# when building and testing quatradis.
FROM debian:bookworm-slim
# Install the system dependencies
RUN apt-get update -qq
# Install build tools
RUN apt-get install -y sudo bzip2 curl default-jre gcc gzip locales make procps unzip wget dirmngr gnupg apt-transport-https ca-certificates software-properties-common
# Install aligners
RUN apt-get install -y bwa minimap2 smalt
# Setup R
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-key '95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7' && \
add-apt-repository 'deb http://cloud.r-project.org/bin/linux/debian bookworm-cran40/' && \
apt-get update -qq && \
apt-get install -y r-base
# Install R dependencies
RUN Rscript -e "install.packages('BiocManager')" -e "BiocManager::install()" -e "BiocManager::install(c('edgeR','getopt', 'MASS'))"
# Install headers for build samtools and htslib
RUN apt-get install -y libcurl4-openssl-dev libdeflate-dev
# Install HTSlib to get bgzip installed as an executable
RUN wget https://github.com/samtools/htslib/releases/download/1.20/htslib-1.20.tar.bz2 -O htslib.tar.bz2 && \
tar -xjvf htslib.tar.bz2 && \
cd htslib-1.20 && \
make && \
make install && \
rm /htslib.tar.bz2 && rm -r /htslib-1.20
# Install samtools
RUN wget https://github.com/samtools/samtools/releases/download/1.20/samtools-1.20.tar.bz2 -O samtools.tar.bz2 && \
tar -xjvf samtools.tar.bz2 && \
cd samtools-1.20 && \
./configure && \
make && \
make install && \
rm /samtools.tar.bz2 && rm -r /samtools-1.20
# Install snakemake
# Set locales (required for running in Singularity)
RUN sed -i -e 's/# \(en_GB\.UTF-8 .*\)/\1/' /etc/locale.gen && \
touch /usr/share/locale/locale.alias && \
locale-gen
ENV LANG en_GB.UTF-8
ENV LANGUAGE en_GB:en
ENV LC_ALL en_GB.UTF-8
ENV SHELL /bin/bash
ENV PATH /opt/conda/bin:${PATH}
RUN /bin/bash -c "curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > miniconda.sh && \
bash miniconda.sh -b -p /opt/conda && \
rm miniconda.sh"
RUN /bin/bash -c "conda install -y -c conda-forge mamba && \
mamba create -q -y -c conda-forge -c bioconda -n quatradis python=3.11 snakemake snakemake-minimal && \
source activate quatradis && \
mamba install -q -y -c conda-forge -c bioconda snakemake snakemake-minimal && \
mamba install -q -y -c conda-forge singularity && \
conda clean --all -y && \
which python"
RUN echo "source activate quatradis" > ~/.bashrc
ENV PATH /opt/conda/envs/quatradis/bin:/home/quatradis/.local/bin:${PATH}
RUN pip install cython pysam pytest-cov semantic-version matplotlib scipy