-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathDockerfile_mkl
More file actions
79 lines (68 loc) · 2.87 KB
/
Dockerfile_mkl
File metadata and controls
79 lines (68 loc) · 2.87 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Filename: Dockerfile_mkl
# make this global
ARG LIB_INSTALL
ARG LIB_INSTALL2
FROM public.ecr.aws/ubuntu/ubuntu:22.04 AS builder
ARG BOOST_IO
ARG LIB_INSTALL
ARG STATIC
ARG CMAKE_VERSION_MAJOR=3.13
ARG CMAKE_VERSION_MINOR=0
ARG HTSLIB_VERSION=1.18
WORKDIR /src
ADD http://cmake.org/files/v${CMAKE_VERSION_MAJOR}/cmake-${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}-Linux-x86_64.sh cmake_install.sh
ADD http://code.enkre.net/bgen/tarball/release/v1.1.7 v1.1.7.tgz
ADD https://github.com/samtools/htslib/releases/download/$HTSLIB_VERSION/htslib-$HTSLIB_VERSION.tar.bz2 htslib-$HTSLIB_VERSION.tar.bz2
ADD https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB intel_key.PUB
COPY . /src/regenie
# install BGEN and HTSlib libraries
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc-9 \
g++-9 \
gfortran-9 \
libz-dev \
bzip2 \
libbz2-dev \
liblzma-dev \
libcurl4-openssl-dev \
libssl-dev \
make \
gnupg \
python3 \
zlib1g-dev \
apt-transport-https ca-certificates \
$LIB_INSTALL \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 \
&& update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-9 70 \
&& update-alternatives --install /usr/bin/f77 f77 /usr/bin/gfortran-9 70 \
&& update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-9 70 \
&& tar -xf htslib-$HTSLIB_VERSION.tar.bz2 \
&& cd htslib-$HTSLIB_VERSION/ \
&& ./configure \
&& make \
&& make install \
&& cd .. \
&& sh cmake_install.sh --prefix=/usr/local --skip-license --exclude-subdir \
&& rm cmake_install.sh \
&& tar -xzf v1.1.7.tgz \
&& rm v1.1.7.tgz \
&& cd v1.1.7 \
&& python3 waf configure \
&& python3 waf \
&& cd .. \
&& sh -c 'cat intel_key.PUB | gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null' \
&& sh -c 'echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list' \
&& apt-get update \
&& apt-get install intel-oneapi-mkl-devel -y --no-install-recommends \
&& . /opt/intel/oneapi/setvars.sh \
&& echo "MKL_THREADING_LAYER=GNU" >> /etc/environment \
&& cd /src/regenie \
&& BGEN_PATH=/src/v1.1.7 HAS_BOOST_IOSTREAM=$BOOST_IO MKLROOT=$MKLROOT HTSLIB_PATH=/usr/local/lib/ STATIC=1 cmake . \
&& make
# no need to install Boost IO and MKL here (static linking)
FROM public.ecr.aws/ubuntu/ubuntu:22.04
RUN apt-get update && apt-get install -y --no-install-recommends \
libgomp1 gfortran-9 \
libz-dev libbz2-dev liblzma-dev libcurl4-openssl-dev libssl-dev \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /src/regenie/regenie /usr/local/bin