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): CTI Anvil update model download logic #48

Open
wants to merge 30 commits into
base: anvil-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a6cc0c6
push anvil ros2 environment setup ansible script for testing on anvil
bgilby59 Oct 26, 2023
a8c9cdb
fix typo
bgilby59 Oct 26, 2023
0b4aa14
make jetson-containers scripts executable
bgilby59 Oct 26, 2023
9073533
small fixes
bgilby59 Oct 26, 2023
775897b
remove variables for opencv_url and opencv_deb
bgilby59 Oct 26, 2023
8c4a205
add become: true for opencv install and ros2 build scripts
bgilby59 Oct 26, 2023
7bb9eb9
do not install jetpack in ros2 role
bgilby59 Oct 26, 2023
b20003d
change network configuration and run entire setup
bgilby59 Oct 26, 2023
187dbee
add DEBIAN_FRONTEND=noninteractive to prevent error installing Jetpack
bgilby59 Oct 26, 2023
e72b9f2
change python interpreter from 3.6 to 3.8
bgilby59 Oct 26, 2023
7bc9082
Change from 10G to 1G network interface
bgilby59 Oct 27, 2023
d665519
temporarily remove calibration tools setup from ansible script
bgilby59 Oct 27, 2023
4481c32
comment out ROSCube specific command
bgilby59 Oct 27, 2023
8fcf73e
commit ptp4l host configuration for debugging
bgilby59 Oct 27, 2023
4ae927e
add ptp4l_host role to setup script
bgilby59 Oct 27, 2023
78c4492
add lidar network configuration
bgilby59 Oct 27, 2023
28efae0
comment out redundant code from ptp4l_host
bgilby59 Oct 27, 2023
4e9ceee
make ansible only setup ptp master
bgilby59 Nov 6, 2023
28760b4
change ptp interface to 1G interface
bgilby59 Nov 6, 2023
75d9ede
push new download logic for testing
bgilby59 Nov 7, 2023
230978c
rewrite ros2 build script to add additional packages into build
bgilby59 Nov 8, 2023
08eff91
save checkpoint after successful ansible setup run on Anvil
bgilby59 Nov 15, 2023
3b2c620
add install range-v3 from source and extra PCL dep
bgilby59 Nov 15, 2023
8c76af0
fix range-v3 directory name
bgilby59 Nov 15, 2023
38aabd1
add miscellaneous apt packages
bgilby59 Nov 16, 2023
58e4803
Merge branch 'feat/anvil-setup-ansible-playbook' of https://github.co…
bgilby59 Nov 16, 2023
7768136
add download_models as an optional task
bgilby59 Nov 20, 2023
c09ad93
give root privilege to download-models
bgilby59 Nov 20, 2023
900de54
clean up comments and unused variables
bgilby59 Nov 20, 2023
23eda22
fix: update model download logic for CTI Anvil
bgilby59 Dec 13, 2023
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
2 changes: 1 addition & 1 deletion ansible/roles/calibration_tools/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: Fix python interpreter version to 3
set_fact:
ansible_python_interpreter: /usr/bin/python3.6
ansible_python_interpreter: /usr/bin/python3.8

- name: Upgrade pip
pip:
Expand All @@ -10,7 +10,7 @@
- name: Install dependencies
pip:
name:
- dt-apriltags

Check warning on line 13 in ansible/roles/calibration_tools/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (apriltags)
- ruamel.yaml
state: latest

Expand Down
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
83 changes: 83 additions & 0 deletions ansible/roles/download_models/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
- 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

- 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
2 changes: 1 addition & 1 deletion ansible/roles/ptp4l_client/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ptp4l_client_interface: eth1
ptp4l_client_interface: eqos0

Check warning on line 1 in ansible/roles/ptp4l_client/defaults/main.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (eqos)
2 changes: 2 additions & 0 deletions ansible/roles/ptp4l_host/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ptp4l_host_interface:
- eth0
13 changes: 13 additions & 0 deletions ansible/roles/ptp4l_host/files/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Precision Time Protocol (PTP) service
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/sbin/ptp4l -i %i -m -S -A
ExecStop=/usr/bin/pkill -f ptp4l

Check warning on line 8 in ansible/roles/ptp4l_host/files/[email protected]

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (pkill)
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target network-online.target
21 changes: 21 additions & 0 deletions ansible/roles/ptp4l_host/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- name: Install ptp4l
ansible.builtin.apt:
name:
- linuxptp

Check warning on line 4 in ansible/roles/ptp4l_host/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (linuxptp)
update_cache: true
become: true

- name: Copy service template file
ansible.builtin.copy:
src: [email protected]
dest: /etc/systemd/system/
become: true

- name: Install ptp4l client service file
ansible.builtin.systemd:
name: ptp4l@{{ item }}.service
daemon_reload: true
enabled: true
masked: false
become: true
with_items: "{{ ptp4l_host_interface }}"
2 changes: 2 additions & 0 deletions ansible/roles/ros2/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ros_root_dir: /opt/ros/humble
ros_pkg: ros_base
Loading
Loading