Skip to content

Commit

Permalink
feat: add data_dir option to choose the location to store models
Browse files Browse the repository at this point in the history
Signed-off-by: Esteve Fernandez <[email protected]>
  • Loading branch information
esteve committed Sep 8, 2023
1 parent f6959f3 commit 3c13e4d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 21 deletions.
42 changes: 21 additions & 21 deletions ansible/roles/onnx/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,145 +2,145 @@
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: pts_backbone_neck_head_centerpoint_tiny.onnx
dest: "{{ data_dir }}/pts_backbone_neck_head_centerpoint_tiny.onnx"
checksum: sha256:9bb0b634f3664bd098ce7d6a3d8a9fb7cc8d9b8252b27f302c71e43316bab551

- name: Download pts_backbone_neck_head_centerpoint.onnx

Check failure on line 8 in ansible/roles/onnx/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / pre-commit-ansible

risky-file-permissions

File permissions unset or incorrect.
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/centerpoint/v2/pts_backbone_neck_head_centerpoint.onnx
dest: pts_backbone_neck_head_centerpoint.onnx
dest: "{{ data_dir }}/pts_backbone_neck_head_centerpoint.onnx"
checksum: sha256:3fe7e128955646740c41a25be0c8f141d5a94594fe79d7405fe2a859e391542e

- name: Download pts_voxel_encoder_centerpoint_tiny.onnx

Check failure on line 15 in ansible/roles/onnx/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / pre-commit-ansible

risky-file-permissions

File permissions unset or incorrect.
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/centerpoint/v2/pts_voxel_encoder_centerpoint_tiny.onnx
dest: pts_voxel_encoder_centerpoint_tiny.onnx
dest: "{{ data_dir }}/pts_voxel_encoder_centerpoint_tiny.onnx"
checksum: sha256:2c53465715c1fd2e9dc5727ef3fca74f4cdf0538f74286b0946e219d0ca5693b

- name: Download pts_voxel_encoder_centerpoint.onnx

Check failure on line 22 in ansible/roles/onnx/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / pre-commit-ansible

risky-file-permissions

File permissions unset or incorrect.
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/centerpoint/v2/pts_voxel_encoder_centerpoint.onnx
dest: pts_voxel_encoder_centerpoint.onnx
dest: "{{ data_dir }}/pts_voxel_encoder_centerpoint.onnx"
checksum: sha256:dc1a876580d86ee7a341d543f8ade2ede7f43bd032dc5b44155b1f0175405764

- name: Download coco.names

Check failure on line 29 in ansible/roles/onnx/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / pre-commit-ansible

risky-file-permissions

File permissions unset or incorrect.
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/coco.names
dest: coco.names
dest: "{{ data_dir }}/coco.names"
checksum: sha256:634a1132eb33f8091d60f2c346ababe8b905ae08387037aed883953b7329af84

- name: Download hdl-64.caffemodel

Check failure on line 36 in ansible/roles/onnx/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / pre-commit-ansible

risky-file-permissions

File permissions unset or incorrect.
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/hdl-64.caffemodel
dest: hdl-64.caffemodel
dest: "{{ data_dir }}/hdl-64.caffemodel"
checksum: sha256:0fbcf449ff0e4571b23245eba0e787055b38f77de5c7e0a90d619775e54c740b

- name: Download label.txt

Check failure on line 43 in ansible/roles/onnx/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / pre-commit-ansible

risky-file-permissions

File permissions unset or incorrect.
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/label.txt
dest: label.txt
dest: "{{ data_dir }}/label.txt"
checksum: sha256:3540a365bfd6d8afb1b5d8df4ec47f82cb984760d3270c9b41dbbb3422d09a0c

- name: Download lamp_labels.txt

Check failure on line 50 in ansible/roles/onnx/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / pre-commit-ansible

risky-file-permissions

File permissions unset or incorrect.
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/lamp_labels.txt
dest: lamp_labels.txt
dest: "{{ data_dir }}/lamp_labels.txt"
checksum: sha256:baac220ef86b70c94673bbf982121f7d43591b1768ac05e98f235b23772a9bed

- name: Download mb2-ssd-lite-tlr.onnx

Check failure on line 57 in ansible/roles/onnx/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / pre-commit-ansible

risky-file-permissions

File permissions unset or incorrect.
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/mb2-ssd-lite-tlr.onnx
dest: mb2-ssd-lite-tlr.onnx
dest: "{{ data_dir }}/mb2-ssd-lite-tlr.onnx"
checksum: sha256:e29e6ee68751a270fb285fd037713939ca7f61a897b4c3a7ab22b0d6a9a21ddf

- name: Download traffic_light_classifier_mobilenetv2.onnx

Check failure on line 64 in ansible/roles/onnx/tasks/main.yaml

