|
|
@ -3,25 +3,38 @@ DATA_SUBDIR=data
|
|
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
check_data_subdir() {
|
|
|
|
|
|
|
|
result=0
|
|
|
|
|
|
|
|
|
|
|
|
if git submodule status $DATA_SUBDIR | grep -q '^-'; then
|
|
|
|
if git submodule status $DATA_SUBDIR | grep -q '^-'; then
|
|
|
|
echo "$DATA_SUBDIR/ is not an initialized submodule"; exit 1
|
|
|
|
echo "$DATA_SUBDIR/ is not an initialized submodule"; result=1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if ! [ -e $DATA_SUBDIR/.git/annex ]; then
|
|
|
|
if ! [ -e $DATA_SUBDIR/.git/annex ]; then
|
|
|
|
echo "$DATA_SUBDIR/ is not a git annex repository"; exit 1
|
|
|
|
echo "$DATA_SUBDIR/ is not a git annex repository"; result=1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if ! (cd $DATA_SUBDIR && git annex version | grep -q 'local repository version: 7'); then
|
|
|
|
if ! (cd $DATA_SUBDIR && git annex version | grep -q 'local repository version: 7'); then
|
|
|
|
echo "$DATA_SUBDIR/ is not a git annex repository version 7"; exit 1
|
|
|
|
echo "$DATA_SUBDIR/ is not a git annex repository version 7"; result=1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if ! (cd $DATA_SUBDIR && git remote | grep -q '^nfs$'); then
|
|
|
|
if ! (cd $DATA_SUBDIR && git remote | grep -q '^nfs$'); then
|
|
|
|
echo "$DATA_SUBDIR/ has no git remote 'nfs'"; exit 1
|
|
|
|
echo "$DATA_SUBDIR/ has no git remote 'nfs'"; result=1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# XXX
|
|
|
|
return $result
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
download=0
|
|
|
|
|
|
|
|
if ! check_data_subdir; then
|
|
|
|
|
|
|
|
select choice in "Abort to $DATA_SUBDIR" "Download data files"; do
|
|
|
|
|
|
|
|
if [ $REPLY = 1 ]; then
|
|
|
|
#git submodule update --init
|
|
|
|
#git submodule update --init
|
|
|
|
#(cd data && git annex init --version=7)
|
|
|
|
#(cd data && git annex init --version=7)
|
|
|
|
#(cd data && git remote add nfs /path/to/GitNX-Repository/qurator/qurator-data)
|
|
|
|
#(cd data && git remote add nfs /path/to/GitNX-Repository/qurator/qurator-data)
|
|
|
|
|
|
|
|
exit
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
download=1
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
else
|
|
|
|
(
|
|
|
|
(
|
|
|
|
cd data
|
|
|
|
cd data
|
|
|
|
for f in "calamari-models/GT4HistOCR/*.ckpt*" "tesseract-models/GT4HistOCR/*.traineddata" "textline_detection/*.h5"; do
|
|
|
|
for f in "calamari-models/GT4HistOCR/*.ckpt*" "tesseract-models/GT4HistOCR/*.traineddata" "textline_detection/*.h5"; do
|
|
|
@ -29,5 +42,6 @@ fi
|
|
|
|
git annex fsck $f
|
|
|
|
git annex fsck $f
|
|
|
|
done
|
|
|
|
done
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
docker build -t my_ocrd_workflow .
|
|
|
|
docker build -t my_ocrd_workflow .
|
|
|
|