Hermetic docker images with Hugging Face machine learning models

submited by
Style Pass
2024-04-03 08:00:11

Hugging Face is GitHub for machine learning models. Their on-the-fly model download scheme, however, is difficult from a DevOps perspective.

One huge problem with downloading models on the fly is that at best, your docker images are no longer hermetic. At worst, your deployments start to fail when Hugging Face goes down, just like it went down yesterday for multiple hours.

Do verify by running these images on the CI before deployment as it might fail in case you forgot to download certain models. Now, the huge advantage of this process is that your deployed binaries are hermetic. They no longer depend on Hugging Face being up or returning a different/newer model anymore.

Leave a Comment