It is quite common that our programs need to import libraries, thus we need a way to install them. Since our programs reside in Docker images, we need a way to install libraries inside the image when the image is built.
All the project templates provided by Duckietown support two package managers out of the box:
Advanced Package Tool (
Pip Installs Packages for Python3 (
List your apt packages or pip3 packages in the files
pip3 dependencies, we make a distinction between Duckietown-owned and third-party libraries.
List all the Duckietown-owned libraries you want to install in the file
third-party libraries in the file
Dependencies files support comments (lines starting with
#) and empty lines. Use them to group
dependencies together and make dependencies lists easier to read and maintain.
dts devel build after editing these files will rebuild the image with the new dependencies
That’s it! Now you know how to customize dependencies as well!