Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Outline of the structure of the Ansible:

Quick note : To look at how our Jenkins execute the full job, see : https://github.com/Linaro/hpc_lab_setup/blob/tensorflowci/files/build_tensorflow.yml

install_python3.yml


This playbook is to be run first, and makes sure the environment contains all the "base" python (2 & 3) dependencies (i.e. python-devel, python-setuptools, python-pip). Python 3 is sourced from EPEL.
This playbook installs python3 requirements. It is kept separate at the moment since the second playbook should make use of the python3 interpreter (on the target/builder machine).
Sadly, the yum module only works with Ansible on python2, dnf as to be used on Ansible with python3. And CentOS7 does not what would be "python3(6)-dnf", and building dnf from source doesn't provide it either (and upgrading dnf has many dependencies).
But CentOS8 could make use of it, and apt based distros too.

...


This playbook, as the name entails, does the rest of the job of building TensorFlow. By default (see roles/tensorflow/defaults/main.yml), it builds :
 - TensorFlow 1.15.0 Release
 - NumPy 1.17.3 Release
 - Bazel 0.24.1-dist Release


This playbook does also setup a "builder" user (see roles/tensorflow/defaults/main.yml for name) and adds it to the wheel group (that is also changed to do password-less sudo) and changes its bashrc so Lmod is systematically loaded, so it can be used to do the build.
To that effect, it fetches dependencies first (see roles/tensorflow/tasks/main.yml for the precise task order), including OpenBLAS, HDF5, FFTW, GCC 8.3.0 and LMod from OpenHPC (See the Further Enhancements section), as well as openjdk8 for Bazel.
On the topic of Lmod, we are working on trying to find a way to install it and get it to work in the same bash script (without having to restart the bash session). BASH_ENV might be the trick.

...