work plz
This commit is contained in:
parent
63e7e9c2eb
commit
fdf9ddb1db
@ -9,7 +9,9 @@ RUN apt-get update \
|
|||||||
|
|
||||||
WORKDIR /install
|
WORKDIR /install
|
||||||
|
|
||||||
COPY ./api .
|
COPY . .
|
||||||
|
|
||||||
|
WORKDIR /install/api
|
||||||
|
|
||||||
# get Polish language train data
|
# 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
|
# 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 && \
|
pipenv run pipenv_to_requirements && \
|
||||||
pip3 install --no-cache -r requirements.txt
|
pip3 install --no-cache -r requirements.txt
|
||||||
|
|
||||||
WORKDIR /install/api
|
|
||||||
|
WORKDIR /install
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -4,12 +4,14 @@ pipeline {
|
|||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh 'python api/main.py -i api/img/biedra.jpg'
|
echo 'Building..'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Testing..'
|
echo 'Testing..'
|
||||||
|
sh scripts/check_tesseract.sh
|
||||||
|
sh 'python api/main.py -i api/img/biedra.jpg'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
19
scripts/check_tesseract.sh
Normal file
19
scripts/check_tesseract.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user