This repository houses configuration files to build and run Docker containers tied to individual users on a shared machine.
Install Docker Engine: https://docs.docker.com/engine/install/ubuntu
Install the Docker Compose V2 Plugin: https://docs.docker.com/compose/install/linux/
If applicable, install the NVIDIA Container Toolkit: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html
Add users to the docker
group: https://docs.docker.com/engine/install/linux-postinstall
/.dockerenv
is a file mounted inside the Docker container
that contains recommended ROS-related environment variables for shells in the
Docker container. If you choose to use this recommended ROS environment setup,
/.dockerenv
must be sourced in every new shell in the Docker container. For
convenience, the following commands will do that for you.
# The command added to your shell file checks for the existence of /.dockerenv
# and sources the file only if it exists.
# Bash
echo "[[ -e /.dockerenv ]] && source /.dockerenv" >> ~/.bashrc
# Zsh
echo "[[ -e /.dockerenv ]] && source /.dockerenv" >> ~/.zshrc
Alternatively, you may specify your own ROS environment variables in your shell file.
./build.py <tag>
./launch.py <tag>
Note, for the base container on Spot, the tag is see-spot-run
and use the command-line flag --with-initial-user-setup
if building for the first time on a fresh account (with no cloned repositories).
$ docker container ls
# Or its shorthand
$ docker ps
Under the NAMES
column, there should be a container with the name
${YOUR_USERNAME}-noetic-<tag>-app-1
.
docker exec -it $USER-noetic-<tag>-app-1 $SHELL
If you run into missing ROS packages, set the ROS_PACKAGE_PATH appropriately:
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:<path_containing_package>
This might take a few seconds to finish running.
docker stop $USER-noetic-<tag>-app-1