-
Notifications
You must be signed in to change notification settings - Fork 41
/
Dockerfile.ubuntu.bionic
56 lines (49 loc) · 1.74 KB
/
Dockerfile.ubuntu.bionic
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
FROM ubuntu:18.04 AS runtime
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y --no-install-recommends\
libboost-program-options1.65.1 \
libreadline7 \
python3-numpy \
python3-matplotlib && \
apt-get clean
FROM runtime AS builder
RUN apt-get update && \
apt-get install -y software-properties-common apt-transport-https ca-certificates gnupg software-properties-common wget && \
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' && \
add-apt-repository ppa:ubuntu-toolchain-r/test
RUN export DEBIAN_FRONTEND=noninteractive; \
export DEBCONF_NONINTERACTIVE_SEEN=true; \
echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \
apt-get update && \
apt-get install -y tzdata \
gcc-8 \
g++-8 \
cmake \
libboost-program-options-dev \
libreadline-dev \
libpython3-dev \
pybind11-dev \
lcov \
gcovr \
git \
bison \
swig \
flex && \
apt-get clean
ENV CC=/usr/bin/gcc-8 CXX=/usr/bin/g++-8
# RUN git clone https://github.com/berkeley-abc/abc.git &&
# cd abc && make && \
# cp abc/abc /usr/local/bin/abc
FROM builder AS compiled
RUN mkdir -p /LSOracle/build
COPY . /LSOracle/
WORKDIR /LSOracle
RUN cmake -B build -D CMAKE_BUILD_TYPE=RELEASE . && cmake --build build -j$(nproc)
FROM runtime AS dist
RUN mkdir -p /LSOracle
WORKDIR /LSOracle
COPY --from=compiled /LSOracle /LSOracle
ENV PATH="/LSOracle/build/core:${PATH}"
CMD ["lsoracle"]