Skip to content

Commit

Permalink
Updated env vars + readmes.(removed multilang refs)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladd-bit committed Jan 24, 2025
1 parent e3eece8 commit 95d4994
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,11 @@ The following docker images are available

```
cogstacksystems/cogstack-ocr-service:latest - ENGLISH ONLY
cogstacksystems/cogstack-ocr-service-multilang:latest - MULTILANGUAGE SUPPORT (lat, es, fr, nl, etc.)
```

Check the [Dockerfile_multilang](./Dockerfile_multilang) for supported languages.

# Available models

Currently, only TESERRACT models are supported.
As described above, you must use the multilang docker image if you want to load and use models for other languages.
You can load models by setting the `OCR_SERVICE_TESSERACT_LANG` variable, you can load multiple models at the same time, example: English + Latin + French `OCR_SERVICE_TESSERACT_LANG=eng+lat+fra`.

<b>For perfomrance reasons it is recommended that you load only one model at a time, as processing time will increase slightly per model loaded.</b>
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
ocr-service:
container_name: ocr-service
#image: ${OCR_SERVICE_DOCKER_IMAGE:-cogstacksystems/cogstack-ocr-service:latest}
#image: ${OCR_SERVICE_DOCKER_IMAGE:-cogstacksystems/cogstack-ocr-service:latest-${CPU_ARCHITECTURE:-amd64}}
build:
context: ../
dockerfile: "Dockerfile"
Expand Down
2 changes: 1 addition & 1 deletion env/general.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# set only CPU_ARCHITECTURE to amd/arm64
# remove if this causes issues on any other platform
# possible values: amd64, arm64
CPU_ARCHITECTURE=amd64
CPU_ARCHITECTURE=arm64
DOCKER_DEFAULT_PLATFORM=linux/${CPU_ARCHITECTURE:-amd64}
11 changes: 5 additions & 6 deletions env/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 Down

0 comments on commit 95d4994

Please sign in to comment.