Skip to content

Commit

Permalink
docs(docker): description of how to use the development and runtime c…
Browse files Browse the repository at this point in the history
…ontainers (#5301)

* add dev container readme

Signed-off-by: Yutaka Kondo <[email protected]>

* add description

Signed-off-by: Yutaka Kondo <[email protected]>

* update

Signed-off-by: Yutaka Kondo <[email protected]>

* add runtime description

Signed-off-by: Yutaka Kondo <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: Yutaka Kondo <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
youtalk and pre-commit-ci[bot] authored Oct 4, 2024
1 parent 1c82af0 commit 6812e5e
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,68 @@

Detailed instructions on how to use the containers can be found in the [Open AD Kit documentation](https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/docker-installation/).

## Development containers

When using Open AD Kit as a development container, it is easy to use Autoware's all-in-one development container image, `ghcr.io/autowarefoundation/autoware:universe-devel-cuda`.
If you do not need the CUDA drivers, you can also use the smaller image `ghcr.io/autowarefoundation/autoware:universe-devel`.

```shell
$ git clone [email protected]:autowarefoundation/autoware.git
$ cd autoware
$ vcs import src < autoware.repos
$ docker run -it --rm \
–v $PWD/src/universe/autoware.universe/XXX/autoware_YYY:/autoware/src/autoware_YYY \
ghcr.io/autowarefoundation/autoware:universe-devel-cuda
$ colcon build --mixin debug compile-commands
$ source install/setup.bash
$ ros2 run --prefix "gdb -ex run --args" autoware_YYY ZZZ
```

For example, if you want to make modifications to [`autoware.universe/perception/autoware_bytetrack`](https://github.com/autowarefoundation/autoware.universe/tree/main/perception/autoware_bytetrack), you can execute the following commands to perform the volume mount and debug build and execution of only the `autoware_bytetrack`.

Note that `gdb` is not currently installed in the development containers, but it would be installed in the near future.

```shell
$ docker run -it --rm \
-v $PWD/src/universe/autoware.universe/perception/autoware_bytetrack:/autoware/src/autoware_bytetrack \
ghcr.io/autowarefoundation/autoware:universe-devel-cuda
$ root@a566e785c4d2:/autoware# colcon build --mixin debug compile-commands
Starting >>> autoware_bytetrack
[Processing: autoware_bytetrack]
Finished <<< autoware_bytetrack [37.9s]

Summary: 1 package finished [38.1s]
$ root@a566e785c4d2:/autoware# source install/setup.bash
$ root@a566e785c4d2:/autoware# apt update && apt install gdb
$ root@a566e785c4d2:/autoware# ros2 run --prefix "gdb -ex run --args" autoware_bytetrack bytetrack_node_exe
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
...
[Thread debugging using libthread_db enabled]
...
[New Thread 0x7ff6f3fff640 (LWP 1205)]
Init ByteTrack!
```

## Runtime containers

In the execution container, there is the all-in-one runtime container for Autoware, `ghcr.io/autowarefoundation/autoware:universe-cuda`, and the multi-containerized `ghcr.io/autowarefoundation/autoware:universe-***-cuda` for each component of Autoware Universe.

The all-in-one execution container also has the autoware_launch package installed, allowing it to be started in the same way as a locally built Autoware.

```shell
git clone [email protected]:autowarefoundation/autoware.git
cd autoware
docker run -it --rm ghcr.io/autowarefoundation/autoware:universe-cuda
ros2 launch autoware_launch planning_simulator.launch.xml map_path:=...
```

For example, if you want to run the runtime container that only includes the `sensing/perception` components, you can execute it as follows.

```shell
docker run -it --rm ghcr.io/autowarefoundation/autoware:universe-sensing-perception-cuda
ros2 launch autoware_pointcloud_preprocessor preprocessor.launch.xml
```

## Multi-stage Dockerfile structure

![](./Dockerfile.svg)
Expand Down

0 comments on commit 6812e5e

Please sign in to comment.