blob: e467b493fd26f1a0a3291b3ae8dd7ca9d8c30699 [file] [log] [blame] [edit]
# syntax = docker/dockerfile:1.0-experimental
FROM centos:centos6 AS build
# 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-8 devtoolset-8-libatomic-devel
ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc \
CPP=/opt/rh/devtoolset-8/root/usr/bin/cpp \
CXX="/opt/rh/devtoolset-8/root/usr/bin/g++ -lrt" \
PATH=/opt/rh/devtoolset-8/root/usr/bin:$PATH \
LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:$LD_LIBRARY_PATH
# Install CMake
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 pcre-devel
# Install SWIG
RUN yum remove -y swig \
&& wget https://github.com/swig/swig/archive/rel-4.0.1.tar.gz \
&& tar xfz rel-4.0.1.tar.gz \
&& rm -rf rel-4.0.1.tar.gz \
&& cd swig-rel-4.0.1 \
&& ./autogen.sh && ./configure --prefix=/usr && make -j $(nproc) && make install \
&& cd /tmp \
&& rm -rf swig-rel-4.0.1
# Install python dev
RUN yum install -y https://centos6.iuscommunity.org/ius-release.rpm && \
yum update -y && \
yum install -y python36u python36u-libs python36u-devel python36u-pip
RUN yum install -y http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm
RUN yum install -y git
RUN git clone --recursive https://github.com/The-OpenROAD-Project/OpenPhySyn \
&& cd OpenPhySyn
# Build
WORKDIR OpenPhySyn
RUN mkdir build && mkdir /build
RUN cd build && cmake -DCMAKE_BUILD_TYPE=release \
-DCMAKE_INSTALL_PREFIX=/build/ .. && make -j4
RUN mkdir /build/bin && cp build/Psn /build/bin/ && cp -r build/transforms /build/
RUN mkdir -p /build/version
RUN date +"Build Timestamp: %Y-%m-%d_%H-%M-%S" > /build/version/openphysyn.version
RUN git rev-parse HEAD >> /build/version/openphysyn.version
RUN tar -czf /build.tar.gz /build