mirror of
https://github.com/ciur/papermerge.git
synced 2026-04-25 20:15:58 +03:00
[GH-ISSUE #199] [Docker] Can't get upload OCR to work simultaneously with import dir OCR #161
Labels
No labels
2.1
3.0
3.0.1
3.0.2
3.0.3
3.0.3
3.1
3.2
3.2
3.3
3.5
3.x
Fixed. Waiting for feedback.
Fixed. Waiting for feedback.
UX
Version 2.1 - alpha
XSS
announcement
beta
blocker
bug
cannot reproduce
confirmed
confirmed
critical
demo
dependencies
deployment
detchnical debt
discussion
docker
documentation
donations
duplicate
enhancement
feature request
frontend
fundraising
good first issue
good issue
help wanted
high
implemented
important
improvement
incomplete
invalid
investigation
kubernetes
low
low impact
medium
medium
medium impact
migration from 2.0
migration from 2.1
missing-language
missing-ocr-language
no-activity
note
ocr
outofscope
packaging
performance
popular request
pull-request
pypi
question
raspberry pi
roadmap
search
security
setup
status
task
technical debt
updates
user xp
version 1.4.0 - demo
will be implemented
will not be implemented
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/papermerge#161
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @maspiter on GitHub (Oct 28, 2020).
Original GitHub issue: https://github.com/ciur/papermerge/issues/199
Originally assigned to: @ciur on GitHub.
Building from docker files. Cannot have both the upload and the import dir OCR to work in the same installation.
It is either one or the other it appears.
@maspiter commented on GitHub (Oct 28, 2020):
Apparently the worker does not pick up the uploaded files in the other container?
As a workaround I added the following to the app.startup.sh before starting the webserver:
nohup python manage.py worker > /dev/null 2>&1 &
This to start the worker service in the app container as well.
Of course you need to build the image with tesseract support too.
Which leaves the question: why 2 separate containers? Apart from simultaneous workloads.
@ciur commented on GitHub (Oct 29, 2020):
Because you should be able start any number of workers. This way application will scale with number of documents/users by adding additional workers - while only one web/main app will suffice to handle http part.
I absolutely agree that for simple deployments (1 worker + 1 main app) they can happily live in same container.
This is what linuxserver actually does (they provide 1 single container for both worker and main app).
@maspiter commented on GitHub (Oct 29, 2020):
Ok, thanks for the reply. But why is it then the worker is not started in the app container to handle the file uploads? This is very confusing IMHO.
So it is possible to run multiple workers in the same container? Do they work in parallel?
@maspiter commented on GitHub (Nov 2, 2020):
Could you please elaborate on how to make it work properly?
If the worker is not started in the app container there is no OCR for uploads.
If the worker is started there is double OCR.
I've tried using Redis and get the following output with two workers started:
[2020-11-02 23:09:51,890: INFO/MainProcess] mingle: all alone
Is the setup with two containers actually tested or am I basically debugging here? :)
@maspiter commented on GitHub (Nov 3, 2020):
Breaking news: built an all-in-one container and the import folder still does double OCR.
So either there is something wrong with my config or with the app. Probably config but am out of ideas.
EDIT: running 1.5.0 which might explain alot.
@lucasff commented on GitHub (Dec 16, 2020):
You missed one important information here.
How are you mounting/binding your folders/volumes?