This repository provides the tools and scripts necessary to create Docker Containers for the development of the Bot-Q TMS platform. It streamlines the setup of the development environment using NVIDIA Isaac ROS.
You need a Linux environment with an NVIDIA GPU.
| Component | Requirement |
|---|---|
| OS | Ubuntu >= 22.04 LTS |
| GPU | NVIDIA GPU with valid drivers |
| Software | Docker Engine, NVIDIA Container Toolkit |
First, ensure that Nvidia drivers are installed and recognized by your machine.
nvidia-smiYou should see output similar to the following:
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.133.07 Driver Version: 570.133.07 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4080 ... Off | 00000000:01:00.0 On | N/A |
+-----------------------------------------+------------------------+----------------------+
If the command is not found or no GPU is detected, please refer to this guide to install the drivers (GUI method recommended).
Install Docker Engine on Ubuntu using the official repository.
-
Set up Docker's
aptrepository:# Add Docker's official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc # Add the repository to Apt sources: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update
-
Install the Docker packages:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
-
Configure Docker to run without root privileges:
sudo groupadd docker sudo usermod -aG docker $USER -
Apply changes: Reboot or logout/login to activate the group changes.
reboot
This toolkit allows the Docker container to utilize the host's GPU.
-
Configure the production repository:
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list sudo apt-get update
-
Install the toolkit:
export NVIDIA_CONTAINER_TOOLKIT_VERSION=1.17.8-1 sudo apt-get install -y \ nvidia-container-toolkit=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \ nvidia-container-toolkit-base=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \ libnvidia-container-tools=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \ libnvidia-container1=${NVIDIA_CONTAINER_TOOLKIT_VERSION}
-
Apply changes:
reboot
Download the base image required for development.
docker pull nvcr.io/nvidia/isaac/ros:x86_64-ros2_humble_23aced29fb80f407b727eec37775e30eNote
This image is approximately 20GB. Ensure you have sufficient disk space and a stable internet connection (wired recommended).
Clone this repository and set up your workspace directory.
git clone https://github.com/sd-robotics/sd-dockerCopy the configuration to a new directory for your specific container instance.
cp -r sd-docker/ ~/docker_workspaces/
mv ~/docker_workspaces/ ~/{your_new_container_name}/Warning
Container names must be unique. Please ensure specific folder names are used for different environments.
Before building, configure the architecture settings.
Note
Edit the env.sh file inside the docker folder. Set the ARCHITECTURE variable to match your hardware:
ARCHITECTURE=jetson # Use 'amd64' for PC, 'jetson' for Nvidia JetsonNavigate to the directory and build the Docker image.
cd ~/{your_new_container_name}/docker
bash build.shOnce the build is complete, launch the container.
bash run.shTip
A shared folder is created at ~/colcon_ws/src/ inside the container, mapping to your local machine for easy data exchange.
Commands to manage the container lifecycle.
Start an existing container:
docker start {your_new_container_name}Enter the container terminal:
docker exec -it {your_new_container_name} /bin/bashStop the container:
docker stop {your_new_container_name}- Docker Engine Installation: Official Documentation
- Isaac ROS Base Image: NVIDIA NGC Catalog