Skip to content

Commit 8152cfc

Browse files
committed
Add how to run Ubuntu 20.04 on NVIDIA platform. d948462
1 parent 57d6107 commit 8152cfc

52 files changed

Lines changed: 1184 additions & 147 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

_sources/nvidia/advanced/index.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The section includes some advanced function of ADLINK's NVIDIA platform.
1414
driver_packages/index.rst
1515
canbus.rst
1616
common/gpu_performance/index.rst
17+
ubuntu20_for_nvidia.rst
1718

1819
.. This should be added in the future
1920
kernel_customization.rst
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
Ubuntu 20.04 for NVIDIA
2+
#######################
3+
4+
NVIDIA Jetpack 4.x is based on Ubuntu 18.04, and it's inconvenient when we want to use Ubuntu 20.04.
5+
For example, the LTS of ROS 1 noetic and ROS 2 foxy only support Ubuntu 20.04.
6+
There are many NVIDIA and ROS users struggling with the problem.
7+
Before NVIDIA Jetpack 5, which is Ubuntu 20.04, is released,
8+
docker container is a good solution to the issue.
9+
10+
However, there are too many tricky settings to run container on NVIDIA platform, especially when you want to use CUDA.
11+
To simplify the usage, ADLINK provides the following guide to install containers.
12+
13+
Flash the image
14+
---------------
15+
16+
Download Jetpack 4.6 from ADLINK official website and flash the ROScube.
17+
Follow the tutorial based on your ROScube platform:
18+
19+
* ROScube-X: https://adlink-ros.github.io/roscube-doc/roscube-x/flash_image/flash_mfi.html
20+
* ROScube-Pico (board level): https://adlink-ros.github.io/roscube-doc/roscube-pico/flash_image/board_level_flash.html
21+
* ROScube-Pico (system level): https://adlink-ros.github.io/roscube-doc/roscube-pico/flash_image/system_level_flash.html
22+
23+
Extend the storage
24+
------------------
25+
26+
The default storage of NVIDIA SOM is not enough (especially for ROScube-Pico),
27+
it's highly recommended to extend your storage with SD card / NVMe.
28+
29+
Please refer to `Mount rootfs on External Storage <https://adlink-ros.github.io/roscube-doc/roscube-pico/nvidia/advanced/mount_on_external_storage/index.html>`_ to extend your storage.
30+
31+
Install CUDA library
32+
--------------------
33+
34+
Although we use the container, we still need to install the CUDA library on the native host.
35+
Then share the CUDA library with the container.
36+
37+
.. code-block:: bash
38+
39+
sudo apt update
40+
sudo apt install nvidia-cuda nvidia-l4t-cuda
41+
42+
Install Neuron Startup Menu
43+
---------------------------
44+
45+
ADLINK provides the docker image with ROS/ROS2 environment inside.
46+
You can use the image by installing Neuron Startup Menu.
47+
48+
.. code-block:: bash
49+
50+
sh -c "MENU_CONFIG=ros_menu_20.04_container.yaml USE_CONTAINER=True $(curl -fsSL https://raw.githubusercontent.com/Adlink-ROS/ros_menu/main/scripts/setup.sh)"
51+
52+
Set the docker privilege
53+
54+
.. code-block:: bash
55+
56+
sudo apt install docker.io
57+
sudo groupadd docker
58+
sudo gpasswd -a $USER docker
59+
sudo reboot
60+
61+
When you open a new terminal, it'll show which kind of envrionment you want to run.
62+
For more information, refer to `Neuron Startup Menu <https://adlink-ros.github.io/roscube-doc/neuronsdk/neuron_startup_menu/installation.html>`_.
63+
64+
Install necessary packages for the container
65+
--------------------------------------------
66+
67+
Since NVIDIA CUDA from Jetpack 4.6 has some limitation to run in Ubuntu 20.04 container,
68+
we still need to do the following settings.
69+
70+
.. code-block:: bash
71+
72+
# CUDA 10.2 only supports gcc8 and g++8
73+
sudo apt update
74+
sudo apt install gcc-8 g++-8
75+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8
76+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8
77+
# Install libcudnn8-dev
78+
sudo apt install libcudnn8-dev
79+
80+
Run YOLO Object Detection example
81+
---------------------------------
82+
83+
Now it works! You can try the `YOLO Object Detection example <https://adlink-ros.github.io/roscube-doc/roscube-pico/nvidia/packages/jetpack_sdk/jetpack_sdk_yolo.html>`_ now.
Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Jetpack SDK Installation
22
########################
33

