Hugging Face Text Embeddings Inference for Swale GPU runner tasks. Backs the tei-serve task.
328
Swale-built image backing the tei-serve task definition. It runs Hugging
Face's Text Embeddings Inference
(TEI) server, which serves embedding, reranker and sequence-classification
models over HTTP, on top of TEI's own CUDA image, adjusted for how Swale runs a
task.
cuda-<version> image, which holds a build of the server for
each GPU generation (including the A100 and H100) and an entrypoint that
picks the one for the GPU it finds/data, which a task cannot
write, to the task's home directory, unless HUGGINGFACE_HUB_CACHE names
another; the default port is 8080 rather than 80; the image records TEI's
versionswale (uid 1000)WORKDIR /mnt/workspace, ENTRYPOINT a wrapper that starts TEI's
own entrypointA task definition's exec.args are the server's options:
["--model-id", "<repo id or directory>", "--hostname", "0.0.0.0", "--port", "8080"]. TEI reads its listen address from HOSTNAME when --hostname is
not given, which in a container holds the container's host name, so pass it.
The image starts only where nvidia-smi finds a GPU; on a CPU compute type it
exits at once.
Each tag is the TEI version the image packages, such as 1.10.0. A rebuild
that keeps that version, to pick up a fixed base image or wrapper, adds -r1,
-r2, and so on. A tag is never reused; latest follows the newest publish.
From the repository root:
docker build -t swaleio/tei:dev images/tei
Merging a change under images/tei publishes the image under its next tag;
task definitions reference it by digest.
Built from images/tei in the
swaleio/task-definitions repository. For how a task definition
references an image, see the
task definition reference
in the Swale documentation.
The Dockerfile and entrypoint are covered by the
MIT License.
Text Embeddings Inference is Apache-2.0-licensed; its license text ships inside
the image in /usr/share/licenses/text-embeddings-inference.
This image also contains software from other projects, each under its own
license. The license texts its Ubuntu packages ship are inside the image, in
/usr/share/doc/<package>/copyright. Source code for its GPL and LGPL
components: https://launchpad.net/ubuntu/+source/<source-package>/<version>.
We also provide that source code on request: see
Third-party software.
It also contains NVIDIA software, which is not open source. NVIDIA licenses it
under the
NVIDIA Deep Learning Container License,
which you accept by pulling or using this image; a copy is at
/NGC-DL-CONTAINER-LICENSE.
docker pull swaleio/tei:latest