We have two types of Docker image: development
and prebuilt
.
- The
development
image enables you to develop Autoware without setting up the local development environment. - The
prebuilt
image contains executables and enables you to try out Autoware quickly.- Note that the prebuilt image is not designed for deployment on a real vehicle!
Note: Before proceeding, confirm and agree with the NVIDIA Deep Learning Container license. By pulling and using the Autoware Universe images, you accept the terms and conditions of the license.
- Docker
- rocker
- We use
rocker
to enable GUI applications such asrviz
andrqt
on Docker Containers. - Refer to here for more details.
- We use
The setup script will install these dependencies through the following roles.
docker run --rm -it \
-v {path_to_your_workspace}:/autoware \
ghcr.io/autowarefoundation/autoware-universe:latest
To run with rocker
:
If you use rocker<=0.2.9
, add an option of --env NVIDIA_DRIVER_CAPABILITIES=""
or --env NVIDIA_DRIVER_CAPABILITIES=compute,utility,graphics
to avoid the CUDA environment error. For more details, see this issue.
rocker --nvidia --x11 --user \
--volume {path_to_your_workspace} \
-- ghcr.io/autowarefoundation/autoware-universe:latest
If you locate your workspace under your home directory, you can use the --home
option instead:
rocker --nvidia --x11 --user --home \
-- ghcr.io/autowarefoundation/autoware-universe:latest
To use a customized .bashrc
for the container:
rocker --nvidia --x11 --user --home \
--volume $HOME/.bashrc.container:$HOME/.bashrc \
-- ghcr.io/autowarefoundation/autoware-universe:latest
docker run --rm -it \
ghcr.io/autowarefoundation/autoware-universe:latest-prebuilt
To run with rocker
:
rocker --nvidia --x11 --user \
--volume {path_to_your_workspace} \
-- ghcr.io/autowarefoundation/autoware-universe:latest-prebuilt
If you intend to use pre-existing data such as maps or Rosbags, modify the --volume
options shown below.
rocker --nvidia --x11 --user \
--volume {path_to_your_workspace} \
--volume {path_to_your_map_data} \
--volume {path_to_your_log_data} \
-- ghcr.io/autowarefoundation/autoware-universe:latest-prebuilt
If you want to build these images locally for development purposes, run the following command:
cd autoware/
./docker/build.sh
To build without CUDA, use the --no-cuda
option:
./docker/build.sh --no-cuda
To specify the platform, use the --platform
option:
./docker/build.sh --platform linux/amd64
./docker/build.sh --platform linux/arm64
If either image is run without rocker
, then root
privileges will be used.
This can affect your local environment as below:
$ docker run --rm -it -v {path_to_your_workspace}:/autoware ghcr.io/autowarefoundation/autoware-universe:latest
# colcon build
# exit
$ rm build/COLCON_IGNORE
rm: remove write-protected regular empty file 'build/COLCON_IGNORE'? y
rm: cannot remove 'build/COLCON_IGNORE': Permission denied
To prevent this error occurring when rocker is not used, there are two suggested methods:
-
Prepare a dedicated workspace for the docker image.
-
Use Visual Studio Code's Remote - Containers extension.
To use the extension, the following settings can be used to create a user account in a similar way to `rocker.
Refer to this document for more details.// .devcontainer/devcontainer.json { "name": "Autoware", "build": { "dockerfile": "Dockerfile" }, "remoteUser": "autoware", "settings": { "terminal.integrated.defaultProfile.linux": "bash" } }
# .devcontainer/Dockerfile FROM ghcr.io/autowarefoundation/autoware-universe:latest ARG USERNAME=autoware ARG USER_UID=1000 ARG USER_GID=$USER_UID RUN groupadd --gid $USER_GID $USERNAME \ && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ && apt-get update \ && apt-get install -y sudo \ && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ && chmod 0440 /etc/sudoers.d/$USERNAME
There are also images versioned based on the date
or release tag
.
Use them when you need a fixed version of the image.
The list of versions can be found here.