Unstructured-IO / unstructured-api

Apache License 2.0
528 stars 110 forks source link

chore: prefetch chipper in the api image #287

Closed awalker4 closed 1 year ago

awalker4 commented 1 year ago

Fetch Chipper at buildtime so we don't have to download it in the middle of a request. The new Chipper is in our private huggingface, so when the HF_TOKEN is present, pass it as a secret and set it in the env. A new script, maybe-download-chipper.sh runs during the build, and if the token is set, it will fetch the model.

Removes the preload chipper logic from start-app.sh.

Note this pr is against #285 for the new unstructured. Once that's merged, we can put this against main and the tests will pick it up.