slub / ocrd_controller

Path to network implementation of OCR-D
MIT License
6 stars 3 forks source link

Avoid error messages because of hard links #17

Closed stweil closed 2 years ago

stweil commented 2 years ago

Starting of a Docker container can show an error because creating hard links is not possible across filesystems:

ln: failed to create hard link '/models/ocrd-resources/ocrd-tesserocr-recognize/eng.traineddata' => '/usr/local/share/tessdata/eng.traineddata': Invalid cross-device link
ln: failed to create hard link '/models/ocrd-resources/ocrd-tesserocr-recognize/equ.traineddata' => '/usr/local/share/tessdata/equ.traineddata': Invalid cross-device link
ln: failed to create hard link '/models/ocrd-resources/ocrd-tesserocr-recognize/osd.traineddata' => '/usr/local/share/tessdata/osd.traineddata': Invalid cross-device link

In addition, restarting an existing Docker container will always give an error because the hard links already exist.

Using forced symbolic links fixes both kinds of errors.

Signed-off-by: Stefan Weil sw@weilnetz.de