Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speed up cpp and python builds #362

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
speed up cpp and python builds
  • Loading branch information
timkpaine committed Jan 5, 2019
commit 4c911b399af99275538b45c994a151fb88f36c12
5 changes: 1 addition & 4 deletions docker/cpp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
# the Apache License 2.0. The full license can be found in the LICENSE file.
#

FROM node:8
FROM timkpaine/perspective-cpp

WORKDIR /usr/src/app
ADD . /usr/src/app

RUN apt-get update
RUN apt-get -y install apt-transport-https libtbb-dev cmake libboost-all-dev

RUN yarn
RUN yarn build_cpp
16 changes: 16 additions & 0 deletions docker/cpp/Dockerfile.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# *****************************************************************************
#
# Copyright (c) 2019, the Perspective Authors.
#
# This file is part of the Perspective library, distributed under the terms of
# the Apache License 2.0. The full license can be found in the LICENSE file.
#

FROM node:8

WORKDIR /usr/src/app
ADD . /usr/src/app

RUN apt-get update
RUN apt-get -y install apt-transport-https libtbb-dev cmake libboost-all-dev

18 changes: 1 addition & 17 deletions docker/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,11 @@
# the Apache License 2.0. The full license can be found in the LICENSE file.
#

FROM python:3.7
FROM timkpaine/perspective-python-binding

WORKDIR /usr/src/app
ADD . /usr/src/app

RUN apt-get update
RUN apt-get -y install apt-transport-https libtbb-dev cmake
RUN apt-get -y remove python3

RUN python3.7 -m pip install numpy pandas

RUN ls -al /usr/local/lib/python3.7/site-packages/numpy

RUN wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.gz >/dev/null 2>&1 || echo "wget failed"
RUN tar xfz boost_1_67_0.tar.gz
RUN cd boost_1_67_0 && CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/usr/local/include/python3.7m" C_INCLUDE_PATH="$C_INCLUDE_PATH:/usr/local/include/python3.7m" ./bootstrap.sh --with-python=/usr/local/bin/python3.7 || echo "boostrap failed"
RUN cd boost_1_67_0 && CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/usr/local/include/python3.7m" C_INCLUDE_PATH="$C_INCLUDE_PATH:/usr/local/include/python3.7m" ./b2 -j4 install || echo "build boost failed"

RUN ln -s /usr/local/lib/libboost_python37.so /usr/local/lib/libboost_python.so
RUN ln -s /usr/local/lib/libboost_numpy37.so /usr/local/lib/libboost_numpy.so

RUN python3 -m pip install codecov nose2 mock flake8
RUN python3 -m pip install -r python/requirements.txt

Expand Down
29 changes: 29 additions & 0 deletions docker/python/Dockerfile.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# *****************************************************************************
#
# Copyright (c) 2019, the Perspective Authors.
#
# This file is part of the Perspective library, distributed under the terms of
# the Apache License 2.0. The full license can be found in the LICENSE file.
#

FROM python:3.7

WORKDIR /usr/src/app
ADD . /usr/src/app

RUN apt-get update
RUN apt-get -y install apt-transport-https libtbb-dev cmake
RUN apt-get -y remove python3

RUN python3.7 -m pip install numpy pandas

RUN ls -al /usr/local/lib/python3.7/site-packages/numpy

RUN wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.gz >/dev/null 2>&1 || echo "wget failed"
RUN tar xfz boost_1_67_0.tar.gz
RUN cd boost_1_67_0 && CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/usr/local/include/python3.7m" C_INCLUDE_PATH="$C_INCLUDE_PATH:/usr/local/include/python3.7m" ./bootstrap.sh --with-python=/usr/local/bin/python3.7 || echo "boostrap failed"
RUN cd boost_1_67_0 && CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/usr/local/include/python3.7m" C_INCLUDE_PATH="$C_INCLUDE_PATH:/usr/local/include/python3.7m" ./b2 -j4 install || echo "build boost failed"

RUN ln -s /usr/local/lib/libboost_python37.so /usr/local/lib/libboost_python.so
RUN ln -s /usr/local/lib/libboost_numpy37.so /usr/local/lib/libboost_numpy.so