Giter Site home page Giter Site logo

starcabbage / static-tesseract Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wingedrhino/static-tesseract

0.0 0.0 0.0 7 KB

A docker recipe to build a statically linked version of Tesseract, the opensource OCR software. Perfect for deployment on AWS Lambda or other cloud functions!

License: Apache License 2.0

Shell 25.07% Dockerfile 74.93%

static-tesseract's Introduction

Static Tesseract

This is a Dockerfile, along with a helper docker-compose.yml file to help build a fully-static version of Tesseract 4.1.

The Dockerfile sets up a base Ubuntu 18.04 system into which Tesseract 4.1 is compiled.

The build.sh script is used to setup the container, download the built binary from within the container and then destroy the container.

After all this, you're left with a tesseract binary in the current folder that is statically linked.

This binary may be used in environments that don't let you install custom packages from the operating system's repository, like Google Cloud Functions and Amazon Lambda.

Dependencies

Make sure you've atleast Docker 19.3.04 and Docker Compose 1.24.0 installed. I have not tested any of this as working on older versions of Docker, although you might have some luck there since I don't do anything non-standard.

Execution

Simply run ./build.sh and make yourself a nice beverage. You'll have a statically linked tesseract binary built in a few minutes!

Debugging / Misc

SSH Into The Container

The container is run with a sleep infinity command so that you can open a terminal within it and poke around inside. This also lets you try alternative build flags and the like.

docker-compose exec tesseract /bin/bash

Delete Docker Artefacts

Sometimes you'd want to get rid of the intermediate images built during this build process.

docker image prune

Pre-Built Binaries

At some point I might add them to the releases within this repository. For now, these scripts shouldn't be very hard to run!

static-tesseract's People

Contributors

wingedrhino avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.