默认情况下,LangSmith 将从我们的公共 Docker 注册表中拉取映像。但是,如果您在没有互联网访问权限的环境中运行 LangSmith,或者如果您想使用私有 Docker 注册表,您可以将映像镜像到您自己的注册表,然后配置您的 LangSmith 安装以使用这些映像。

要求

  • 对您的 Kubernetes 集群/机器可以访问的 Docker 注册表的经过身份验证的访问权限。
  • 在您的本地机器或可以访问 Docker 注册表的机器上安装 Docker。
  • 一个 Kubernetes 集群或可以运行 LangSmith 的机器。

镜像映像

为了方便起见,我们提供了一个脚本来为您镜像映像。您可以在 LangSmith Helm Chart 存储库中找到该脚本 要使用该脚本,您需要使用以下命令运行该脚本,指定您的注册表和平台:
bash mirror_images.sh <your-registry> [<platform>]
其中 <your-registry> 是您的 Docker 注册表的 URL(例如 myregistry.com),<platform> 是您使用的平台(例如 linux/amd64linux/arm64 等)。如果您未指定平台,它将默认为 linux/amd64 例如,如果您的注册表是 myregistry.com,您的平台是 linux/arm64,并且您想使用最新版本的映像,您将运行:
bash mirror_langsmith_images.sh --registry myregistry --platform linux/arm64 --version 0.10.66
请注意,此脚本将假设您已安装 Docker 并且已经过您的注册表身份验证。它还将使用与原始映像相同的存储库/标签将映像推送到指定的注册表。 或者,您可以手动拉取、镜像和推送映像。您需要镜像的映像可在 LangSmith Helm Chart 的 values.yaml 文件中找到。可以在此处找到:LangSmith Helm Chart values.yaml 以下是如何使用 Docker 镜像映像的示例:
# 从公共注册表拉取映像
docker pull langchain/langsmith-backend:latest
docker tag langchain/langsmith-backend:latest <your-registry>/langsmith-backend:latest
docker push <your-registry>/langsmith-backend:latest
您需要对要镜像的每个映像重复此操作。

配置

映像镜像后,您需要配置您的 LangSmith 安装以使用镜像映像。您可以通过修改 LangSmith Helm Chart 安装的 values.yaml 文件或 Docker 安装的 .env 文件来执行此操作。将标签替换为您要使用的版本,例如 0.10.66 表示撰写本文时的最新版本。
images:
  imagePullSecrets: [] # Add your image pull secrets here if needed
  registry: "" # Set this to your registry URL if you mirrored all images to the same registry using our script. Then you can remove the repository prefix from the images below.
  aceBackendImage:
    repository: "(your-registry)/langchain/langsmith-ace-backend"
    pullPolicy: IfNotPresent
    tag: "0.10.66"
  backendImage:
    repository: "(your-registry)/langchain/langsmith-backend"
    pullPolicy: IfNotPresent
    tag: "0.10.66"
  frontendImage:
    repository: "(your-registry)/langchain/langsmith-frontend"
    pullPolicy: IfNotPresent
    tag: "0.10.66"
  hostBackendImage:
    repository: "(your-registry)/langchain/hosted-langserve-backend"
    pullPolicy: IfNotPresent
    tag: "0.10.66"
  operatorImage:
    repository: "(your-registry)/langchain/langgraph-operator"
    pullPolicy: IfNotPresent
    tag: "6cc83a8"
  platformBackendImage:
    repository: "(your-registry)/langchain/langsmith-go-backend"
    pullPolicy: IfNotPresent
    tag: "0.10.66"
  playgroundImage:
    repository: "(your-registry)/langchain/langsmith-playground"
    pullPolicy: IfNotPresent
    tag: "0.10.66"
  postgresImage:
    repository: "(your-registry)/postgres"
    pullPolicy: IfNotPresent
    tag: "14.7"
  redisImage:
    repository: "(your-registry)/redis"
    pullPolicy: IfNotPresent
    tag: "7"
  clickhouseImage:
    repository: "(your-registry)/clickhouse/clickhouse-server"
    pullPolicy: Always
    tag: "24.8"
Once configured, you will need to update your LangSmith installation. You can follow our upgrade guide here: Upgrading LangSmith.If your upgrade is successful, your LangSmith instance should now be using the mirrored images from your Docker registry.
Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.