aboutsummaryrefslogtreecommitdiff
path: root/ldcg-python-manylinux-tensorflow/ansible/roles/tensorflow_text/tasks/dual-abi-build.yml
blob: 97a6c71e277ea777fec507b0eb364f2cb3e3b4a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
- 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: "audit_tf_text_wheels.sh.j2"
    dest: "{{ build_dir }}/scripts/audit_tf_text_wheels.sh"
    mode: "755"
    force: true

- name: Start TensorFlow Text build container
  community.docker.docker_container:
    name: "tf-text-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: Go through each Python version
  ansible.builtin.include_tasks:
    file: build_wheel.yml
  loop: "{{ tf_text_ver.value.python_versions }}"
  loop_control:
    loop_var: python_version

- name: Stop build container
  community.docker.docker_container:
    name: "tf-text-multipython"
    image: "linaro/tensorflow-arm64-build:{{ image_prefix }}-multipython"
    state: absent
    timeout: 600

- name: Audit TensorFlow Text wheels in manylinux2014_aarch64 container
  when: run_audit
  block:
    - name: Start TensorFlow IO manylinux2014 audit container
      community.docker.docker_container:
        name: "tf-text-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 Text wheels
      community.docker.docker_container_exec:
        container: "tf-text-audit"
        command: /bin/bash -c /tmp/workspace/scripts/audit_tf_text_wheels.sh
        chdir: "/tmp/workspace/text-{{ tensorflow_text_version }}"

    - name: Stop audit container
      community.docker.docker_container:
        name: "tf-text-audit"
        image: "quay.io/pypa/manylinux2014_aarch64"
        state: absent
        timeout: 600