View workflow job for this annotation

GitHub Actions / pre-commit-ansible

risky-file-permissions

File permissions unset or incorrect.
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/traffic_light_classifier_mobilenetv2.onnx
dest: traffic_light_classifier_mobilenetv2.onnx
dest: "{{ data_dir }}/traffic_light_classifier_mobilenetv2.onnx"
checksum: sha256:5e1bbdeeb1589cab19cbb69d70553e0fd81fb302b09167ae2946112dcf898b24

- name: Download vlp-16.caffemodel
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/vlp-16.caffemodel
dest: vlp-16.caffemodel
dest: "{{ data_dir }}/vlp-16.caffemodel"
checksum: sha256:0fbcf449ff0e4571b23245eba0e787055b38f77de5c7e0a90d619775e54c740b

- name: Download vls-128.caffemodel
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/vls-128.caffemodel
dest: vls-128.caffemodel
dest: "{{ data_dir }}/vls-128.caffemodel"
checksum: sha256:b3efd450f867e66bb316aa2cba72ab69c93f6f7d2550d502b8fdea623e953166

- name: Download voc_labels_tl.txt
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/voc_labels_tl.txt
dest: voc_labels_tl.txt
dest: "{{ data_dir }}/voc_labels_tl.txt"
checksum: sha256:a41e6e3324e32c30b3b2fe38908eaf3471e2bfdaeb9e14ca0c1c3bc0275119c6

- name: Download yolov3.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/yolov3.onnx
dest: yolov3.onnx
dest: "{{ data_dir }}/yolov3.onnx"
checksum: sha256:61e922f76918dd3d8e0abdc5fb7406f390609e08bd8ab9e5d3b97afb00f30f8c

- name: Download yolov4-tiny.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/yolov4-tiny.onnx
dest: yolov4-tiny.onnx
dest: "{{ data_dir }}/yolov4-tiny.onnx"
checksum: sha256:0e877c716fbf8a2b431ee3e57f6c7411a6741319b52c32c6dafc53c7e1b17027

- name: Download yolov4.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/yolov4.onnx
dest: yolov4.onnx
dest: "{{ data_dir }}/yolov4.onnx"
checksum: sha256:7c7343156c1bd4b397fd1e44b27334691a6219db3ce2e29a03b72af65ddb8f39

- name: Download yolov5l.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/yolov5l.onnx
dest: yolov5l.onnx
dest: "{{ data_dir }}/yolov5l.onnx"
checksum: sha256:a627e5f70180a8746482b572194090466db62c8d1256602c1cd20374dd960e34

- name: Download yolov5m.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/yolov5m.onnx
dest: yolov5m.onnx
dest: "{{ data_dir }}/yolov5m.onnx"
checksum: sha256:ee6f67f7c00a34cc4cef2fdd9db30dd714df1a4fb2d7e9fc1731cfe85b673133

- name: Download yolov5s.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/yolov5s.onnx
dest: yolov5s.onnx
dest: "{{ data_dir }}/yolov5s.onnx"
checksum: sha256:be335ff7746957debf1a6903a61fa3f568b780b4afe4958edf2d4bc98e9e0825

- name: Download yolov5x.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/yolov5x.onnx
dest: yolov5x.onnx
dest: "{{ data_dir }}/yolov5x.onnx"
checksum: sha256:d7cb4cd7078f87bda22a37828d72867accecedf9f74d0d87b5cc1f6f1180a019

- name: Download yolox-tiny.onnx
become: true
ansible.builtin.get_url:
url: https://awf.ml.dev.web.auto/perception/models/yolox-tiny.onnx
dest: yolox-tiny.onnx
dest: "{{ data_dir }}/yolox-tiny.onnx"
checksum: sha256:471a665f4243e654dff62578394e508db22ee29fe65d9e389dfc3b0f2dee1255
9 changes: 9 additions & 0 deletions setup-dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ SCRIPT_DIR=$(readlink -f "$(dirname "$0")")

# Parse arguments
args=()
option_data_dir="$HOME/autoware_data"

while [ "$1" != "" ]; do
case "$1" in
-y)
Expand All @@ -31,6 +33,11 @@ while [ "$1" != "" ]; do
# Disable installation dev package of role 'cuda' and 'tensorrt'.
option_runtime=true
;;
--data-dir)
# Set data directory
option_data_dir="$2"
shift
;;
*)
args+=("$1")
;;
Expand Down Expand Up @@ -90,6 +97,8 @@ else
ansible_args+=("--extra-vars" "install_devel=true")
fi

ansible_args+=("--extra-vars" "data_dir=$option_data_dir")

# Load env
source "$SCRIPT_DIR/amd64.env"
if [ "$(uname -m)" = "aarch64" ]; then
Expand Down

0 comments on commit 3c13e4d

Please sign in to comment.