Issue CPU-only TF check moved to beginning of pip-installer CI script for speed in development
@@ -126,8 +126,9 @@ pip-installer:
- source ci/findwheel.sh
- echo $niftynet_wheel
# ============= Python 2 ============================
+ # -------- CPU-only TensorFlow compatibility --------
# create a virtual env to test pip installer
- - venv="niftynet-pip-installer-venv-py2"
+ - venv="niftynet-pip-installer-venv-py2-tf-cpu"
- mypython=$(which python2)
- virtualenv -p $mypython $venv
- cd $venv
@@ -135,23 +136,17 @@ pip-installer:
# 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
- # install SimpleITK for package importer test to work properly
- - pip install simpleitk
- # check whether all packages are importable
- - cat $package_importer
- - python $package_importer
- # test niftynet command
- - ln -s /home/gitlab-runner/environments/niftynet/data/example_volumes ./example_volumes
- - net_segmentation train -c $niftynet_dir/config/default_config.ini --net_name toynet --image_size 42 --label_size 42 --batch_size 1 --save_every_n 10
- - net_segmentation inference -c $niftynet_dir/config/default_config.ini --net_name toynet --image_size 80 --label_size 80 --batch_size 8
+ # check GPU TF not installed
+ - fail_ci_build_if_tfgpu_installed
# 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"
+ - venv="niftynet-pip-installer-venv-py2"
- mypython=$(which python2)
- virtualenv -p $mypython $venv
- cd $venv
@@ -159,12 +154,17 @@ pip-installer:
# 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
+ # install SimpleITK for package importer test to work properly
+ - pip install simpleitk
+ # check whether all packages are importable
+ - cat $package_importer
+ - python $package_importer
+ # test niftynet command
+ - ln -s /home/gitlab-runner/environments/niftynet/data/example_volumes ./example_volumes
+ - net_segmentation train -c $niftynet_dir/config/default_config.ini --net_name toynet --image_size 42 --label_size 42 --batch_size 1 --save_every_n 10
+ - net_segmentation inference -c $niftynet_dir/config/default_config.ini --net_name toynet --image_size 80 --label_size 80 --batch_size 8
# deactivate virtual environment
- deactivate
- cd $niftynet_dir
