forked from The-OpenROAD-Project/TritonRoute
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Dockerfile to integrate with OpenROAD unified build
- Loading branch information
1 parent
3789374
commit 8c114dd
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Dockerfile | ||
.dockerignore | ||
.gitignore | ||
|
||
# from .gitignore file | ||
*.o | ||
|
||
build | ||
build/*.* | ||
Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM centos:centos6 AS builder | ||
|
||
# install gcc 8 | ||
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++ \ | ||
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 | ||
|
||
RUN yum install -y wget git pcre-devel tcl-devel tk-devel bison flex \ | ||
python-devel libxml2-devel libxslt-devel zlib-static glibc-static | ||
|
||
RUN wget http://prdownloads.sourceforge.net/swig/swig-4.0.0.tar.gz && \ | ||
tar -xf swig-4.0.0.tar.gz && \ | ||
cd swig-4.0.0 && \ | ||
./configure && \ | ||
make && \ | ||
make install | ||
|
||
# installing cmake for build dependency | ||
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 | ||
|
||
# installing boost for build dependency | ||
RUN wget https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.tar.bz2 && \ | ||
tar -xf boost_1_68_0.tar.bz2 && \ | ||
cd boost_1_68_0 && \ | ||
./bootstrap.sh && \ | ||
./b2 install | ||
|
||
COPY . /TritonRoute | ||
RUN mkdir TritonRoute/build | ||
WORKDIR /TritonRoute/build | ||
RUN cmake .. | ||
RUN make | ||
|
||
|
||
FROM centos:centos6 AS runner | ||
RUN yum update -y && yum install -y tcl-devel | ||
COPY --from=builder /TritonRoute/build/TritonRoute /build/TritonRoute | ||
|
||
RUN useradd -ms /bin/bash openroad | ||
USER openroad | ||
WORKDIR /home/openroad |