-
Notifications
You must be signed in to change notification settings - Fork 240
Expand file tree
/
Copy pathDockerfile.centos7
More file actions
109 lines (94 loc) · 3.33 KB
/
Dockerfile.centos7
File metadata and controls
109 lines (94 loc) · 3.33 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
FROM centos:centos7 AS base-dependencies
LABEL author="James Cherry"
LABEL maintainer="James Cherry <[email protected]>"
# Install dev and runtime dependencies (use vault repos since mirror repos are discontinued)
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \
&& sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \
&& sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo \
&& yum update -y \
&& yum install -y centos-release-scl epel-release
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \
&& sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo \
&& sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo \
&& yum install -y devtoolset-11 git wget cmake3 make eigen3-devel tcl swig3 flex zlib-devel valgrind \
&& yum clean -y all
RUN ln -sf /usr/bin/cmake3 /usr/bin/cmake
# Download Bison
RUN wget https://ftp.gnu.org/gnu/bison/bison-3.8.2.tar.gz && \
tar -xvf bison-3.8.2.tar.gz && \
rm bison-3.8.2.tar.gz
# Build Bison
RUN source /opt/rh/devtoolset-11/enable && \
cd bison-3.8.2 && \
./configure && \
make -j`nproc` && \
make install
# Download CUDD
RUN wget https://raw.githubusercontent.com/davidkebo/cudd/main/cudd_versions/cudd-3.0.0.tar.gz && \
tar -xvf cudd-3.0.0.tar.gz && \
rm cudd-3.0.0.tar.gz
# Build CUDD
RUN source /opt/rh/devtoolset-11/enable && \
cd cudd-3.0.0 && \
mkdir ../cudd && \
./configure && \
make -j`nproc` && \
make install
# Download TCL
RUN wget http://prdownloads.sourceforge.net/tcl/tcl8.6.16-src.tar.gz && \
tar -xvf tcl8.6.16-src.tar.gz && \
rm tcl8.6.16-src.tar.gz
# Build TCL
RUN source /opt/rh/devtoolset-11/enable && \
cd tcl8.6.16 && \
./unix/configure && \
make -j`nproc` && \
make install
# Download and build GTest
RUN <<EOF
set -e
wget https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz
tar -xvf v1.14.0.tar.gz
source /opt/rh/devtoolset-11/enable
cd googletest-1.14.0
mkdir build && cd build
cmake ..
make -j$(nproc)
make install
cd ../..
rm -rf v1.14.0.tar.gz googletest-1.14.0
EOF
# Download and build fmt
# Ensure the Vault redirect is applied to everything including new installs
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo && \
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo && \
yum install -y ca-certificates git && \
update-ca-trust force-enable
# clone fmt compatible version (10.2.1)
RUN git config --global http.sslVerify false && \
git clone --depth 1 --branch 10.2.1 https://github.com/fmtlib/fmt.git /tmp/fmt
RUN source /opt/rh/devtoolset-11/enable && \
cd /tmp/fmt && \
mkdir build && cd build && \
cmake3 .. \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DFMT_TEST=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DFMT_DOC=OFF && \
make -j$(nproc) && \
make install
RUN rm -rf /tmp/fmt
################################################################
FROM base-dependencies AS builder
COPY . /OpenSTA
WORKDIR /OpenSTA
# Build
RUN rm -rf build && mkdir build
RUN source /opt/rh/devtoolset-11/enable && \
cd build && \
cmake .. && \
# LTO fails with -j
make
# Run sta on entry
ENTRYPOINT ["/OpenSTA/build/sta"]