Skip to content

Commit

Permalink
Fixed docker containers and travis
Browse files Browse the repository at this point in the history
  • Loading branch information
texodus committed Oct 30, 2019
1 parent 681f7ff commit 966d533
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ env:
install:
- if [ "$TEST" = "CPP_OSX" ]; then brew install yarn; fi
- if [ "$TEST" = "PYTHON" ]; then nvm install 10.13.0 && nvm use 10.13.0; fi
- if [ "$TEST" = "PYTHON2" ]; then nvm install 10.13.0 && nvm use 10.13.0; fi
- node --version
- yarn

Expand All @@ -58,6 +59,6 @@ script:
- if [ "$TEST" = "CPP" ]; then PSP_DOCKER=1 yarn build_cpp; fi
- if [ "$TEST" = "CPP" ]; then PSP_DOCKER=1 yarn test_cpp; fi
- if [ "$TEST" = "PYTHON" ]; then PSP_DOCKER=1 yarn ci_python; fi
- if [ "$TEST" = "PYTHON" ]; then PSP_DOCKER=1 yarn ci_python --python2; fi
- if [ "$TEST" = "PYTHON2" ]; then PSP_DOCKER=1 yarn ci_python --python2; fi
- if [ "$TEST" = "CPP_OSX" ]; then yarn build_cpp; fi
- if [ "$TEST" = "CPP_OSX" ]; then yarn test_cpp; fi
12 changes: 11 additions & 1 deletion docker/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,21 @@
FROM python:3.7

RUN apt-get update
RUN apt-get -y install apt-transport-https libtbb-dev rapidjson-dev cmake sudo
RUN apt-get -y install apt-transport-https libtbb-dev rapidjson-dev sudo
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
RUN apt-get -y install npm
RUN apt-get -y remove python3

RUN wget https://cmake.org/files/v3.15/cmake-3.15.4-Linux-x86_64.sh -q
RUN mkdir /opt/cmake
RUN printf "y\nn\n" | sh cmake-3.15.4-Linux-x86_64.sh --prefix=/opt/cmake > /dev/null
RUN rm -fr cmake*.sh /opt/cmake/doc
RUN rm -fr /opt/cmake/bin/cmake-gui
RUN rm -fr /opt/cmake/bin/ccmake
RUN rm -fr /opt/cmake/bin/cpack
RUN ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
RUN ln -s /opt/cmake/bin/ctest /usr/local/bin/ctest

RUN python3.7 -m pip install numpy pandas

RUN ls -al /usr/local/lib/python3.7/site-packages/numpy
Expand Down
21 changes: 16 additions & 5 deletions docker/python2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@
FROM python:2.7

RUN apt-get update
RUN apt-get -y install apt-transport-https libtbb-dev rapidjson-dev cmake sudo
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
RUN apt-get -y install npm
RUN apt-get -y install apt-transport-https libtbb-dev rapidjson-dev sudo
RUN apt-get -y remove python

RUN wget https://cmake.org/files/v3.15/cmake-3.15.4-Linux-x86_64.sh -q
RUN mkdir /opt/cmake
RUN printf "y\nn\n" | sh cmake-3.15.4-Linux-x86_64.sh --prefix=/opt/cmake > /dev/null
RUN rm -fr cmake*.sh /opt/cmake/doc
RUN rm -fr /opt/cmake/bin/cmake-gui
RUN rm -fr /opt/cmake/bin/ccmake
RUN rm -fr /opt/cmake/bin/cpack
RUN ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
RUN ln -s /opt/cmake/bin/ctest /usr/local/bin/ctest

RUN python2.7 -m pip install numpy pandas

RUN ls -al /usr/local/lib/python2.7/site-packages/numpy
Expand All @@ -28,9 +36,12 @@ RUN ln -s /usr/local/lib/libboost_python27.so /usr/local/lib/libboost_python.so
RUN ln -s /usr/local/lib/libboost_numpy27.so /usr/local/lib/libboost_numpy.so

RUN python2.7 -m pip install 'mock==2.0.0' codecov nose2 flake8 pytest pytest-cov traitlets ipywidgets faker psutil zerorpc 'backports.shutil_which'
RUN python2.7 -m pip install 'numpy>=1.13.1' 'pandas>=0.22.0' 'pyarrow==0.15.0'
RUN python2.7 -m pip install 'numpy>=1.13.1' 'pandas>=0.22.0' 'pyarrow==0.15.0' git+https://chromium.googlesource.com/external/gyp

RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
RUN apt-get -y install nodejs

RUN curl -o- -L https://yarnpkg.com/install.sh | bash
RUN npm install --global yarn
RUN yarn --version

RUN mkdir -p /usr/local \
Expand Down
7 changes: 1 addition & 6 deletions scripts/ci_python.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,7 @@ try {
let build_cmd = `${python} -m pip install -r requirements-dev.txt &&\
${python} setup.py build &&\
${python} -m flake8 perspective && echo OK &&\
${python} -m pytest -v perspective --cov=perspective &&\
make -C ./docs html &&\
${python} -m pip install . &&\
codecov --token 0f25973b-091f-42fe-a469-95d1c6f7a957 &&\
${python} setup.py sdist &&\
cd dist/ && ${python} -m pip install -U ./perspective*`;
${python} -m pytest -v perspective --cov=perspective`;

if (process.env.PSP_DOCKER) {
cmd = `cd python/perspective && ${build_cmd}`;
Expand Down

0 comments on commit 966d533

Please sign in to comment.