Managing Docker Containers
Introduction
The Vertex One is pre-installed with a couple of Docker containers running Avular software packages. These Docker containers are used to run the Avular software packages in a controlled environment. These containers should not be stopped or removed.
It is highly advised to run your own software packages in a separate Docker container.
Working With Docker Containers
To learn more about working with Docker containers, please refer to the Docker documentation (External Link).
Existing Containers
Here is an architecture overview of how the containers are built up.
To get an overview of the running containers and their status run the following command: avular status
Default User Container (user-container)
This container is running bare ROS 2 Humble and has the SDK pre-installed. It can be used to easily interface with the SDK. The source code for the user-container is available Public User Container Example Repo to quickly start developing your own container. As an example, lets check the battery percentage through the SDK using the container.
See Cerebra Robot Discovery (Gen3) or Cerebra Robot Discovery (Gen4) on how to connect to the onboard computing module.
- Start the Vertex One and wait for the onboard computing module to boot
- SSH into the online computing module
- View a list of all the running containers; execute:
avular status
- If the container is not running, start the container by executing:
cd /data/user/containers && docker-compose up -d
- If the repository is not available, clone the repository by following the link above.
- Enter the user-container by executing the following command:
avular compose enter user
. - Inside the container, view all available data sources and actions by executing:
creos-cli --list
. - To view the battery percentage, execute:
creos-cli --get system_info.battery_status
.
Note
To view all available commands in the SDK CLI tool, execute: creos-cli --help
.
For more information on the SDK, refer to the SDK Documentation.
Setup Your Own Development Container
The source-code and dockerfile of the user-container are available and can be downloaded.
- Dockerfile & Entrypoint
The above files can be used to build the user-container from source.
- This can be done by first copying the files to the Vertex One.
- Tip: Use the VSCode: Remote SSH to copy the files.
- Then building the dockerfile with
docker build --network=host -t custom_container . -f docker/Dockerfile
. - Once built, it can be added to the docker compose files. The compose files can be found using
avular compose config
(This command opens a new shell and navigates to the config files) - The Docker compose files all share the same base file:
docker-compose-common.yml
. - Use
image: custom_container
to specify which image needs to be used. - For more info on how to configure the Docker compose file: Docker Compose file docs
- Using
avular compose down
andavular compose up
the new container can be started.
Adding Repositories Into The Containers
To add your own repositories into the containers, you can configure the Dockerfile
to copy or pull the required repository.
Note
For building the Docker image, you can use the online repository pipelines (e.g. Github/Gitlab) or build it on the onboard computing module itself.
To pull the built Docker image on the onboard computing module, access the Docker compose files (avular compose config
) and add the url of your Docker image.