Hey HN! We're excited to launch https://depot.ai today - depot.ai is an open-source Docker registry that makes it easy to embed public models from Hugging Face in your Docker images using a `COPY`:<p><pre><code> # Copy all files from the model repo to the current WORKDIR
COPY --link --from=depot.ai/runwayml/stable-diffusion-v1-5 / .
# COPY just one file from the model repo to the current WORKDIR
COPY --link --from=depot.ai/runwayml/stable-diffusion-v1-5 /v1-5-pruned.ckpt .
</code></pre>
To optimize build speed, cache hits, and registry storage, we're building each image reproducibly and indexing the contents with eStargz[0]. The image is stored on Cloudflare R2, and served via a Cloudflare Worker. Everything is open source[1]!<p>Compared to alternatives like `git lfs clone` or downloading your model at runtime, embedding it with `COPY` produces layers that are cache-stable, with identical hash digests across rebuilds. This means they can be fully cached, even if your base image or source code changes.<p>And for Docker builders that enable eStargz, copying single files from the image will download <i>only</i> the requested files. eStargz can be enabled in a variety of image builders[2], and we’ve enabled it by default on Depot[3].<p>Here’s an announcement post with more details: https://depot.dev/blog/depot-ai.<p>We’d love to hear any feedback you may have!<p>[0] https://github.com/containerd/stargz-snapshotter/blob/main/docs/estargz.md<p>[1] https://github.com/depot/depot.ai<p>[2] https://github.com/containerd/stargz-snapshotter/blob/main/docs/integration.md#image-builders<p>[3] https://depot.dev