- container files to build images
- script to push images to a registry
- instructions to pull images and run containers
- a container engine such as
Docker Engine
Various GTSAM image configurations are available at docker.io/borglab/gtsam
. Determine which tag you want and pull the image.
Example for pulling an image with GTSAM compiled with TBB and Python support on top of a base Ubuntu 22.04 image.
docker pull docker.io/borglab/gtsam:4.2.0-tbb-ON-python-ON_22.04
docker.io/borglab/gtsam-vnc
is also provided as an image with GTSAM that will run a VNC server to connect to.
To start the image, execute
docker run -it borglab/gtsam:4.2.0-tbb-ON-python-OFF_22.04
after you will find yourself in a bash shell.
To use GTSAM via the python wrapper, similarly execute
docker run -it borglab/gtsam:4.2.0-tbb-ON-python-ON_22.04
and then launch python3
:
python3
>>> import gtsam
>>> gtsam.Pose2(1,2,3)
(1, 2, 3)
First, start the image, which will run a VNC server on port 5900:
docker run -p 5900:5900 borglab/gtsam-vnc:4.2.0-tbb-ON-python-ON_22.04
Then open a remote VNC X client, for example:
sudo apt-get install tigervnc-viewer
xtigervncviewer :5900
The Finder's "Connect to Server..." with vnc://127.0.0.1
does not work, for some reason. Using the free VNC Viewer, enter 0.0.0.0:5900
as the server.
- a Compose Spec implementation such as docker-compose
GTSAM_GIT_TAG
: git tag from the gtsam repoUBUNTU_TAG
: image tag provided by ubuntu to base the image off ofGTSAM_WITH_TBB
: to build GTSAM with TBB, set toON
GTSAM_BUILD_PYTHON
: to build python bindings, set toON
CORES
: number of cores to compile with
docker compose build
GTSAM_TAG
: image tag provided by gtsam
docker compose --file gtsam-vnc/compose.yaml build
Make sure you are logged in via: docker login docker.io
.
Specify the variables described in the .env
file in the hub_push.sh
script.
To push images to Docker Hub, run as follows:
./hub_push.sh
Specify the variables described in the gtsam-vnc/.env
file in the gtsam-vnc/hub_push.sh
script.
To push images to Docker Hub, run as follows:
./gtsam-vnc/hub_push.sh