Skip to content

Commit

Permalink
Deploy: ocr service env updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
vladd-bit committed Jan 24, 2025
1 parent 8754a39 commit ccff24b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
13 changes: 6 additions & 7 deletions deploy/ocr_service.env
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# The default images for ocr-service:
# - cogstacksystems/cogstack-ocr-service:latest - ENGLISH AND LATIN ONLY
# - cogstacksystems/cogstack-ocr-service-multilang:latest - MULTILANGUAGE SUPPORT,
# - cogstacksystems/cogstack-ocr-service:latest
# check Dockerfile_multilang for more information.
OCR_SERVICE_DOCKER_IMAGE="cogstacksystems/ocr-service:latest"
OCR_SERVICE_DOCKER_IMAGE="cogstacksystems/ocr-service:latest-${CPU_ARCHITECTURE:-amd64}"


# READ https://github.com/CogStack/ocr-service/blob/master/README.md on how to handle these settings,
# it is important to divide CPU(s) between workers/threads
OCR_WEB_SERVICE_WORKERS=1
OCR_WEB_SERVICE_THREADS=1
OCR_SERVICE_CPU_THREADS=4
OCR_SERVICE_CONVERTER_THREADS=4
OCR_SERVICE_CPU_THREADS=1
OCR_SERVICE_CONVERTER_THREADS=1
OCR_WEB_SERVICE_WORKER_CLASS="sync"

# possible modes: OCR, NO_OCR
OCR_SERVICE_OPERATION_MODE=OCR

# 50 - CRITICAL, 40 - ERROR, 30 - WARNING, 20 - INFO, 10 - DEBUG, 0 - NOTSET
OCR_SERVICE_LOG_LEVEL=10
OCR_SERVICE_LOG_LEVEL=40

######################################################################################################

Expand All @@ -28,7 +27,7 @@ OCR_SERVICE_TESSERACT_TIMEOUT=30
# change this to whatever language you are trying to OCR, e.g. eng, deu, fra, ita, nld, ron, spa
# please note that you need to have the corresponding language pack installed in the container
# check Dockerfile_multilang for more information and look for tessaract-ocr-[lang] packages
OCR_SERVICE_TESSERACT_LANG="ron"
OCR_SERVICE_TESSERACT_LANG="eng"

OCR_SERVICE_TESSERACT_NICE=-18
OCR_SERVICE_TESSERACT_CUSTOM_CONFIG_FLAGS=""
Expand Down
1 change: 0 additions & 1 deletion deploy/ocr_service_text_only.env
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ OCR_SERVICE_CONVERTER_THREADS=1

# possible modes: OCR, NO_OCR
OCR_SERVICE_OPERATION_MODE=NO_OCR
OCR_WEB_SERVICE_WORKER_CLASS="sync"
6 changes: 3 additions & 3 deletions deploy/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ services:
#---------------------------------------------------------------------------#
ocr-service-1:
container_name: ocr-service-1
image: cogstacksystems/cogstack-ocr-service:0.2.4
image: cogstacksystems/cogstack-ocr-service:0.2.4-${CPU_ARCHITECTURE:-amd64}
restart: always
# mem_swappiness: 0
# cpuset: "0-15"
Expand Down Expand Up @@ -191,8 +191,8 @@ services:
- cognet

ocr-service-2:
container_name: ocr-service-2
image: cogstacksystems/cogstack-ocr-service:0.2.4
container_name: ocr-service-2-text-only-no-ocr
image: cogstacksystems/cogstack-ocr-service:0.2.4-${CPU_ARCHITECTURE:-amd64}
restart: always
# mem_swappiness: 0
# cpuset: "0-15"
Expand Down

0 comments on commit ccff24b

Please sign in to comment.