forked from UoB-HPC/SimEng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (27 loc) · 995 Bytes
/
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
# Builder container
FROM ubuntu:20.04 AS dev
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
cmake \
git \
llvm-9-dev \
ninja-build \
zlib1g-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/UoB-HPC/SimEng.git /root/SimEng && \
cd /root/SimEng && \
rm -rf build && \
CC=gcc CXX=g++ cmake -Bbuild -S. -GNinja -DSIMENG_OPTIMIZE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DSIMENG_ENABLE_TESTS=ON -DSIMENG_USE_EXTERNAL_LLVM=ON -DLLVM_DIR=/usr/lib/llvm-9/cmake && \
cd build && \
ninja && \
ninja install
# Tar file to preserve links when copying to the release container
RUN cd /usr/local && \
tar -cf simeng.tar.gz bin/simeng lib/libsimeng* include/simeng/*
## Release container
FROM ubuntu:20.04
COPY --from=dev /usr/local/simeng.tar.gz /root/
WORKDIR /root
RUN cd /usr/local && tar xf /root/simeng.tar.gz