Skip to content

ThundeRatz/GrootDocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

GrootDocker

🌳 Groot Docker 🐋

Docker configurations for Groot, the BehaviourTrees graphical editor

🎈 Intro

This is a Docker image build around Groot.

📦 Dependencies

As a docker image, it is necessary to have docker installed, for instructions on how to do that, see the oficial documentation.

The best way to run this image is with rocker, ROS custom docker runner.

If you have ROS repos configured in your computer (see here how to do that), you may install rocker with the command

sudo apt-get install python3-rocker

If you don't have the ROS repos or you don't use a Debian-based distro, you may also install rocker with pip

python -m pip install rocker

🔨 Building

There as two ways of building this docker image, using docker BuildKit or not.

To simlpy build the image, run in the root of the repository:

docker build . -t thunderatz/groot

To use the BuildKit to build the image, set the DOCKER_BUILDKIT=1 environment variable when invoking the docker build, such as:

DOCKER_BUILDKIT=1 docker build . -t thunderatz/groot

🏁 Running

First, to be able to execute graphical applications with docker, run:

xhost +local:docker

Another observation is that in order to be able to load logs or trees to Groot, or to save a tree in the host, it is necessary to use docker volumes, as it will be seen below.

🤖 rocker

For Intel integrated graphics cards:

rocker --devices /dev/dri/card0 --x11 --network host --volume path/to/host/logs_trees_dir:path/where/to/mount/logs_trees_dir -- thunderatz/groot:latest

For NVidia GPUs:

rocker --nvidia --x11 --network host --volume path/to/host/logs_trees_dir:path/where/to/mount/logs_trees_dir -- thunderatz/groot:latest

Where path/to/host/logs_trees_dir is the directory in the host machine where the logs and trees will are stored and path/where/to/mount/logs_trees_dir is the diretory where the host directory will be mounted inside the container.

🐋 docker

Running on linux:

docker run -it --rm \
    --env="DISPLAY" \
    --env="TERM" \
    --env="QT_X11_NO_MITSHM=1" \
    --env="XAUTHORITY=/tmp/.docker.xauth" \
    --volume /tmp/.docker.xauth:/tmp/.docker.xauth \
    --volume /tmp/.X11-unix:/tmp/.X11-unix \
    --volume path/to/host/logs_trees_dir:path/where/to/mount/logs_trees_dir \
    --network host \
    thunderatz/groot:latest

Where path/to/host/logs_trees_dir is the directory in the host machine where the logs and trees will are stored and path/where/to/mount/logs_trees_dir is the diretory where the host directory will be mounted inside the container.

About

Docker configurations for Groot, the BehaviourTrees graphical editor

Resources

License

Stars

Watchers

Forks