4-
Since NVIDIA L4T 32.4.x support L4T OTA, users can download NVIDIA JetPack from NVIDIA’s official APT
4+
Since NVIDIA L4T 32.4.x support L4T OTA, users can download NVIDIA Jetpack from NVIDIA’s official APT
55
repository.
6-
For ROScube NVIDIA platform users, you can use apt to install NVIDIA JetPack compoments, e.g. CUDA, tensorrt.
6+
For ROScube NVIDIA platform users, you can use ``apt`` to install NVIDIA Jetpack compoments, e.g. CUDA, tensorrt.
77

88
1. Install the whole JetPack SDK
99
--------------------------------
10-
Assuming your Jetson developer kit has been flashed with and is running **L4T 32.4.x**,
10+
Assume that your Jetson developer kit has been flashed and is running **L4T 32.4.x**,
1111
the following commands will install **all** ``JetPack``.
1212

1313
.. code-block:: bash
@@ -30,21 +30,3 @@ we can just install related library.
3030
# If we just want to use CUDA library
3131
sudo apt update
3232
sudo apt install nvidia-cuda nvidia-l4t-cuda
33-
34-
3. (Optional) Use CUDA in the container.
35-
----------------------------------------
36-
If you want to use CUDA in the container, follow the steps below.
37-
38-
a. Install CUDA library in the native host.
39-
b. Use `Neuron Startup Menu <https://adlink-ros.github.io/roscube-doc/neuronsdk/neuron_startup_menu/index.html>`_ to install containers, which already include necessary packages and docker arguments.
40-
c. Entering the containers and typing the following commands.
41-
42-
.. code-block:: bash
43-
44-
# CUDA 10.2 only supports gcc8 and g++8
45-
sudo apt update
46-
sudo apt install gcc-8 g++-8
47-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8
48-
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8
49-
# Install libcudnn8-dev
50-
sudo apt install libcudnn8-dev

_sources/nvidia/packages/jetpack_sdk/jetpack_sdk_yolo.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ YOLO Object Detection
3636
4. Build darknet with CUDNN and OpenCV support.
3737
-----------------------------------------------
3838
Modify darknet's Makefile with the following:
39+
3940
* GPU=1
4041
* CUDNN=1
4142
* OPENCV=1

_sources/roscube-pico/nvidia/advanced/index.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The section includes some advanced function of ADLINK's NVIDIA platform.
1414
driver_packages/index.rst
1515
canbus.rst
1616
common/gpu_performance/index.rst
17+
ubuntu20_for_nvidia.rst
1718

