aboutsummaryrefslogtreecommitdiff
path: root/ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks')
-rw-r--r--ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks/build_wheel.yml13
-rw-r--r--ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks/dual-abi-build.yml93
-rw-r--r--ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks/virtualenv.yml20
3 files changed, 126 insertions, 0 deletions
diff --git a/ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks/build_wheel.yml b/ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks/build_wheel.yml
new file mode 100644
index 0000000000..f30649facd
--- /dev/null
+++ b/ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks/build_wheel.yml
@@ -0,0 +1,13 @@
+---
+- name: Create wheel build script from template
+ ansible.builtin.template:
+ src: "build_tfio_wheels.sh.j2"
+ dest: "{{ build_dir }}/scripts/build_tfio_wheels.sh"
+ mode: "755"
+ force: true
+
+- name: Build TensorFlow IO wheels for Python {{ python_version }} # noqa no-changed-when
+ community.docker.docker_container_exec:
+ container: "tfio-multipython"
+ command: /bin/bash -c /tmp/workspace/scripts/build_tfio_wheels.sh
+ chdir: "/tmp/workspace"
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
diff --git a/ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks/virtualenv.yml b/ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks/virtualenv.yml
new file mode 100644
index 0000000000..9e5d58312e
--- /dev/null
+++ b/ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_io_in_container/tasks/virtualenv.yml
@@ -0,0 +1,20 @@
+---
+- name: Create virtualenv scripts from templates
+ ansible.builtin.template:
+ src: "{{ item.name }}"
+ dest: "{{ build_dir }}/scripts/{{ item.target }}"
+ mode: "755"
+ force: true
+ loop:
+ - { name: 'init_venv.sh.j2', target: 'init_venv.sh' }
+ - { name: 'install_venv.sh.j2', target: 'install_venv.sh' }
+
+- name: Create python-{{ py_ver }} venv
+ community.docker.docker_container_exec:
+ container: "tfio-multipython"
+ command: /bin/bash -c /tmp/workspace/scripts/init_venv.sh
+
+- name: Populate python-{{ py_ver }} venv
+ community.docker.docker_container_exec:
+ container: "tfio-multipython"
+ command: /bin/bash -c /tmp/workspace/scripts/install_venv.sh