-
-
Notifications
You must be signed in to change notification settings - Fork 9
Setup (Docker)
manx52 edited this page Jul 23, 2024
·
27 revisions
The docker setup is only available for people with NVIDIA-capable GPUs. TO verify this, run nvidia-smi
and verify if you have any problems. If you haven't installed it, go to Software & Updates >> Additional Drivers and install the recommended NVIDIA driver
https://github.com/utra-robosoccer/soccerbot/wiki/Setup-(Local)
sudo apt-get install -y apt-utils python3-pip
pip3 install --upgrade setuptools
sudo apt-get install -y curl
Install docker (https://docs.docker.com/engine/install/ubuntu/)
curl -sSL https://get.docker.com/ | sh
sudo groupadd docker
sudo usermod -aG docker $USER
# Login and then log back out
# Setup buildx configuration
docker buildx create --name soccer && docker buildx use soccer
# Make sure you have nvidia drivers (nvidia-smi), if not https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-20-04-focal-fossa-linux
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get update
sudo apt-get install -y nvidia-container-runtime nvidia-container-toolkit mesa-utils
sudo systemctl restart docker
echo "xhost +local:docker" >> ~/.bashrc && source ~/.bashrc
# Edit the following file /etc/nvidia-container-runtime/config.toml and set (ref: https://qiita.com/k_ikasumipowder/items/5e71208b7c7ae3e4fe7c)
no-cgroups = false
docker login -u utrasoccer # Password dckr_pat_r8_EwMV7RmiYNG2VbnculJUqc1w
docker compose pull # Use docker-compose build if you want to build locally
docker compose up
# docker compose -f docker-compose.full.yaml up # To run a full game also comment out the ports in friendly in docker-compose.yaml
- To run just simulator run docker compose up simulator
- You never need to build the images a second time as all the code is mounted
- To run the full game run docker compose -f docker-compose.full.yaml up
- To avoid opening rviz everytime, run the following
sudo rm /opt/ros/noetic/share/rviz/default.rviz
sudo ln -s /home/$USER/catkin_ws/src/soccerbot/soccerbot/rviz/soccerbot.rviz /opt/ros/noetic/share/rviz/default.rviz