-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (48 loc) · 1.65 KB
/
Copy pathDockerfile
File metadata and controls
59 lines (48 loc) · 1.65 KB
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
# In this image we do not include the R-based plot scripts.
FROM ubuntu:20.04 AS build
# Set noninterative mode
ENV DEBIAN_FRONTEND=noninteractive
ENV LD_LIBRARY_PATH="/usr/local/lib"
ARG HTSLIB_VERSION=1.23.1
ARG VERSION=v2.0.3
# apt update and install build requirements
RUN apt-get update \
&& apt-get install -y \
build-essential \
cmake \
g++ \
git \
wget \
libbz2-dev \
libcurl4-openssl-dev \
zlib1g-dev \
liblzma-dev
# Compile htslib
WORKDIR /deps
RUN wget -q https://github.com/samtools/htslib/releases/download/${HTSLIB_VERSION}/htslib-${HTSLIB_VERSION}.tar.bz2 \
&& tar -xf htslib-${HTSLIB_VERSION}.tar.bz2 \
&& mv htslib-${HTSLIB_VERSION} htslib
WORKDIR /deps/htslib
RUN autoheader; autoconf; ./configure --prefix=/usr/local/ \
&& make && make install
# Compile VerifyBamID. Version ${VERSION}
WORKDIR /
RUN git clone --depth 1 --branch ${VERSION} https://github.com/Griffan/VerifyBamID.git
WORKDIR /VerifyBamID/build
# -fsigned-char: VerifyBamID's genotype-missing sentinel relies on `char`
# being signed (default on x86_64 but not on aarch64), which otherwise
# breaks missing-genotype detection and fails testReadVcf.
RUN cmake -DCMAKE_C_FLAGS=-fsigned-char -DCMAKE_CXX_FLAGS=-fsigned-char .. && \
make && \
make test
# Final image
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND="noninteractive"
RUN apt update && apt install -y \
libgomp1 \
libcurl4-openssl-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /VerifyBamID/bin/VerifyBamID /usr/local/bin/
COPY --from=build /usr/local/lib/ /usr/local/lib/
CMD ["VerifyBamID"]