forked from lnis-uofu/LSOracle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ubuntu.focal
51 lines (46 loc) · 1.3 KB
/
Dockerfile.ubuntu.focal
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
FROM ubuntu:20.04 AS runtime
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y --no-install-recommends\
libboost-program-options1.71.0 \
libreadline8 \
python3-numpy \
python3-matplotlib && \
apt-get clean
FROM runtime AS builder
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-10 \
g++-10 \
cmake \
libboost-program-options-dev \
libreadline-dev \
libpython3-dev \
pybind11-dev \
lcov \
gcovr \
git \
bison \
make \
libpython3.9-dev \
python3.9-distutils \
flex && \
apt-get clean
ENV CC=gcc-10 CXX=g++-10
# 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"]