From 1d32e40a86b722486c48ee030c8f1d29252ddcd5 Mon Sep 17 00:00:00 2001 From: Matt Liberty Date: Thu, 13 Feb 2020 09:39:26 -0800 Subject: [PATCH] make Dockerfile match OpenROAD and require swig 3 --- CMakeLists.txt | 2 +- Dockerfile | 41 +++++++++++++++++++++-------------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ce5c9a..50ff075 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ add_subdirectory(src/tm) ################################# SWIG ##################################### ############################################################################ -set(SWIG_REQUIRED_VERSION "2.0") +set(SWIG_REQUIRED_VERSION "3.0") find_package(SWIG REQUIRED) if(${SWIG_VERSION} VERSION_LESS ${SWIG_REQUIRED_VERSION}) message(FATAL_ERROR "SWIG version ${SWIG_VERSION} must be at least ${SWIG_REQUIRED_VERSION}") diff --git a/Dockerfile b/Dockerfile index 879d3fb..dcb4546 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,25 @@ FROM centos:centos7 AS base-dependencies -LABEL maintainer "Abdelrahman Hosny " +LABEL maintainer="Abdelrahman Hosny " -# Install Development Environment -RUN yum group install -y "Development Tools" -RUN yum install -y wget git pcre-devel -RUN yum -y install centos-release-scl && \ - yum -y install devtoolset-8 devtoolset-8-libatomic-devel +# Install dev and runtime dependencies +RUN yum group install -y "Development Tools" \ + && yum install -y https://centos7.iuscommunity.org/ius-release.rpm \ + && yum install -y wget git centos-release-scl devtoolset-8 \ + devtoolset-8-libatomic-devel tcl-devel tcl tk libstdc++ tk-devel pcre-devel \ + python36u python36u-libs python36u-devel python36u-pip && \ + yum clean -y all && \ + rm -rf /var/lib/apt/lists/* + +# 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 + ./cmake-3.14.0-Linux-x86_64.sh --skip-license --prefix=/usr/local && rm -rf cmake-3.14.0-Linux-x86_64.sh \ + && yum clean -y all # Install epel repo -RUN wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -RUN yum install -y epel-release-latest-7.noarch.rpm +RUN wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \ + yum install -y epel-release-latest-7.noarch.rpm && rm -rf epel-release-latest-7.noarch.rpm \ + && yum clean -y all # Install SWIG RUN yum remove -y swig \ @@ -24,16 +31,10 @@ RUN yum remove -y swig \ && cd .. \ && rm -rf swig-rel-4.0.1 -# Install dev and runtime dependencies -RUN yum install -y tcl-devel tcl tk libstdc++ boost-devel \ - zlib-devel - -# Install python dev -RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm && \ - yum update -y && \ - yum install -y python36u python36u-libs python36u-devel python36u-pip - -RUN mkdir /.local && chmod 777 /.local && chmod 777 /usr/lib/python3.6/site-packages/ +# Install boost +RUN yum install -y boost-devel && \ + yum clean -y all && \ + rm -rf /var/lib/apt/lists/* FROM base-dependencies AS builder @@ -43,4 +44,4 @@ WORKDIR /OpenDB # Build RUN mkdir build -RUN cd build && cmake .. && make +RUN cd build && cmake .. && make -j 4