Skip to content

Docker for VirtualPlantImagerLink


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/plantimager 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/plantimager:latest

This should start the latest pre-built roboticsmicrofarms/plantimager 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/plantimager pre-built image, you may build an image using the docker/Dockerfile recipe accessible in the repository of plantimager.

We provide a convenience bash script to ease the build of roboticsmicrofarms/plantimager 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/plantimager:$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


You can test the creation of a virtual plant and its acquisition by the virtual scanner as follows:

./docker/ --test

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 create a virtual plant and acquire it with the VirtualScanner, as <my_vscan>, using the Blender server , you may use the following command:

romi_run_task VirtualScan \
  /myapp/db/<my_scan>/ \
  --config plant-imager/configs/vscan_lpy_blender.toml


The previous command rely on the presence of a vscan_data directory, as it contains the LPY model, background and textures to use (as defined by the TOML configuration file). It is accessible in the repository under plant-imager/database_example/vscan_data.

TOML configLink


The following subsections need to be reviewed!


To generate a virtual plant using LPY, the default configuration is as follows:

lpy_file_id = "arabidopsis_notex"

BRANCHON = false
BETA = 51


To perform a scan of a virtual plant, the default configuration is as follows:

scan_id = "vscan_data"

scan_id = "vscan_data"

scan_id = "vscan_data"

center_x = 0
center_y = 0
z = 32
tilt = 3
radius = 40
n_points = 36

class_name = "Circle"

load_scene = false
scene_file_id = ""
use_palette = true
use_hdri = true
obj_fileset = "VirtualPlant"
hdri_fileset = "HdriFileset"
scene_fileset = "SceneFileset"
palette_fileset = "PaletteFileset"
render_ground_truth = true
colorize = true

width = 1440
height = 1080
focal = 16
flash = false
port = 9001
add_leaf_displacement = true