FROM centos:centos7 AS base-dependencies LABEL author="James Cherry" LABEL maintainer="James Cherry " # 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 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"]