Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile and Makefile to create ocr-d dockerimage #120

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

joschrew
Copy link
Contributor

@joschrew joschrew commented Oct 2, 2024

This PR adds a Dockerfile and Makefile to create a dockerimage for this processor. Ideally all OCR-D processors offer the same way to create an image for them, which is currently missing in this repo.
I am not sure though if this is desired here as well, because it seems to me dinglehopper has slightly other layout as a "normal" ocr-d processor has. Dinglehopper seems also to be supposed to be used detached from ocr-d. That's why I created a draft PR at first.

@joschrew joschrew marked this pull request as draft October 2, 2024 13:32
@mikegerber
Copy link
Member

This PR adds a Dockerfile and Makefile to create a dockerimage for this processor. Ideally all OCR-D processors offer the same way to create an image for them, which is currently missing in this repo.

I'm all for it, have just been waiting for some kind of OCR-D/ocrd_all "standard" to follow.

I am not sure though if this is desired here as well,

Frankly, I'm not a big fan of "Makefiles everywhere", but I also don't see any better solution, so that's OK :) Containerization is definitely wanted.

because it seems to me dinglehopper has slightly other layout as a "normal" ocr-d processor has.

Could you elaborate on that? Maybe we can clear it up.

Dinglehopper seems also to be supposed to be used detached from ocr-d. That's why I created a draft PR at first.

dinglehopper has two CLIs: dinglehopper is standalone, ocrd-dinglehopper is the OCR-D CLI. Nothing special about it 😄

Copy link
Member

@mikegerber mikegerber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving it a "Request changes" for now, but it's only small stuff.

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
Makefile Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
@mikegerber
Copy link
Member

Another question: Should dinglehopper's CI build the image or will that be done by e.g. ocrd_all?

@bertsky
Copy link
Contributor

bertsky commented Oct 7, 2024

Another question: Should dinglehopper's CI build the image or will that be done by e.g. ocrd_all?

Preferably via local CD here.

See here for an example GHA CD which pushes to both Dockerhub and GHCR. (All it takes is to set up a DOCKERHUB_USERNAME and DOCKERHUB_PASSWORD secret in your repo.)

mikegerber and others added 2 commits October 7, 2024 17:39
Co-authored-by: Robert Sachunsky <[email protected]>
I fancy-clicked @bertsky's change suggestion, which duplicated some labels. Now fancy-clicking the fix, fingers crossed...
@mikegerber mikegerber mentioned this pull request Oct 7, 2024
2 tasks
@mikegerber
Copy link
Member

Another question: Should dinglehopper's CI build the image or will that be done by e.g. ocrd_all?
See here for an example GHA CD which pushes to both Dockerhub and GHCR. (All it takes is to set up a DOCKERHUB_USERNAME and DOCKERHUB_PASSWORD secret in your repo.)

I've opened #121.

Any reasoning behind pushing to two container registries?

@mikegerber
Copy link
Member

So, then all that's left to clear up is:

because it seems to me dinglehopper has slightly other layout as a "normal" ocr-d processor has.

@joschrew
Copy link
Contributor Author

joschrew commented Oct 8, 2024

Thanks both of you for extending this PR. I'll mark it ready to merge then.

So, then all that's left to clear up is:

Sorry for the confusion. The project layout is totally fine and working for ocr-d purposes, it just made me wonder if this PR would be accepted. My intention was simply to not make a PR and expecting it to be merged with stuff which may not be wanted by the maintainer (you). But I see it's ok with you.

@joschrew joschrew marked this pull request as ready for review October 8, 2024 12:41
@mikegerber
Copy link
Member

mikegerber commented Oct 9, 2024

Thanks both of you for extending this PR. I'll mark it ready to merge then.

So, then all that's left to clear up is:

Sorry for the confusion. The project layout is totally fine and working for ocr-d purposes, it just made me wonder if this PR would be accepted. My intention was simply to not make a PR and expecting it to be merged with stuff which may not be wanted by the maintainer (you). But I see it's ok with you.

Alright! I'll give the Docker image a spin and if it looks good, I'll merge. (I opened a separate issue for the CD builds.)

I might do something slightly differently (e.g. CMD), because honestly, I'm not bound by OCR-D specs in all details and I see no harm.

@mikegerber
Copy link
Member

I might do something slightly differently (e.g. CMD), because honestly, I'm not bound by OCR-D specs in all details and I see no harm.

In the current state it executes ocrd btw (probably from the core image).

@mikegerber
Copy link
Member

I tested the built image superficially, looks OK!

@mikegerber mikegerber merged commit 071e6a8 into qurator-spk:master Oct 11, 2024
12 checks passed
@bertsky
Copy link
Contributor

bertsky commented Oct 11, 2024

In the current state it executes ocrd btw (probably from the core image).

Yes, that's inherited from the previous stage. I don't know why we put the ocrd --help in there. It used to be just bash (inherited from the original stage, ubuntu).

@joschrew joschrew deleted the dockerfile branch October 14, 2024 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants