CDCgov / ReportVision

Intelligent Data Workflow Automation
Apache License 2.0
1 stars 2 forks source link

add docker integration #208

Closed zdeveloper closed 2 months ago

zdeveloper commented 2 months ago

Pull Request

Description

Create a docker container for the OCR API

Related Issues

180

Additional Notes

RUN pip install "huggingface_hub[cli]"
RUN huggingface-cli download microsoft/trocr-large-printed

Checklist

to test the container, build and run with the following commands

docker build -t ocr .
docker run -p 8000:8000 ocr

then access on http://localhost:8000/docs

Please review and complete the following checklist before submitting your pull request:

Checklist for Reviewers

Please review and complete the following checklist during the review process:

schreiaj commented 2 months ago

For bundling the model weights into the Docker image - you could use the cache_dir into a local directory and then copy that in as part of the docker build step with a simple COPY command. As best as I can tell this does not violate any terms of service with HuggingFace.

zdeveloper commented 2 months ago

For bundling the model weights into the Docker image - you could use the cache_dir into a local directory and then copy that in as part of the docker build step with a simple COPY command. As best as I can tell this does not violate any terms of service with HuggingFace.

Yeah that's a good suggestion, will look into it in a future story, the intention of this container is not for local use, its more for our Azure AppService.