Issue added sub-section to Python 2 pip-installer CI script that checks no GPU-TF installed if CPU-only TF already installed
@@ -148,6 +148,25 @@ pip-installer:
# deactivate virtual environment
- deactivate
- cd $niftynet_dir
+ # -------- CPU-only TensorFlow compatibility --------
+ # create a virtual env to test pip installer
+ - venv="niftynet-pip-installer-venv-py2-tf-cpu"
+ - mypython=$(which python2)
+ - virtualenv -p $mypython $venv
+ - cd $venv
+ - source bin/activate
+ # print Python version to CI output
+ - which python
+ - python --version
+ # install CPU-only TF
+ - pip install tensorflow
+ # install using built NiftyNet wheel
+ - pip install $niftynet_wheel
+ # check GPU TF not installed
+ - fail_ci_build_if_tfgpu_installed
+ # deactivate virtual environment
+ - deactivate
+ - cd $niftynet_dir
# ============= Python 3 ============================
# create a virtual env to test pip installer
- venv="niftynet-pip-installer-venv-py3"
