Replies: 4 comments 4 replies
-
I refer to #50 since it is quite common to use official images without "hacking" them. Flow would be as follows: |
Beta Was this translation helpful? Give feedback.
-
Don't think you need to develop the service Just the communication with the nc-app |
Beta Was this translation helpful? Give feedback.
-
Is there any progress on this? I would like to use Workflow OCR with the AIO version of Nextcloud. |
Beta Was this translation helpful? Give feedback.
-
AppAPI and External AppsProposalWith the AppAPI and External Apps concept, it is now possible to create a NC app inside of a docker container. The framework already handles the basic infrastructure between the container and the NC ecosystem:
So in theory it should be possible to build a Nextcloud ExApp based on the official ocrMyPdf Docker image. Things to checkBasics like Authentication and Encrypted Communication should already be covered by the ExApp infrastructure. Nevertheless, we should keep in mind the official statement for the OCRmyPDF docker container: Warning The OCRmyPDF web service wrapper is intended for demonstration or development. It provides no security, no authentication, no protection against denial of service attacks, and no load balancing. The default Flask WSGI server is used, which is intended for development only. The server is single-threaded and so can respond to only one client at a time. While running OCR, it cannot respond to any other clients. We should check the aspects from https://ocrmypdf.readthedocs.io/en/latest/cloud.html#ocr-service beforehand. Maybe it also makes sense to also have a closer look into Restricting CPU usageCould be implemented by using dockers native CPU Resource Contraints. NC AppAPI would need to add an additional param to the creation process of a container to for example set the property NanoCPUS or CpuPeriod and CpuQuota in ContainerCreate Temporary StorageTo ensure that docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 A container started via services:
alpine:
image: alpine
command: ["tail","-f","/dev/null"]
volumes:
- tmpfs:/tmp
volumes:
tmpfs:
# For details, see:
# https://docs.docker.com/engine/reference/commandline/volume_create/#driver-specific-options
driver: local
driver_opts:
o: "size=100M"
device: tmpfs
type: tmpfs Will see: / # df -h
Filesystem Size Used Available Use% Mounted on
...
tmpfs 100.0M 0 100.0M 0% /tmp Again, to implement this, the AppAPI code needs to be adjusted for this. Probably by introducing a second Finally we also need to tell |
Beta Was this translation helpful? Give feedback.
-
Currently the app has a direct dependency to the
OCRmyPDF
commandline tool. So this dependency has to be installed directly onto the Nexcloud system for this app to work.This discussion is meant to collect various alternative installation methods for the OCR backend needed by this app.
Related issues:
@bahnwaerter @l00v3 @bohrsty FYI
Beta Was this translation helpful? Give feedback.
All reactions