Skip to content

Commit

Permalink
feat(ansible): set default value for install_dev variable (#4607)
Browse files Browse the repository at this point in the history
* feat(ansible): set default value for install_dev variable

Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>

* fix: change true to 'y' for prompting install_devel

Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>

* style(pre-commit): autofix

* fix: fix pre-commit error

Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>

---------

Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and oguzkaganozt committed Apr 30, 2024
1 parent 6917b03 commit 1382828
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ansible/playbooks/openadk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- role: autoware.dev_env.kisak_mesa
when: module == 'base'
- role: autoware.dev_env.build_tools
when: module == 'all' and install_devel=='true'
when: module == 'all' and install_devel=='y'

# Module specific dependencies
- role: autoware.dev_env.geographiclib
Expand Down
7 changes: 6 additions & 1 deletion ansible/playbooks/universe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
[Warning] Should the ONNX model files and other artifacts be downloaded alongside setting up the development environment.
Download artifacts? [y/N]
private: false
- name: install_devel
prompt: |-
[Warning] Do you want to install recommended development tools for Autoware? [y/N]
private: false
default: y
pre_tasks:
- name: Verify OS
ansible.builtin.fail:
Expand Down Expand Up @@ -52,7 +57,7 @@

# Autoware devel dependencies
- role: autoware.dev_env.dev_tools
when: install_devel == 'true'
when: install_devel == 'y'

# ONNX files and other artifacts
- role: autoware.dev_env.artifacts
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/cuda/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
- libcurand-dev-{{ cuda__dash_case_cuda_version.stdout }}
- cuda-nvml-dev-{{ cuda__dash_case_cuda_version.stdout }}
update_cache: true
when: install_devel == 'true'
when: install_devel == 'y'

- name: Install CUDA libraries except for cuda-drivers
become: true
Expand All @@ -47,7 +47,7 @@
- libcublas-{{ cuda__dash_case_cuda_version.stdout }}
- libcurand-{{ cuda__dash_case_cuda_version.stdout }}
update_cache: true
when: install_devel == 'false'
when: install_devel == 'N'

- name: Install extra CUDA libraries for x86_64
become: true
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/tensorrt/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
allow_change_held_packages: true
allow_downgrade: true
update_cache: true
when: install_devel == 'true'
when: install_devel == 'y'

# apt-mark hold
- name: Prevent CUDA-related packages from upgrading
Expand Down Expand Up @@ -53,4 +53,4 @@
- libnvinfer-headers-plugin-dev
- libnvparsers-dev
- libnvonnxparsers-dev
when: install_devel == 'true'
when: install_devel == 'y'
4 changes: 2 additions & 2 deletions setup-dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ fi
# Check installation of dev package
if [ "$option_runtime" = "true" ]; then
ansible_args+=("--extra-vars" "ros2_installation_type=ros-base") # ROS installation type, default "desktop"
ansible_args+=("--extra-vars" "install_devel=false")
ansible_args+=("--extra-vars" "install_devel=N")
else
ansible_args+=("--extra-vars" "install_devel=true")
ansible_args+=("--extra-vars" "install_devel=y")
fi

# Check downloading artifacts
Expand Down

0 comments on commit 1382828

Please sign in to comment.