-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
76 lines (65 loc) · 1.79 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
64
65
66
67
68
69
70
71
72
73
74
75
76
# Stage 1: Build environment
FROM ubuntu:20.04 as builder
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update && apt-get install --no-install-recommends -y \
autoconf \
automake \
make \
gcc \
g++ \
libc6-dev \
libtool \
python3-dev \
zlib1g-dev \
wget \
python3-numpy \
python3-scipy \
python3-matplotlib \
python3-sphinx \
python3-distutils \
python3-setuptools \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /opt/kat \
&& chmod o+rx /opt /opt/kat
# Clone KAT repository
WORKDIR /build
RUN wget https://github.com/TGAC/KAT/archive/refs/tags/Release-2.4.1.tar.gz \
&& tar xvzf Release-2.4.1.tar.gz
# Build KAT
WORKDIR /build/KAT-Release-2.4.1
RUN ./build_boost.sh
RUN ./autogen.sh
RUN ./configure --prefix /opt/kat
RUN make
RUN make install
# Stage 2: Runtime environment
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
# Install runtime dependencies
RUN apt-get update && apt-get install --no-install-recommends -y \
zlib1g \
python3 \
libpython3.8 \
libtool \
libc6 \
python3-numpy \
python3-scipy \
python3-matplotlib \
python3-sphinx \
python3-distutils \
python3-setuptools \
python3-tabulate \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /opt/kat \
&& chmod o+rx /opt /opt/kat
# Copy the built KAT binaries from the builder stage
COPY --from=builder /opt/kat/bin /opt/kat/bin
COPY --from=builder /opt/kat/lib /opt/kat/lib
RUN ln -s /opt/kat/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
# Set the environment variable to find shared libraries
ENV LD_LIBRARY_PATH=/opt/kat/lib:$LD_LIBRARY_PATH
ENV PATH=/opt/kat/bin:$PATH
# Define the default command to run KAT
ENTRYPOINT ["/opt/kat/bin/kat"]