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

feat(setup): add an option to install dev packages #2923

Merged
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
2 changes: 1 addition & 1 deletion ansible/playbooks/universe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# Universe
- role: autoware.dev_env.autoware_universe
- role: autoware.dev_env.cuda
when: prompt_install_nvidia == 'y'
when: prompt_install_nvidia == 'y' and install_devel == 'true'
- role: autoware.dev_env.pacmod
when: rosdistro != 'rolling'
- role: autoware.dev_env.tensorrt
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/tensorrt/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
install_devel: true
21 changes: 19 additions & 2 deletions ansible/roles/tensorrt/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,27 @@
ansible.builtin.apt:
name:
- libcudnn8={{ cudnn_version }}
- libcudnn8-dev={{ cudnn_version }}
- libnvinfer8={{ tensorrt_version }}
- libnvinfer-plugin8={{ tensorrt_version }}
- libnvparsers8={{ tensorrt_version }}
- libnvonnxparsers8={{ tensorrt_version }}
allow_change_held_packages: true
allow_downgrade: true
update_cache: true

- name: Install cuDNN and TensorRT Dev
become: true
ansible.builtin.apt:
name:
- libcudnn8-dev={{ cudnn_version }}
- libnvinfer-dev={{ tensorrt_version }}
- libnvinfer-plugin-dev={{ tensorrt_version }}
- libnvparsers-dev={{ tensorrt_version }}
- libnvonnxparsers-dev={{ tensorrt_version }}
allow_change_held_packages: true
allow_downgrade: true
update_cache: true
when: install_devel | bool

# apt-mark hold
- name: Prevent CUDA-related packages from upgrading
Expand All @@ -24,12 +33,20 @@
selection: hold
with_items:
- libcudnn8
- libcudnn8-dev
- libnvinfer8
- libnvinfer-plugin8
- libnvparsers8
- libnvonnxparsers8

- name: Prevent CUDA-related Dev packages from upgrading
become: true
ansible.builtin.dpkg_selections:
name: "{{ item }}"
selection: hold
with_items:
- libcudnn8-dev
- libnvinfer-dev
- libnvinfer-plugin-dev
- libnvparsers-dev
- libnvonnxparsers-dev
when: install_devel | bool
12 changes: 12 additions & 0 deletions setup-dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ while [ "$1" != "" ]; do
# Disable installation of 'cuda-drivers' in the role 'cuda'.
option_no_cuda_drivers=true
;;
--no-dev)
# Disable installation dev packages .
option_no_dev=true
;;
*)
args+=("$1")
;;
Expand Down Expand Up @@ -77,6 +81,14 @@ if [ "$option_no_cuda_drivers" = "true" ]; then
ansible_args+=("--extra-vars" "install_cuda_drivers=false")
fi

# Check installation of dev package
if [ "$option_no_dev" = "true" ]; then
ansible_args+=("--extra-vars" "install_devel=false")
ansible_args+=("--extra-vars" "installation_type=ros-base")
else
ansible_args+=("--extra-vars" "install_devel=true")
fi

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