diff --git a/docker/README.md b/docker/README.md index 14c39306153..2dc13c925bf 100644 --- a/docker/README.md +++ b/docker/README.md @@ -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 git@github.com: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 git@github.com: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)