1819
.. This should be added in the future
1920
kernel_customization.rst
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
Ubuntu 20.04 for NVIDIA
2+
#######################
3+
4+
NVIDIA Jetpack 4.x is based on Ubuntu 18.04, and it's inconvenient when we want to use Ubuntu 20.04.
5+
For example, the LTS of ROS 1 noetic and ROS 2 foxy only support Ubuntu 20.04.
6+
There are many NVIDIA and ROS users struggling with the problem.
7+
Before NVIDIA Jetpack 5, which is Ubuntu 20.04, is released,
8+
docker container is a good solution to the issue.
9+
10+
However, there are too many tricky settings to run container on NVIDIA platform, especially when you want to use CUDA.
11+
To simplify the usage, ADLINK provides the following guide to install containers.
12+
13+
Flash the image
14+
---------------
15+
16+
Download Jetpack 4.6 from ADLINK official website and flash the ROScube.
17+
Follow the tutorial based on your ROScube platform:
18+
19+
* ROScube-X: https://adlink-ros.github.io/roscube-doc/roscube-x/flash_image/flash_mfi.html
20+
* ROScube-Pico (board level): https://adlink-ros.github.io/roscube-doc/roscube-pico/flash_image/board_level_flash.html
21+
* ROScube-Pico (system level): https://adlink-ros.github.io/roscube-doc/roscube-pico/flash_image/system_level_flash.html
22+
23+
Extend the storage
24+
------------------
25+
26+
The default storage of NVIDIA SOM is not enough (especially for ROScube-Pico),
27+
it's highly recommended to extend your storage with SD card / NVMe.
28+
29+
Please refer to `Mount rootfs on External Storage <https://adlink-ros.github.io/roscube-doc/roscube-pico/nvidia/advanced/mount_on_external_storage/index.html>`_ to extend your storage.
30+
31+
Install CUDA library
32+
--------------------
33+
34+
Although we use the container, we still need to install the CUDA library on the native host.
35+
Then share the CUDA library with the container.
36+
37+
.. code-block:: bash
38+
39+
sudo apt update
40+
sudo apt install nvidia-cuda nvidia-l4t-cuda
41+
42+
Install Neuron Startup Menu
43+
---------------------------
44+
45+
ADLINK provides the docker image with ROS/ROS2 environment inside.
46+
You can use the image by installing Neuron Startup Menu.
47+
48+
.. code-block:: bash
49+
50+
sh -c "MENU_CONFIG=ros_menu_20.04_container.yaml USE_CONTAINER=True $(curl -fsSL https://raw.githubusercontent.com/Adlink-ROS/ros_menu/main/scripts/setup.sh)"
51+
52+
Set the docker privilege
53+
54+
.. code-block:: bash
55+
56+
sudo apt install docker.io
57+
sudo groupadd docker
58+
sudo gpasswd -a $USER docker
59+
sudo reboot
60+
61+
When you open a new terminal, it'll show which kind of envrionment you want to run.
62+
For more information, refer to `Neuron Startup Menu <https://adlink-ros.github.io/roscube-doc/neuronsdk/neuron_startup_menu/installation.html>`_.
63+
64+
Install necessary packages for the container
65+
--------------------------------------------
66+
67+
Since NVIDIA CUDA from Jetpack 4.6 has some limitation to run in Ubuntu 20.04 container,
68+
we still need to do the following settings.
69+
70+
.. code-block:: bash
71+
72+
# CUDA 10.2 only supports gcc8 and g++8
73+
sudo apt update
74+
sudo apt install gcc-8 g++-8
75+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8
76+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8
77+
# Install libcudnn8-dev
78+
sudo apt install libcudnn8-dev
79+
80+
Run YOLO Object Detection example
81+
---------------------------------
82+
83+
Now it works! You can try the `YOLO Object Detection example <https://adlink-ros.github.io/roscube-doc/roscube-pico/nvidia/packages/jetpack_sdk/jetpack_sdk_yolo.html>`_ now.
Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Jetpack SDK Installation
22
########################
33

4-
Since NVIDIA L4T 32.4.x support L4T OTA, users can download NVIDIA JetPack from NVIDIA’s official APT
4+
Since NVIDIA L4T 32.4.x support L4T OTA, users can download NVIDIA Jetpack from NVIDIA’s official APT
55
repository.
6-
For ROScube NVIDIA platform users, you can use apt to install NVIDIA JetPack compoments, e.g. CUDA, tensorrt.
6+
For ROScube NVIDIA platform users, you can use ``apt`` to install NVIDIA Jetpack compoments, e.g. CUDA, tensorrt.
77

88
1. Install the whole JetPack SDK
99
--------------------------------
10-
Assuming your Jetson developer kit has been flashed with and is running **L4T 32.4.x**,
10+
Assume that your Jetson developer kit has been flashed and is running **L4T 32.4.x**,
1111
the following commands will install **all** ``JetPack``.
1212

1313
.. code-block:: bash
@@ -30,21 +30,3 @@ we can just install related library.
3030
# If we just want to use CUDA library
3131
sudo apt update
3232
sudo apt install nvidia-cuda nvidia-l4t-cuda
33-
34-
3. (Optional) Use CUDA in the container.
35-
----------------------------------------
36-
If you want to use CUDA in the container, follow the steps below.
37-
38-
a. Install CUDA library in the native host.
39-
b. Use `Neuron Startup Menu <https://adlink-ros.github.io/roscube-doc/neuronsdk/neuron_startup_menu/index.html>`_ to install containers, which already include necessary packages and docker arguments.
40-
c. Entering the containers and typing the following commands.
41-
42-
.. code-block:: bash
43-
44-
# CUDA 10.2 only supports gcc8 and g++8
45-
sudo apt update
46-
sudo apt install gcc-8 g++-8
47-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8
48-
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8
49-
# Install libcudnn8-dev
50-
sudo apt install libcudnn8-dev

_sources/roscube-pico/nvidia/packages/jetpack_sdk/jetpack_sdk_yolo.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ YOLO Object Detection
3636
4. Build darknet with CUDNN and OpenCV support.
3737
-----------------------------------------------
3838
Modify darknet's Makefile with the following:
39+
3940
* GPU=1
4041
* CUDNN=1
4142
* OPENCV=1

