Skip to content

Docker container for ROMI virtual plant imagerLink


The following sections aim to show you how to build the docker image and run the corresponding container of the Virtual Plant Imager


In addition to having docker installed in your system, you must also install the nvidia gpu drivers, nvidia-docker (v2.0) and nvidia-container-toolkit.

This docker image has been tested successfully on: docker --version=19.03.6 | nvidia driver version=450.102.04 | CUDA version=11.0

Building the Docker imageLink

In this repository, you will find a script in the docker directory.

    git clone
    cd plant-imager/
    cd docker/
This will create by default a docker image plantimager:latest. Inside the docker image, a user is created and named as the one currently used by your system. If you want more build options (specific branches, tags...etc), type ./ --help.

Running the docker containerLink

In the docker directory, you will find also a script named

To show more options, type ./ --help


For clarity let us defines some variables here:

  • ROMI_DB: the ROMI database root directory (should contain a plantdb file);
  • ROMI_CFG: the directory containing the ROMI configurations (TOML files);

To defines these variable, in a terminal:

export ROMI_DB=/data/ROMI/DB
export ROMI_CFG=/data/ROMI/configs

Get an example archive with arabidopsis modelLink

Download & extract the example archive at the root directory of the romi database:

wget --progress=bar -P $ROMI_DB
tar -C $ROMI_DB/ -xvJf $ROMI_DB/vscan_data.tar.xz

TOML configLink

Use the following configuration, replacing <my_vscan> with the name of the virtual scan dataset to create, e.g. vscan_007.

scan_id = "<my_vscan>"

scan_id = "vscan_data"

scan_id = "vscan_data"

scan_id = "vscan_data"

class_name = "Circle"

center_x = -2
center_y = 3
z = 34.17519302880196
tilt = 8
radius = 30
n_points = 72

obj_fileset = "ObjFileset"
use_palette = true
use_hdri = true
load_scene = false
scene_file_id = "pot"
render_ground_truth = true

width = 896
height = 896
focal = 24
flash = true
add_leaf_displacement = true

type = "averaging"
voxel_size = 0.05

Virtual scan of a model plantLink

Start the docker containerLink

Use the roboticsmicrofarms/plantimager docker image:

export ROMI_DB=/data/ROMI/DB
export ROMI_CFG=/data/ROMI/configs

docker run --runtime=nvidia --gpus all \
    -v $ROMI_DB:/myapp/db \
    -v $ROMI_CFG:/myapp/configs \
    -it roboticsmicrofarms/plantimager:latest bash

Initialize a scan datasetLink

Use the romi_import_folder tool to import the required data into a new scan dataset, e.g. vscan_007:

romi_import_folder ~/db/vscan_data/data/ ~/db/vscan_007/ --metadata ~/db/vscan_data/files.json

Start a VirtualScan romi taskLink

cd plantimager/bin
romi_run_task VirtualScan ~/db/vscan_007 --config ~/plantimager/config/vscan_obj.toml