Skip to content

Docker for plant-3d-visionLink


Follow the getting started with docker instructions to install the required software.


We advise to assign an existing local database directory to $ROMI_DB, it will be mounted at container startup. To see how to create a local database directory, look here.

Start a containerLink

Assuming you have a valid ROMI database directory under /data/ROMI/DB, you can easily download and start the pre-built roboticsmicrofarms/plant-3d-vision docker image with one of the following command:

From the root directory of the repository, use the convenience script:

export ROMI_DB=/data/ROMI/DB

From the root directory of the repository, use the convenience script:

./docker/ -db /data/ROMI/DB

From any directory, use the docker run command as follows:

export ROMI_DB=/data/ROMI/DB
docker run --runtime=nvidia --gpus all \
--env PYOPENCL_CTX='0' \
-v $ROMI_DB:/myapp/db \
-it roboticsmicrofarms/plant-3d-vision:latest

This should start the latest pre-built roboticsmicrofarms/plant-3d-vision docker image in interactive mode. The database location inside the docker container is /myapp/db.


  • -v $ROMI_DB:/myapp/db performs a bind mount to enable access to the local database by the docker image. See the official documentation.
  • Use ./docker/ -h to get all details about how to use it.

Build a docker imageLink

If you do not wish to use one of the roboticsmicrofarms/plant-3d-vision pre-built image, you may build an image using the docker/Dockerfile recipe accessible in the repository of plant-3d-vision.

We provide a convenience bash script to ease the build of roboticsmicrofarms/plant-3d-vision docker image. You can choose to use this script OR to "manually" call the docker build command.

From the root directory of the repository, use the convenience script:


From the root directory of the repository, use the docker build command as follows:

export VTAG="latest"
docker build -t roboticsmicrofarms/plant-3d-vision:$VTAG .


  • By default, the image tag is 'latest', you can change it, e.g. to 'dev' with -t dev.
  • Use ./docker/ -h to get all details about how to use it.

You may want to clean the build cache, at least from time to time, with:

docker builder prune -a

Publish docker imageLink

To push a newly built image on docker hub:

export VTAG="latest"
docker push roboticsmicrofarms/plantdb:$VTAG

This requires a valid account & token on dockerhub!

Example usageLink


To make sure the host GPU will be accessible from the container, use:

./docker/  --gpu_test

Pipelines testsLink

To performs test reconstructions, you have several possibilities:

  • test the geometric pipeline, with:
    ./docker/  --geom_pipeline_test
  • test the machine learning pipeline, with:
    ./docker/  --ml_pipeline_test
  • test both pipelines, with:
    ./docker/  --pipeline_test


This use test data & test models (for ML) provided with plant3dvision in plant3dvision/tests/testdata.

Executing a ROMI taskLink

To call a ROMI task, as defined in the romitask library, you should use the romi_run_task CLI.

For example to reconstruct a plant, named <my_scan>, using the geometric pipeline and to estimate the angles and internodes, you may use the following command:

romi_run_task AnglesAndInternodes \
  /myapp/db/<my_scan>/ \
  --config plant-3d-vision/configs/geom_pipe_real.toml

You can use it two ways: 1. start a container using the roboticsmicrofarms/plant-3d-vision image, then call the ROMI tasks. 2. use it with the -c option of the script or with docker run.


You may have to source the .profile file before calling romi_run_task.


source .profile is important to add .local/bin/ to the $PATH environment variable. If you don't do this, you might not be able to access the romi_run_task binary from bash in the docker container.