Skip to content

Commit

Permalink
Update .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rcmalli committed Oct 7, 2019
1 parent b67a2e1 commit dd13f5e
Showing 1 changed file with 35 additions and 22 deletions.
57 changes: 35 additions & 22 deletions .travis.yml
@@ -1,12 +1,16 @@
sudo: required
dist: trusty
language: python
cache:
directories:
- $HOME/.theano
matrix:
include:
- python: 3.6
env: KERAS_BACKEND=tensorflow
# command to install dependencies
env: KERAS_BACKEND=tensorflow MODE=TF2
install:
# code below is taken from http://conda.pydata.org/docs/travis.html
# We do this conditionally because it saves us some downloading if the
# version is the same.
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
Expand All @@ -20,30 +24,39 @@ install:
# Useful for debugging any issues with conda
- conda info -a

- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy scipy matplotlib pandas pytest h5py
- travis_retry conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
- source activate test-environment
- pip install theano

- travis_retry pip install --only-binary=numpy,scipy,pandas numpy nose scipy h5py theano pytest pytest-pep8 pandas --progress-bar off
- pip install keras_applications keras_preprocessing --progress-bar off

# set library path
- export LD_LIBRARY_PATH=$HOME/miniconda/envs/test-environment/lib/:$LD_LIBRARY_PATH

# install PIL for preprocessing tests
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
conda install pil;
elif [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then
conda install Pillow;
# install pydot for visualization tests
- travis_retry conda install -q $MKL pydot graphviz $PIL

- pip install -e .[tests] --progress-bar off

# install TensorFlow (CPU version).
- if [[ "$MODE" == "TF2" ]]; then
pip install tf-nightly-2.0-preview --progress-bar off;
else
pip install tensorflow==1.14.0 --progress-bar off;
fi
- pip install tensorflow
- pip install -e .

#install open mpi
- rm -rf ~/mpi
- mkdir ~/mpi
- pushd ~/mpi
- wget http://cntk.ai/PythonWheel/ForKeras/depends/openmpi_1.10-3.zip
- unzip ./openmpi_1.10-3.zip
- sudo dpkg -i openmpi_1.10-3.deb
- popd

# install cntk
- if [[ "$KERAS_BACKEND" == "cntk" ]] || [[ "$MODE" == "PEP8_DOC" ]] || [[ "$MODE" == "API" ]]; then
./.travis/install_cntk.sh;
fi

# Remove the current backend from the coverage exclusion.
- sed -i "\/keras\/backend\/${KERAS_BACKEND}_backend.py/d" .coveragerc

# install mkdocs
- pip install mkdocs --progress-bar off

# install pyux
- pip install pyux
script:
- python test.py
- python test.py

0 comments on commit dd13f5e

Please sign in to comment.