| |
| FROM centos:centos6 AS base-dependencies |
| |
| # Install Development Environment |
| RUN yum groupinstall -y "Development Tools" |
| RUN yum install -y wget git |
| RUN yum -y install centos-release-scl && \ |
| yum -y install devtoolset-7 devtoolset-7-libatomic-devel |
| RUN wget https://cmake.org/files/v3.14/cmake-3.14.0-Linux-x86_64.sh && \ |
| chmod +x cmake-3.14.0-Linux-x86_64.sh && \ |
| ./cmake-3.14.0-Linux-x86_64.sh --skip-license --prefix=/usr/local |
| |
| # Install epel repo |
| RUN wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm |
| RUN yum install -y epel-release-latest-6.noarch.rpm |
| |
| # Install dev and runtime dependencies |
| RUN yum install -y tcl-devel tcl tk libstdc++ tk-devel |
| |
| ENV CC=/opt/rh/devtoolset-7/root/usr/bin/gcc \ |
| CPP=/opt/rh/devtoolset-7/root/usr/bin/cpp \ |
| CXX=/opt/rh/devtoolset-7/root/usr/bin/g++ \ |
| PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH \ |
| LD_LIBRARY_PATH=/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:/opt/rh/devtoolset-7/root/usr/lib64/dyninst:/opt/rh/devtoolset-7/root/usr/lib/dyninst:/opt/rh/devtoolset-7/root/usr/lib64:/opt/rh/devtoolset-7/root/usr/lib:$LD_LIBRARY_PATH |
| |
| # build boost |
| RUN wget http://downloads.sourceforge.net/project/boost/boost/1.67.0/boost_1_67_0.tar.gz \ |
| && tar xfz boost_1_67_0.tar.gz \ |
| && rm -f boost_1_67_0.tar.gz \ |
| && cd boost_1_67_0 \ |
| && ./bootstrap.sh --prefix=/usr --with-libraries=program_options,log,filesystem \ |
| && ./b2 install -j $(nproc) |
| # Install python dev |
| RUN yum install -y install centos-release-scl \ |
| && yum install -y rh-python36 |
| ENV PATH=/opt/rh/rh-python36/root/usr/bin:$PATH |
| |
| |
| RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts |
| RUN yum install -y glibc-static |
| |
| |
| RUN git clone https://github.com/cuhk-eda/cu-gr.git |
| WORKDIR /cu-gr |
| |
| # Build |
| RUN python3 scripts/build.py -o release -m '\-j4' |
| |
| RUN mkdir -p /build/version /build/bin && cp ./build/iccad19gr /build/bin/cu_gr && cp ./drcu /build/bin/cu_dr |
| |
| RUN date +"Build Timestamp: %Y-%m-%d_%H-%M-%S" > /build/version/cu_gr.version |
| RUN git rev-parse HEAD >> /build/version/cu_gr.version |
| RUN tar -czf /build.tar.gz /build |
| |