diff options
Diffstat (limited to 'ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks/dual-abi-build.yml')
-rw-r--r-- | ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks/dual-abi-build.yml | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks/dual-abi-build.yml b/ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks/dual-abi-build.yml new file mode 100644 index 0000000000..162b05b239 --- /dev/null +++ b/ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks/dual-abi-build.yml @@ -0,0 +1,93 @@ +--- +- name: Create build scripts directory + ansible.builtin.file: + path: "{{ build_dir }}/scripts" + state: directory + mode: "755" + +- name: Create build scripts from templates + ansible.builtin.template: + src: "{{ item.name }}" + dest: "{{ build_dir }}/scripts/{{ item.target }}" + mode: "755" + force: true + loop: + - { name: 'build_tfio_binaries.sh.j2', target: 'build_tfio_binaries.sh' } + - { name: 'audit_tfio_wheels.sh.j2', target: 'audit_tfio_wheels.sh' } + +- name: Start TensorFlow IO build container + community.docker.docker_container: + name: "tfio-multipython" + image: "linaro/tensorflow-arm64-build:{{ image_prefix }}-multipython" + pull: true + state: started + restart: true + volumes: + - "{{ build_dir }}:/tmp/workspace" + detach: true + user: buildslave + working_dir: "/tmp/workspace" + network_mode: host + command: "sleep infinity" + timeout: 600 + +- name: Create initial build venv + ansible.builtin.include_tasks: + file: virtualenv.yml + +- name: Build TensorFlow IO {{ tensorflow_io_version }} for {{ py_ver }} # noqa no-changed-when + community.docker.docker_container_exec: + container: "tfio-multipython" + command: /bin/bash -c /tmp/workspace/scripts/build_tfio_binaries.sh + chdir: "/tmp/workspace" + +- name: Go through each Python version + ansible.builtin.include_tasks: + file: build_wheel.yml + loop: "{{ tfio_ver.value.python_versions }}" + loop_control: + loop_var: python_version + +- name: Copy un-audited wheels into place + community.docker.docker_container_exec: + container: "tfio-multipython" + command: bash -c "cp /tmp/workspace/io-{{ tensorflow_io_version }}/dist/tensorflow*.whl /tmp/workspace/wheels/" + when: not run_audit + +- name: Stop build container + community.docker.docker_container: + name: "tfio-multipython" + image: "linaro/tensorflow-arm64-build:{{ image_prefix }}-multipython" + state: absent + timeout: 600 + +- name: Audit TensorFlow IO wheels in manylinux2014_aarch64 container + when: run_audit + block: + - name: Start TensorFlow IO manylinux2014 audit container + community.docker.docker_container: + name: "tfio-audit" + image: "quay.io/pypa/manylinux2014_aarch64" + pull: true + state: started + restart: true + volumes: + - "{{ build_dir }}:/tmp/workspace" + detach: true + working_dir: "/tmp/workspace" + network_mode: host + command: "sleep infinity" + timeout: 600 + + - name: Audit TensorFlow IO wheels + community.docker.docker_container_exec: + container: "tfio-audit" + command: /bin/bash -c /tmp/workspace/scripts/audit_tfio_wheels.sh + chdir: "/tmp/workspace/io-{{ tensorflow_io_version }}" + + - name: Stop audit container + community.docker.docker_container: + name: "tfio-audit" + image: "quay.io/pypa/manylinux2014_aarch64" + state: absent + timeout: 600 |