diff --git a/ansible/roles/download_models/defaults/main.yaml b/ansible/roles/download_models/defaults/main.yaml new file mode 100644 index 0000000..542ff46 --- /dev/null +++ b/ansible/roles/download_models/defaults/main.yaml @@ -0,0 +1 @@ +data_dir: /opt/autoware/data diff --git a/ansible/roles/download_models/tasks/main.yaml b/ansible/roles/download_models/tasks/main.yaml new file mode 100644 index 0000000..d7a9e5e --- /dev/null +++ b/ansible/roles/download_models/tasks/main.yaml @@ -0,0 +1,44 @@ +- name: Create data directory + become: true + ansible.builtin.file: + path: "{{ data_dir }}" + state: directory + +- name: Create tensorrt_yolox directory inside {{ data_dir }} + become: true + ansible.builtin.file: + path: "{{ data_dir }}/tensorrt_yolox" + mode: "755" + state: directory + +- name: Download tensorrt_yolox/yolox-tiny.onnx + become: true + ansible.builtin.get_url: + url: https://awf.ml.dev.web.auto/perception/models/yolox-tiny.onnx + dest: "{{ data_dir }}/tensorrt_yolox/yolox-tiny.onnx" + mode: "644" + checksum: sha256:471a665f4243e654dff62578394e508db22ee29fe65d9e389dfc3b0f2dee1255 + +- name: Download tensorrt_yolox/yolox-sPlus-opt.onnx + become: true + ansible.builtin.get_url: + url: https://awf.ml.dev.web.auto/perception/models/yolox-sPlus-opt.onnx + dest: "{{ data_dir }}/tensorrt_yolox/yolox-sPlus-opt.onnx" + mode: "644" + checksum: md5:bf3b0155351f90fcdca2626acbfd3bcf + +- name: Download tensorrt_yolox/yolox-sPlus-opt.EntropyV2-calibration.table + become: true + ansible.builtin.get_url: + url: https://awf.ml.dev.web.auto/perception/models/yolox-sPlus-opt.EntropyV2-calibration.table + dest: "{{ data_dir }}/tensorrt_yolox/yolox-sPlus-opt.EntropyV2-calibration.table" + mode: "644" + checksum: md5:c6e6f1999d5724a017516a956096701f + +- name: Download tensorrt_yolox/label.txt + become: true + ansible.builtin.get_url: + url: https://awf.ml.dev.web.auto/perception/models/label.txt + dest: "{{ data_dir }}/tensorrt_yolox/label.txt" + mode: "644" + checksum: sha256:3540a365bfd6d8afb1b5d8df4ec47f82cb984760d3270c9b41dbbb3422d09a0c diff --git a/ansible/setup.yaml b/ansible/setup.yaml index f7dfee4..a34937c 100644 --- a/ansible/setup.yaml +++ b/ansible/setup.yaml @@ -18,6 +18,10 @@ prompt: |- [Warning] Do you want to configure the network? This configuration may overwrite the IP address of the specific network interface [y/N] private: false + - name: prompt_download_models + prompt: |- + [Warning] Do you want to download onnx models? [y/N] + private: false roles: - role: autoware - role: cuda @@ -34,3 +38,5 @@ when: prompt_configure_network == 'y' - role: netplan when: prompt_configure_network == 'y' + - role: download_models + when: prompt_download_models == 'y'