This page describes the setup of an independent OCR appliance for use with the Extended DMS environment. DMS will access the OCR appliance and issue commands so that OCR is performed. The advantages are that the DMS appliance's resources (CPU, RAM) are thus not consumed by the OCR processing.
The method described here is not specific to a given OCR engine. Prerequisites are that the OCR engine runs in a VM that is accessible by ssh (or in the host system that is running the DMS). If a separate VM is used, file system mounts may be needed between the host VMs running the DMS and the OCR engine.
Given its advantages, the below instructions describe the setup of a OCR engine in a separate VM.
Provide OCR engine in VM
("OCR appliance")/<storagepath>/nuxeo/data/
and /<storagepath>/nuxeo/tmp/
NFS-exports /var/lib/nuxeo/data/
and /opt/nuxeo/server/tmp/
respectively and make suer these mounts will be auto mounted (kept alive)/<storagepath>/nuxeo/scripts/
and make executable (chmod +x). This script contains the commands to drive the OCR process for each file.<<adminuserhome>>/.ssh/authorized_keys
file of OCR appliance~/.ssh/
to /<storagepath>/nuxeo/ssh/
~/deploy/config/
)Make sure you replace <<adminuser>> with the correct user name of an administrative user in the OCR appliance, and <<ocr.appliance.name>> with the proper FQND or IP address:
#!/bin/bash ssh <<adminuser>>@<<ocr.appliance.name>> "nice -n 10 /path/to/ocr-command <<parameters>> $1 $2"" |
Deploy script changes:
Make sure that in the "commands.conf" file of the auto-deploy client specific repository, the following commands are added to the nuxeo container definition (under section "elif [${1} = "NUXEO"] then"
) so as to be added the container run command:
add_volume "/<storage_path>/nuxeo/ssh" "/home/nuxeo/.ssh" add_volume "/<storage_path>/nuxeo/scripts/piocr" "/usr/local/bin/piocr" |