Skip to content

Commit

Permalink
fix:(ansible) add missing dependencies (#19)
Browse files Browse the repository at this point in the history
* fix dependencies for edge auto launcher

Signed-off-by: urasakikeisuke <keisuke.urasaki@map4.jp>

* fix pipx install comment out

Signed-off-by: urasakikeisuke <keisuke.urasaki@map4.jp>

* Fix repos version

* add missing lines

Signed-off-by: urasakikeisuke <keisuke.urasaki@map4.jp>

* Fix installation of CUDA development libraries

* autoware.repos. update commits to match 2024.07 tag plus CUDA fixes for lidar_centerpoint

Signed-off-by: amc-nu <abraham.monrroy@gmail.com>

* ansible.netplan update file permission

Signed-off-by: Yuri Guimaraes <yuri.kgpps@gmail.com>

* autoware.repos. update commits to 2024.08

Signed-off-by: Yuri Guimaraes <yuri.kgpps@gmail.com>

---------

Signed-off-by: urasakikeisuke <keisuke.urasaki@map4.jp>
Signed-off-by: amc-nu <abraham.monrroy@gmail.com>
Signed-off-by: Yuri Guimaraes <yuri.kgpps@gmail.com>
Co-authored-by: Yuri Guimaraes <yuri.kgpps@gmail.com>
Co-authored-by: amc-nu <abraham.monrroy@gmail.com>
  • Loading branch information
3 people authored Sep 4, 2024
1 parent 2308713 commit 43544b9
Show file tree
Hide file tree
Showing 72 changed files with 1,291 additions and 377 deletions.
13 changes: 7 additions & 6 deletions amd64.env
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
rosdistro=humble
rmw_implementation=rmw_cyclonedds_cpp
base_image=ubuntu:22.04
cuda_base_image=ubuntu:22.04
prebuilt_base_image=ubuntu:22.04
cuda_version=11.6
cudnn_version=8.4.1.50-1+cuda11.6
tensorrt_version=8.4.2-1+cuda11.6
base_image=ros:humble-ros-base-jammy
cuda_base_image=ros:humble-ros-base-jammy
prebuilt_base_image=ros:humble-ros-base-jammy
cuda_version=12.5
cudnn_version=8.9.5.29-1+cuda12.2
tensorrt_version=8.6.1.6-1+cuda12.0
pre_commit_clang_format_version=17.0.5
30 changes: 30 additions & 0 deletions ansible/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,31 @@
# Ansible Collection - autoware.dev_env

This collection contains the playbooks to set up the development environment for Autoware.

## Set up a development environment

### Ansible installation

```bash
# Remove apt installed ansible (In Ubuntu 22.04, ansible the version is old)
sudo apt-get purge ansible

# Install pipx
sudo apt-get -y update
sudo apt-get -y install pipx

# Add pipx to the system PATH
python3 -m pipx ensurepath

# Install ansible
pipx install --include-deps --force "ansible==6.*"
```

### Install ansible collections

This step should be repeated when a new playbook is added.

```bash
cd ~/autoware # The root directory of the cloned repository
ansible-galaxy collection install -f -r "ansible-galaxy-requirements.yaml"
```
22 changes: 0 additions & 22 deletions ansible/playbooks/core.yaml

This file was deleted.

9 changes: 6 additions & 3 deletions ansible/playbooks/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
when: prompt_install_nvidia != 'y'
roles:
- role: autoware.dev_env.cuda
when: prompt_install_nvidia == 'y' and install_devel == 'true'
when: prompt_install_nvidia == 'y'
- role: autoware.dev_env.docker_engine
- role: autoware.dev_env.nvidia_docker
- role: autoware.dev_env.rocker
- role: autoware.dev_env.nvidia_container_toolkit

# ONNX files and other artifacts
- role: autoware.dev_env.artifacts
when: prompt_download_artifacts == 'y'
4 changes: 4 additions & 0 deletions ansible/playbooks/download_artifacts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Download Autoware artifacts
hosts: localhost
roles:
- autoware.dev_env.artifacts
38 changes: 26 additions & 12 deletions ansible/playbooks/edge_auto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
[Warning] Some Autoware components depend on the CUDA, cuDNN and TensorRT NVIDIA libraries which have end-user license agreements that should be reviewed before installation.
Install NVIDIA libraries? [y/N]
private: false
- name: prompt_download_artifacts
prompt: |-
[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
- name: prompt_configure_network
prompt: |-
[Warning] Do you want to configure the network? This configuration may overwrite the IP address of the specific network interface [y/N]
Expand All @@ -35,26 +45,30 @@
[Warning] Skipping installation of NVIDIA libraries. Please manually install them if you plan to use any dependent components.
when: prompt_install_nvidia != 'y'
roles:
# Core
- role: autoware.dev_env.autoware_core
- role: autoware.dev_env.ccache
when: install_devel == 'true'
- role: autoware.dev_env.plotjuggler
- role: autoware.dev_env.pre_commit
when: install_devel == 'true'
# Autoware base dependencies
- role: autoware.dev_env.ros2
- role: autoware.dev_env.ros2_dev_tools
# - role: autoware.dev_env.rmw_implementation
- role: autoware.dev_env.rmw_implementation
- role: autoware.dev_env.gdown
- role: autoware.dev_env.build_tools
- role: autoware.dev_env.glog

# Universe
- role: autoware.dev_env.autoware_universe
# Autoware module dependencies
- role: autoware.dev_env.geographiclib
- role: autoware.dev_env.cuda
when: prompt_install_nvidia == 'y' and install_devel == 'true'
when: prompt_install_nvidia == 'y'
- role: autoware.dev_env.pacmod
when: rosdistro != 'rolling'
- role: autoware.dev_env.tensorrt
when: prompt_install_nvidia == 'y'
- role: autoware.dev_env.git_lfs

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

# ONNX files and other artifacts
- role: autoware.dev_env.artifacts
when: prompt_download_artifacts == 'y'

# Edge.Auto
- role: autoware.dev_env.ros2_domain_id
Expand Down
48 changes: 48 additions & 0 deletions ansible/playbooks/openadkit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
- name: Set up source development environments for Autoware Universe
hosts: localhost
connection: local
pre_tasks:
- name: Verify OS
ansible.builtin.fail:
msg: Only Ubuntu 22.04 is supported for this branch. Please refer to https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/source-installation/.
when: ansible_distribution != 'Ubuntu' or ansible_distribution_version != '22.04'

- name: Print args
ansible.builtin.debug:
msg:
- module: "{{ module }}"
- rosdistro: "{{ rosdistro }}"
- rmw_implementation: "{{ rmw_implementation }}"
- cuda_version: "{{ cuda_version }}"
- cudnn_version: "{{ cudnn_version }}"
- tensorrt_version: "{{ tensorrt_version }}"
roles:
# Autoware base dependencies
- role: autoware.dev_env.rmw_implementation
when: module == 'base'
- role: autoware.dev_env.gdown
when: module == 'base'
- role: autoware.dev_env.kisak_mesa
when: module == 'base'
- role: autoware.dev_env.build_tools
when: module == 'all' and install_devel=='y'

# Module specific dependencies
- role: autoware.dev_env.geographiclib
when: module == 'perception-localization' or module == 'all'
- role: autoware.dev_env.cuda
when: (module == 'perception-localization' or module == 'all') and prompt_install_nvidia=='y'
- role: autoware.dev_env.tensorrt
when: (module == 'perception-localization' or module == 'all') and prompt_install_nvidia=='y'
- role: autoware.dev_env.pacmod
when: module == 'planning-control' or module == 'perception-localization' or module == 'all'

# Development environment
- role: autoware.dev_env.dev_tools
when: module == 'dev-tools'
- role: autoware.dev_env.ros2_dev_tools
when: module == 'dev-tools'

# ONNX files and other artifacts
- role: autoware.dev_env.artifacts
when: prompt_download_artifacts == 'y'
10 changes: 10 additions & 0 deletions ansible/playbooks/rosdep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- name: Register rosdep package repositories
hosts: localhost
connection: local
pre_tasks:
- name: Verify OS
ansible.builtin.fail:
msg: Only Ubuntu 22.04 is supported for this branch. Please refer to https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/source-installation/.
when: ansible_distribution != 'Ubuntu' or ansible_distribution_version != '22.04'
roles:
- role: autoware.dev_env.pacmod
46 changes: 35 additions & 11 deletions ansible/playbooks/universe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
[Warning] Some Autoware components depend on the CUDA, cuDNN and TensorRT NVIDIA libraries which have end-user license agreements that should be reviewed before installation.
Install NVIDIA libraries? [y/N]
private: false
- name: prompt_download_artifacts
prompt: |-
[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 All @@ -29,23 +39,37 @@
[Warning] Skipping installation of NVIDIA libraries. Please manually install them if you plan to use any dependent components.
when: prompt_install_nvidia != 'y'
roles:
# Core
- role: autoware.dev_env.autoware_core
- role: autoware.dev_env.ccache
when: install_devel == 'true'
- role: autoware.dev_env.plotjuggler
- role: autoware.dev_env.pre_commit
when: install_devel == 'true'
# Autoware base dependencies
- role: autoware.dev_env.ros2
- role: autoware.dev_env.ros2_dev_tools
- role: autoware.dev_env.rmw_implementation
- role: autoware.dev_env.gdown
- role: autoware.dev_env.build_tools
- role: autoware.dev_env.glog

# Universe
- role: autoware.dev_env.autoware_universe
# Autoware module dependencies
- role: autoware.dev_env.geographiclib
- role: autoware.dev_env.cuda
when: prompt_install_nvidia == 'y' and install_devel == 'true'
when: prompt_install_nvidia == 'y'
- role: autoware.dev_env.pacmod
when: rosdistro != 'rolling'
- role: autoware.dev_env.tensorrt
when: prompt_install_nvidia == 'y'
- role: autoware.dev_env.git_lfs

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

# ONNX files and other artifacts
- role: autoware.dev_env.artifacts
when: prompt_download_artifacts == 'y'

# Edge.Auto
- role: autoware.dev_env.ros2_domain_id
- role: autoware.dev_env.cyclonedds
- role: autoware.dev_env.ptp4l_host
when: prompt_configure_network == 'y'
- role: autoware.dev_env.enlarge_rx_ring_buffer
when: prompt_configure_network == 'y'
- role: autoware.dev_env.netplan
when: prompt_configure_network == 'y'
32 changes: 32 additions & 0 deletions ansible/roles/artifacts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Autoware artifacts

The Autoware perception stack uses models for inference. These models are automatically downloaded as part of the `setup-dev-env.sh` script.

The models are hosted by Web.Auto.

Default `data_dir` location is `~/autoware_data`.

## Download instructions

### Requirements

Install ansible following the instructions in the [ansible installation guide](../../README.md#ansible-installation).

### Download artifacts

#### Install ansible collections

```bash
cd ~/autoware # The root directory of the cloned repository
ansible-galaxy collection install -f -r "ansible-galaxy-requirements.yaml"
```

This step should be repeated when a new playbook is added.

#### Run the playbook

```bash
ansible-playbook autoware.dev_env.download_artifacts -e "data_dir=$HOME/autoware_data" --ask-become-pass
```

This will download and extract the artifacts to the specified directory and validate the checksums.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 43544b9

Please sign in to comment.