_sources/roscube-x/nvidia/advanced/index.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The section includes some advanced function of ADLINK's NVIDIA platform.
1414
driver_packages/index.rst
1515
canbus.rst
1616
common/gpu_performance/index.rst
17+
ubuntu20_for_nvidia.rst
1718

1819
.. This should be added in the future
1920
kernel_customization.rst
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
Ubuntu 20.04 for NVIDIA
2+
#######################
3+
4+
NVIDIA Jetpack 4.x is based on Ubuntu 18.04, and it's inconvenient when we want to use Ubuntu 20.04.
5+
For example, the LTS of ROS 1 noetic and ROS 2 foxy only support Ubuntu 20.04.
6+
There are many NVIDIA and ROS users struggling with the problem.
7+
Before NVIDIA Jetpack 5, which is Ubuntu 20.04, is released,
8+
docker container is a good solution to the issue.
9+
10+
However, there are too many tricky settings to run container on NVIDIA platform, especially when you want to use CUDA.
11+
To simplify the usage, ADLINK provides the following guide to install containers.
12+
13+
Flash the image
14+
---------------
15+
16+
Download Jetpack 4.6 from ADLINK official website and flash the ROScube.
17+
Follow the tutorial based on your ROScube platform:
18+
19+
* ROScube-X: https://adlink-ros.github.io/roscube-doc/roscube-x/flash_image/flash_mfi.html
20+
* ROScube-Pico (board level): https://adlink-ros.github.io/roscube-doc/roscube-pico/flash_image/board_level_flash.html
21+
* ROScube-Pico (system level): https://adlink-ros.github.io/roscube-doc/roscube-pico/flash_image/system_level_flash.html
22+
23+
Extend the storage
24+
------------------
25+
26+
The default storage of NVIDIA SOM is not enough (especially for ROScube-Pico),
27+
it's highly recommended to extend your storage with SD card / NVMe.
28+
29+
Please refer to `Mount rootfs on External Storage <https://adlink-ros.github.io/roscube-doc/roscube-pico/nvidia/advanced/mount_on_external_storage/index.html>`_ to extend your storage.
30+
31+
Install CUDA library
32+
--------------------
33+
34+
Although we use the container, we still need to install the CUDA library on the native host.
35+
Then share the CUDA library with the container.
36+
37+
.. code-block:: bash
38+
39+
sudo apt update
40+
sudo apt install nvidia-cuda nvidia-l4t-cuda
41+
42+
Install Neuron Startup Menu
43+
---------------------------
44+
45+
ADLINK provides the docker image with ROS/ROS2 environment inside.
46+
You can use the image by installing Neuron Startup Menu.
47+
48+
.. code-block:: bash
49+
50+
sh -c "MENU_CONFIG=ros_menu_20.04_container.yaml USE_CONTAINER=True $(curl -fsSL https://raw.githubusercontent.com/Adlink-ROS/ros_menu/main/scripts/setup.sh)"
51+
52+
Set the docker privilege
53+
54+
.. code-block:: bash
55+
56+
sudo apt install docker.io
57+
sudo groupadd docker
58+
sudo gpasswd -a $USER docker
59+
sudo reboot
60+
61+
When you open a new terminal, it'll show which kind of envrionment you want to run.
62+
For more information, refer to `Neuron Startup Menu <https://adlink-ros.github.io/roscube-doc/neuronsdk/neuron_startup_menu/installation.html>`_.
63+
64+
Install necessary packages for the container
65+
--------------------------------------------
66+
67+
Since NVIDIA CUDA from Jetpack 4.6 has some limitation to run in Ubuntu 20.04 container,
68+
we still need to do the following settings.
69+
70+
.. code-block:: bash
71+
72+
# CUDA 10.2 only supports gcc8 and g++8
73+
sudo apt update
74+
sudo apt install gcc-8 g++-8
75+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8
76+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8
77+
# Install libcudnn8-dev
78+
sudo apt install libcudnn8-dev
79+
80+
Run YOLO Object Detection example
81+
---------------------------------
82+
83+
Now it works! You can try the `YOLO Object Detection example <https://adlink-ros.github.io/roscube-doc/roscube-pico/nvidia/packages/jetpack_sdk/jetpack_sdk_yolo.html>`_ now.

0 commit comments

Comments
 (0)