This commit is contained in:
Stanislaw-Golebiewski 2019-11-25 14:49:45 +01:00
parent 63e7e9c2eb
commit fdf9ddb1db
3 changed files with 27 additions and 3 deletions

View File

@ -9,7 +9,9 @@ RUN apt-get update \
WORKDIR /install
COPY ./api .
COPY . .
WORKDIR /install/api
# get Polish language train data
# RUN wget -P /usr/share/tesseract-ocr/4.00/tessdata/ https://github.com/tesseract-ocr/tessdata/raw/4.00/pol.traineddata
@ -20,7 +22,8 @@ RUN pip3 install pipenv_to_requirements gunicorn && \
pipenv run pipenv_to_requirements && \
pip3 install --no-cache -r requirements.txt
WORKDIR /install/api
WORKDIR /install

4
Jenkinsfile vendored
View File

@ -4,12 +4,14 @@ pipeline {
stages {
stage('Build') {
steps {
sh 'python api/main.py -i api/img/biedra.jpg'
echo 'Building..'
}
}
stage('Test') {
steps {
echo 'Testing..'
sh scripts/check_tesseract.sh
sh 'python api/main.py -i api/img/biedra.jpg'
}
}
}

View File

@ -0,0 +1,19 @@
#!/bin/sh
# check if tesseract is avaliable
if [ -x "$(command -v tesseract)" ]
then
echo "> [Tesseract] tesseract command available...";
else
echo "> [Tesseract] could find tesseract command!";
exit -1;
fi
# check if tesseract is avaliable
if tesseract --list-langs | grep -q 'pol'
then
echo "> [Tesseract] polish langauge avaliable";
else
echo "> [Tesseract] polish langage unavaliable...";
exit -1;
fi