Skip to content

Docker installation for development#

Prerequisites#

  • For NVIDIA Jetson devices, install JetPack >= 5.0

How to set up a development environment#

  1. Clone autowarefoundation/autoware and move to the directory.

    git clone https://github.com/autowarefoundation/autoware.git
    cd autoware
    
  2. You can install the dependencies either manually or using the provided Ansible script.

Note: Before installing NVIDIA libraries, confirm and agree with the licenses.

Installing dependencies manually#

Installing dependencies using Ansible#

Be very careful with this method. Make sure you read and confirmed all the steps in the Ansible configuration before using it.

If you've manually installed the dependencies, you can skip this section.

./setup-dev-env.sh docker

You might need to log out and log back to make the current user able to use docker.

How to set up a workspace#

Warning

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.

  1. Create the autoware_map directory for map data later.

    mkdir ~/autoware_map
    
  2. Pull the Docker image

    docker pull ghcr.io/autowarefoundation/autoware-universe:latest-cuda
    
  3. Launch a Docker container.

    • For amd64 architecture computers with NVIDIA GPU:

      rocker --nvidia --x11 --user --volume $HOME/autoware --volume $HOME/autoware_map -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda
      
    • If you want to run container without using NVIDIA GPU, or for arm64 architecture computers:

      rocker -e LIBGL_ALWAYS_SOFTWARE=1 --x11 --user --volume $HOME/autoware --volume $HOME/autoware_map -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda
      

      For detailed reason could be found here

    For more advanced usage, see here.

    After that, move to the workspace in the container:

    cd autoware
    
  4. Create the src directory and clone repositories into it.

    mkdir src
    vcs import src < autoware.repos
    
  5. Update dependent ROS packages.

    The dependency of Autoware may change after the Docker image was created. In that case, you need to run the following commands to update the dependency.

    sudo apt update
    rosdep update
    rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
    
  6. Build the workspace.

    colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
    

    If there is any build issue, refer to Troubleshooting.

How to update a workspace#

  1. Update the Docker image.

    docker pull ghcr.io/autowarefoundation/autoware-universe:latest-cuda
    
  2. Launch a Docker container.

    • For amd64 architecture computers:

      rocker --nvidia --x11 --user --volume $HOME/autoware -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda
      
    • If you want to run container without using NVIDIA GPU, or for arm64 architecture computers:

      rocker -e LIBGL_ALWAYS_SOFTWARE=1 --x11 --user --volume $HOME/autoware -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda
      
  3. Update the .repos file.

    cd autoware
    git pull
    
  4. Update the repositories.

    vcs import src < autoware.repos
    vcs pull src
    
  5. Build the workspace.

    colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release