Skip to content

Commit 2421b2b

Browse files
authored
feat(ansible): upgrade for CUDA, TensorRT and CUDNN (autowarefoundation#5608)
1 parent 9c95a42 commit 2421b2b

File tree

5 files changed

+57
-31
lines changed

5 files changed

+57
-31
lines changed

amd64.env

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ rmw_implementation=rmw_cyclonedds_cpp
33
base_image=ros:humble-ros-base-jammy
44
autoware_base_image=ghcr.io/autowarefoundation/autoware-base:latest
55
autoware_base_cuda_image=ghcr.io/autowarefoundation/autoware-base:cuda-latest
6-
cuda_version=12.3
7-
cudnn_version=8.9.5.29-1+cuda12.2
8-
tensorrt_version=8.6.1.6-1+cuda12.0
6+
cuda_version=12.4
7+
cudnn_version=8.9.7.29-1+cuda12.2
8+
tensorrt_version=10.8.0.43-1+cuda12.8
99
pre_commit_clang_format_version=17.0.5

ansible/roles/cuda/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# cuda
22

3-
This role installs [CUDA Toolkit](https://developer.nvidia.com/cuda-toolkit) following [this page](https://developer.nvidia.com/cuda-12-3-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_network) and [this page](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions).
3+
This role installs [CUDA Toolkit](https://developer.nvidia.com/cuda-toolkit) following [this page](https://developer.nvidia.com/cuda-12-4-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_network) and [this page](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions).
44

55
This role also registers Vulkan, OpenGL, and OpenCL GPU vendors for future use.
66

@@ -15,7 +15,7 @@ This role also registers Vulkan, OpenGL, and OpenCL GPU vendors for future use.
1515

1616
### Version compatibility
1717

18-
Autoware currently uses CUDA `12.3` and from this [CUDA Application Compatibility Support Matrix](https://docs.nvidia.com/deploy/cuda-compatibility/#use-the-right-compat-package) that only the NVIDIA driver version `545` is compatible with this version of CUDA.
18+
Autoware currently uses CUDA `12.4` which corresponds to the NVIDIA driver version `550` and is minimum required driver version.
1919

2020
#### 🛠️ For Advanced Users
2121

@@ -42,7 +42,7 @@ sudo dpkg -i cuda-keyring_1.1-1_all.deb
4242
sudo apt-get update
4343
cuda_version_dashed=$(eval sed -e "s/[.]/-/g" <<< "${cuda_version}")
4444
sudo apt-get -y install cuda-toolkit-${cuda_version_dashed}
45-
sudo apt-get install -y cuda-drivers-545
45+
sudo apt-get install -y cuda-drivers-550
4646
```
4747

4848
Perform the post installation actions:

ansible/roles/tensorrt/README.md

+39-10
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,63 @@ This role installs TensorRT and cuDNN following [the official NVIDIA TensorRT In
1111

1212
## Manual Installation
1313

14+
### AMD64
15+
1416
```bash
1517
# For the environment variables
1618
wget -O /tmp/amd64.env https://raw.githubusercontent.com/autowarefoundation/autoware/main/amd64.env && source /tmp/amd64.env
1719

1820
sudo apt-get install -y \
1921
libcudnn8=${cudnn_version} \
20-
libnvinfer8=${tensorrt_version} \
21-
libnvinfer-plugin8=${tensorrt_version} \
22-
libnvparsers8=${tensorrt_version} \
23-
libnvonnxparsers8=${tensorrt_version} \
22+
libnvinfer10=${tensorrt_version} \
23+
libnvinfer-plugin10=${tensorrt_version} \
24+
libnvonnxparsers10=${tensorrt_version} \
2425
libcudnn8-dev=${cudnn_version} \
2526
libnvinfer-dev=${tensorrt_version} \
2627
libnvinfer-plugin-dev=${tensorrt_version} \
2728
libnvinfer-headers-dev=${tensorrt_version} \
2829
libnvinfer-headers-plugin-dev=${tensorrt_version} \
29-
libnvparsers-dev=${tensorrt_version} \
3030
libnvonnxparsers-dev=${tensorrt_version}
3131

3232
sudo apt-mark hold \
3333
libcudnn8 \
34-
libnvinfer8 \
35-
libnvinfer-plugin8 \
36-
libnvparsers8 \
37-
libnvonnxparsers8 \
34+
libnvinfer10 \
35+
libnvinfer-plugin10 \
36+
libnvonnxparsers10 \
3837
libcudnn8-dev \
3938
libnvinfer-dev \
4039
libnvinfer-plugin-dev \
41-
libnvparsers-dev \
40+
libnvonnxparsers-dev \
41+
libnvinfer-headers-dev \
42+
libnvinfer-headers-plugin-dev
43+
```
44+
45+
### ARM64
46+
47+
```bash
48+
# For the environment variables
49+
wget -O /tmp/arm64.env https://raw.githubusercontent.com/autowarefoundation/autoware/main/arm64.env && source /tmp/arm64.env
50+
51+
sudo apt-get install -y \
52+
libcudnn9-cuda-12=${cudnn_version} \
53+
libnvinfer10=${tensorrt_version} \
54+
libnvinfer-plugin10=${tensorrt_version} \
55+
libnvonnxparsers10=${tensorrt_version} \
56+
libcudnn9-dev-cuda-12=${cudnn_version} \
57+
libnvinfer-dev=${tensorrt_version} \
58+
libnvinfer-plugin-dev=${tensorrt_version} \
59+
libnvinfer-headers-dev=${tensorrt_version} \
60+
libnvinfer-headers-plugin-dev=${tensorrt_version} \
61+
libnvonnxparsers-dev=${tensorrt_version}
62+
63+
sudo apt-mark hold \
64+
libcudnn9-cuda-12 \
65+
libnvinfer10 \
66+
libnvinfer-plugin10 \
67+
libnvonnxparsers10 \
68+
libcudnn9-dev-cuda-12 \
69+
libnvinfer-dev \
70+
libnvinfer-plugin-dev \
4271
libnvonnxparsers-dev \
4372
libnvinfer-headers-dev \
4473
libnvinfer-headers-plugin-dev

ansible/roles/tensorrt/tasks/main.yaml

+10-13
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
become: true
33
ansible.builtin.apt:
44
name:
5-
- libcudnn8={{ cudnn_version }}
6-
- libnvinfer8={{ tensorrt_version }}
7-
- libnvinfer-plugin8={{ tensorrt_version }}
8-
- libnvparsers8={{ tensorrt_version }}
9-
- libnvonnxparsers8={{ tensorrt_version }}
5+
- "{{ 'libcudnn9-cuda-12=' + cudnn_version if ansible_architecture == 'aarch64' else 'libcudnn8=' + cudnn_version }}"
6+
- libnvinfer10={{ tensorrt_version }}
7+
- libnvinfer-plugin10={{ tensorrt_version }}
8+
- libnvonnxparsers10={{ tensorrt_version }}
109
allow_change_held_packages: true
1110
allow_downgrade: true
1211
update_cache: true
@@ -15,12 +14,11 @@
1514
become: true
1615
ansible.builtin.apt:
1716
name:
18-
- libcudnn8-dev={{ cudnn_version }}
17+
- "{{ 'libcudnn9-dev-cuda-12=' + cudnn_version if ansible_architecture == 'aarch64' else 'libcudnn8-dev=' + cudnn_version }}"
1918
- libnvinfer-dev={{ tensorrt_version }}
2019
- libnvinfer-plugin-dev={{ tensorrt_version }}
2120
- libnvinfer-headers-dev={{ tensorrt_version }}
2221
- libnvinfer-headers-plugin-dev={{ tensorrt_version }}
23-
- libnvparsers-dev={{ tensorrt_version }}
2422
- libnvonnxparsers-dev={{ tensorrt_version }}
2523
allow_change_held_packages: true
2624
allow_downgrade: true
@@ -34,23 +32,22 @@
3432
name: "{{ item }}"
3533
selection: hold
3634
with_items:
35+
- "{{ 'libcudnn9-cuda-12' if ansible_architecture == 'aarch64' else 'libcudnn8' }}"
3736
- libcudnn8
38-
- libnvinfer8
39-
- libnvinfer-plugin8
40-
- libnvparsers8
41-
- libnvonnxparsers8
37+
- libnvinfer10
38+
- libnvinfer-plugin10
39+
- libnvonnxparsers10
4240

4341
- name: Prevent CUDA-related Dev packages from upgrading
4442
become: true
4543
ansible.builtin.dpkg_selections:
4644
name: "{{ item }}"
4745
selection: hold
4846
with_items:
49-
- libcudnn8-dev
47+
- "{{ 'libcudnn9-dev-cuda-12' if ansible_architecture == 'aarch64' else 'libcudnn8-dev' }}"
5048
- libnvinfer-dev
5149
- libnvinfer-plugin-dev
5250
- libnvinfer-headers-dev
5351
- libnvinfer-headers-plugin-dev
54-
- libnvparsers-dev
5552
- libnvonnxparsers-dev
5653
when: install_devel == 'y'

arm64.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Override amd64's settings
2-
cudnn_version=8.9.6.50-1+cuda12.2
3-
tensorrt_version=8.6.2.2-1+cuda12.0
2+
cudnn_version=9.3.0.75-1
3+
tensorrt_version=10.3.0.30-1+cuda12.5

0 commit comments

Comments
 (0)