Commit 4114ed88 authored by Yuxin Wu's avatar Yuxin Wu

tensorflow install in CI

parent edb78974
...@@ -29,7 +29,7 @@ jobs: ...@@ -29,7 +29,7 @@ jobs:
max-parallel: 6 max-parallel: 6
matrix: matrix:
python-version: [3.6] python-version: [3.6]
TF-version: [1.5.0, 1.15.0] TF-version: [tensorflow==1.5.0, tensorflow-cpu==1.15.0]
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
...@@ -45,12 +45,8 @@ jobs: ...@@ -45,12 +45,8 @@ jobs:
# check that dataflow can be imported alone without tensorflow # check that dataflow can be imported alone without tensorflow
python -c "import cv2; print('OpenCV '+ cv2.__version__)" python -c "import cv2; print('OpenCV '+ cv2.__version__)"
- name: Install TF - name: Install TF
env:
TF_VERSION: ${{ matrix.TF-version }}
# compatible with travis scripts
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
run: | run: |
./tests/install-tensorflow.sh python -m pip install ${{ matrix.TF-version }}
python -c "import tensorflow as tf; print(tf.VERSION, tf.GIT_VERSION)" python -c "import tensorflow as tf; print(tf.VERSION, tf.GIT_VERSION)"
- name: Run Tests - name: Run Tests
......
#!/bin/bash -e
if [ $TF_VERSION == "nightly" ]; then
TF_BINARY_URL="tf-nightly"
else
if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then
TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-${TF_VERSION}-cp27-none-linux_x86_64.whl
fi
if [[ $TRAVIS_PYTHON_VERSION == 3.4* ]]; then
TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-${TF_VERSION}-cp34-cp34m-linux_x86_64.whl
fi
if [[ $TRAVIS_PYTHON_VERSION == 3.5* ]]; then
TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-${TF_VERSION}-cp35-cp35m-linux_x86_64.whl
fi
if [[ $TRAVIS_PYTHON_VERSION == 3.6* ]]; then
TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-${TF_VERSION}-cp36-cp36m-linux_x86_64.whl
fi
fi
python -m pip install --upgrade ${TF_BINARY_URL}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment