Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:(ansible) update model download logic #17

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ansible/playbooks/edge_auto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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
pre_tasks:
- name: Verify OS
ansible.builtin.fail:
Expand Down Expand Up @@ -65,3 +69,5 @@
when: prompt_configure_network == 'y'
- role: autoware.dev_env.netplan
when: prompt_configure_network == 'y'
- role: download_models

Check failure on line 72 in ansible/playbooks/edge_auto.yaml

View workflow job for this annotation

GitHub Actions / pre-commit-ansible

syntax-check[specific]

the role 'download_models' was not found in /home/runner/work/edge-auto/edge-auto/ansible/playbooks/roles:/home/runner/.cache/ansible-compat/a858bc/roles:/home/runner/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/runner/work/edge-auto/edge-auto/ansible/playbooks
when: prompt_download_models == 'y'
1 change: 1 addition & 0 deletions ansible/roles/download_models/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data_dir: /opt/autoware/data
44 changes: 44 additions & 0 deletions ansible/roles/download_models/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
- name: Create data directory
become: true
ansible.builtin.file:
path: "{{ data_dir }}"
state: directory

- name: Create lidar_centerpoint directory inside {{ data_dir }}
become: true
ansible.builtin.file:
path: "{{ data_dir }}/lidar_centerpoint"
mode: "755"
state: directory

- name: Download lidar_centerpoint/pts_voxel_encoder_centerpoint.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/centerpoint/v2/pts_voxel_encoder_centerpoint.onnx
dest: "{{ data_dir }}/lidar_centerpoint/pts_voxel_encoder_centerpoint.onnx"
mode: "644"
checksum: sha256:dc1a876580d86ee7a341d543f8ade2ede7f43bd032dc5b44155b1f0175405764

- name: Download lidar_centerpoint/pts_backbone_neck_head_centerpoint.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/centerpoint/v2/pts_backbone_neck_head_centerpoint.onnx
dest: "{{ data_dir }}/lidar_centerpoint/pts_backbone_neck_head_centerpoint.onnx"
mode: "644"
checksum: sha256:3fe7e128955646740c41a25be0c8f141d5a94594fe79d7405fe2a859e391542e

- name: Download lidar_centerpoint/pts_voxel_encoder_centerpoint_tiny.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/centerpoint/v2/pts_voxel_encoder_centerpoint_tiny.onnx
dest: "{{ data_dir }}/lidar_centerpoint/pts_voxel_encoder_centerpoint_tiny.onnx"
mode: "644"
checksum: sha256:2c53465715c1fd2e9dc5727ef3fca74f4cdf0538f74286b0946e219d0ca5693b

- name: Download lidar_centerpoint/pts_backbone_neck_head_centerpoint_tiny.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/centerpoint/v2/pts_backbone_neck_head_centerpoint_tiny.onnx
dest: "{{ data_dir }}/lidar_centerpoint/pts_backbone_neck_head_centerpoint_tiny.onnx"
mode: "644"
checksum: md5:e4658325b70222f7c3637fe00e586b82
Loading