text-embeddings-inference documentation

为 TEI 构建自定义容器

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

为 TEI 构建自定义容器

您可以使用 Docker 构建自己的 CPU 或 CUDA TEI 容器。要构建 CPU 容器,请在包含自定义 Dockerfile 的目录中运行以下命令:

docker build .

要构建 CUDA 容器,必须确定运行时所用 GPU 的计算能力(compute capability)。此信息对于正确配置 CUDA 容器至关重要。以下是各种 GPU 类型的运行时计算能力示例:

  • Turing(T4、RTX 2000 系列、……)- runtime_compute_cap=75
  • Ampere 8.0 (A100, …) - runtime_compute_cap=80
  • Ampere 8.6 (A10, …) - runtime_compute_cap=86
  • Ada Lovelace(RTX 4000 系列,……)- runtime_compute_cap=89
  • Hopper (H100) - runtime_compute_cap=90
  • Blackwell 10.0 (B200, GB200, …) - runtime_compute_cap=100
  • Blackwell 12.0(GeForce RTX 50X0,……)- runtime_compute_cap=120

确定计算能力后,将其设置为 runtime_compute_cap 变量,并使用 Dockerfile-cuda 构建容器:

# Get submodule dependencies
git submodule update --init

runtime_compute_cap=80

docker build . -f Dockerfile-cuda --build-arg CUDA_COMPUTE_CAP=$runtime_compute_cap
Update on GitHub