用于推理和解释的预构建容器

Gemini Enterprise Agent Platform 提供作为预构建容器运行的 Docker 容器映像,用于在经过训练的模型制品上提供推理和说明。您可以使用这些容器提供的 HTTP 推理服务器以最少的配置执行推理。这些容器按机器学习框架和框架版本组织。在许多情况下,使用预构建容器比创建用于推理的自定义容器要简单。

本文档列出了用于推理和说明的预构建容器,并介绍了如何将它们与使用 Agent Platform 的自定义训练功能创建的模型制品或在 Agent Platform 之外创建的模型制品搭配使用。

支持政策和时间表

Gemini Enterprise Agent Platform 根据时间表支持每个框架版本,以最大限度地减少安全漏洞。查看支持政策时间表,了解支持终止日期和可用性终止日期的影响。

可用容器映像

以下每个容器映像都可通过多个 Artifact Registry 代码库提供,这些代码库将数据存储在不同的位置。执行自定义训练时,您可以使用映像的任何 URI;每个 URI 都提供相同的容器映像。如果您使用 Google Cloud 控制台创建 Model 资源, Google Cloud 控制台会选择与您使用 Agent Platform 的位置最匹配的 URI,以减少延迟时间。

<0

TensorFlow

可用的 TensorFlow 容器映像(点击可展开)

机器学习框架版本 支持的加速器(以及 CUDA 版本,如适用) 补丁程序和支持日期结束 提供终止日期 支持的图片
2.15 仅 CPU 2026 年 7 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/tf2-cpu.2-15:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/tf2-cpu.2-15:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/tf2-cpu.2-15:latest
2.15 GPU (CUDA 12.x) 2026 年 7 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/tf2-gpu.2-15:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/tf2-gpu.2-15:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/tf2-gpu.2-15:latest
2.14 仅 CPU 2026 年 1 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/tf2-cpu.2-14:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/tf2-cpu.2-14:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/tf2-cpu.2-14:latest
2.14 GPU (CUDA 12.x) 2026 年 1 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/tf2-gpu.2-14:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/tf2-gpu.2-14:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/tf2-gpu.2-14:latest
2.13 仅 CPU 2024 年 11 月 28 日 2025 年 11 月 28 日
2.13 GPU (CUDA 12.x) 2024 年 11 月 28 日 2025 年 11 月 28 日
2.12 仅 CPU 2024 年 6 月 30 日 2025 年 6 月 30 日
2.12 GPU (CUDA 11.x) 2024 年 6 月 30 日 2025 年 6 月 30 日
2.11 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.11 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日
2.10 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.10 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日
2.9 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.9 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日
2.8 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.8 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日
2.7 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.7 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日
2.6 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.6 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日
2.5 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.5 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日
2.4 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.4 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日
2.3 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.3 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日
2.2 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.2 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日
2.1 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.1 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日
1.15 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
1.15 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日

优化的 TensorFlow 运行时

以下容器映像使用优化的 TensorFlow 运行时。如需了解详情,请参阅使用优化的 TensorFlow 运行时

可用的优化型 TensorFlow 运行时容器映像(点击可展开)

机器学习框架版本 支持的加速器(以及 CUDA 版本,如适用) 补丁程序和支持日期结束 提供终止日期 支持的图片
Nightly 仅 CPU 不适用 不适用
  • us-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-cpu.nightly:latest
  • europe-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-cpu.nightly:latest
  • asia-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-cpu.nightly:latest
Nightly GPU (CUDA 12.x) 不适用 不适用
  • us-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-gpu.nightly:latest
  • europe-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-gpu.nightly:latest
  • asia-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-gpu.nightly:latest
Nightly Cloud TPU 不适用 不适用
  • us-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-tpu.nightly:latest
  • europe-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-tpu.nightly:latest
  • asia-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-tpu.nightly:latest
2.17 仅 CPU 2024 年 7 月 11 日 2025 年 7 月 11 日
  • us-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-cpu.2-17:latest
  • europe-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-cpu.2-17:latest
  • asia-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-cpu.2-17:latest
2.17 GPU (CUDA 12.x) 2024 年 7 月 11 日 2025 年 7 月 11 日
  • us-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-gpu.2-17:latest
  • europe-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-gpu.2-17:latest
  • asia-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-gpu.2-17:latest
2.17 Cloud TPU 2024 年 7 月 11 日 2025 年 7 月 11 日
  • us-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-tpu.2-17:latest
  • europe-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-tpu.2-17:latest
  • asia-docker.pkg.dev/vertex-ai-restricted/prediction/tf_opt-tpu.2-17:latest
2.16 仅 CPU 2024 年 4 月 26 日 2025 年 4 月 26 日
2.16 GPU (CUDA 12.x) 2024 年 4 月 26 日 2025 年 4 月 26 日
2.16 Cloud TPU 2024 年 4 月 26 日 2025 年 4 月 26 日
2.15 仅 CPU 2024 年 8 月 15 日 2025 年 8 月 15 日
2.15 GPU (CUDA 12.x) 2024 年 8 月 15 日 2025 年 8 月 15 日
2.15 Cloud TPU 2024 年 8 月 15 日 2025 年 8 月 15 日
2.14 仅 CPU 2024 年 8 月 15 日 2025 年 8 月 15 日
2.14 GPU (CUDA 12.x) 2024 年 8 月 15 日 2025 年 8 月 15 日
2.13 仅 CPU 2024 年 8 月 15 日 2025 年 8 月 15 日
2.13 GPU (CUDA 11.x) 2024 年 8 月 15 日 2025 年 8 月 15 日
2.12 仅 CPU 2024 年 5 月 15 日 2025 年 5 月 15 日
2.12 GPU (CUDA 11.x) 2024 年 5 月 15 日 2025 年 5 月 15 日
2.11 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.11 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日
2.10 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.10 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日
2.9 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.9 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日
2.8 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
2.8 GPU (CUDA 11.x) 2023 年 11 月 15 日 2024 年 11 月 15 日

PyTorch

可用的 PyTorch 容器映像(点击可展开)

机器学习框架版本 支持的加速器(以及 CUDA 版本,如适用) 补丁程序和支持日期结束 提供终止日期 支持的图片
2.4 (Python 3.9) 仅 CPU 2026 年 7 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/pytorch-cpu.2-4:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/pytorch-cpu.2-4:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/pytorch-cpu.2-4:latest
2.4 (Python 3.9) GPU (CUDA 12.x) 2026 年 7 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/pytorch-gpu.2-4:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/pytorch-gpu.2-4:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/pytorch-gpu.2-4:latest
2.4 (Python 3.9) Cloud TPU 2026 年 7 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/pytorch-tpu.2-4:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/pytorch-tpu.2-4:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/pytorch-tpu.2-4:latest
2.3 (Python 3.9) 仅 CPU 2026 年 1 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/pytorch-cpu.2-3:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/pytorch-cpu.2-3:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/pytorch-cpu.2-3:latest
2.3 (Python 3.9) GPU (CUDA 12.x) 2026 年 1 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/pytorch-gpu.2-3:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/pytorch-gpu.2-3:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/pytorch-gpu.2-3:latest
2.3 (Python 3.9) Cloud TPU 2026 年 1 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/pytorch-tpu.2-3:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/pytorch-tpu.2-3:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/pytorch-tpu.2-3:latest
2.2 (Python 3.9) 仅 CPU 2026 年 1 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/pytorch-cpu.2-2:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/pytorch-cpu.2-2:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/pytorch-cpu.2-2:latest
2.2 (Python 3.9) GPU (CUDA 12.x) 2026 年 1 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/pytorch-gpu.2-2:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/pytorch-gpu.2-2:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/pytorch-gpu.2-2:latest
2.2 (Python 3.9) Cloud TPU 2026 年 1 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/pytorch-tpu.2-2:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/pytorch-tpu.2-2:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/pytorch-tpu.2-2:latest
2.1 (Python 3.9) 仅 CPU 2024 年 12 月 1 日 2025 年 12 月 1 日
2.1 (Python 3.9) GPU (CUDA 12.x) 2024 年 12 月 1 日 2025 年 12 月 1 日
2.1 (Python 3.9) Cloud TPU 2024 年 12 月 1 日 2025 年 12 月 1 日
2.0 (Python 3.9) 仅 CPU 2024 年 7 月 27 日 2025 年 7 月 27 日
2.0 (Python 3.9) GPU (CUDA 11.x) 2024 年 7 月 27 日 2025 年 7 月 27 日
1.13 (Python 3.8) 仅 CPU 2024 年 5 月 15 日 2025 年 5 月 15 日
1.13 (Python 3.8) GPU (CUDA 11.x) 2024 年 5 月 15 日 2025 年 5 月 15 日
1.12 仅 CPU 2024 年 5 月 15 日 2025 年 5 月 15 日
1.12 GPU (CUDA 11.x) 2024 年 5 月 15 日 2025 年 5 月 15 日
1.11 仅 CPU 2024 年 5 月 15 日 2025 年 5 月 15 日
1.11 GPU (CUDA 11.x) 2024 年 5 月 15 日 2025 年 5 月 15 日

scikit-learn

可用的 scikit-learn 容器映像(点击可展开)

机器学习框架版本 支持的加速器(以及 CUDA 版本,如适用) 补丁程序和支持日期结束 提供终止日期 支持的图片
1.6 (Python 3.10) 仅 CPU 2026 年 10 月 14 日 2027 年 10 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/sklearn-cpu.1-6:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/sklearn-cpu.1-6:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/sklearn-cpu.1-6:latest
1.5 (Python 3.10) 仅 CPU 2026 年 7 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/sklearn-cpu.1-5:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/sklearn-cpu.1-5:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/sklearn-cpu.1-5:latest
1.4 (Python 3.10) 仅 CPU 2026 年 1 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/sklearn-cpu.1-4:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/sklearn-cpu.1-4:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/sklearn-cpu.1-4:latest
1.3 (Python 3.10) 仅 CPU 2024 年 11 月 28 日 2025 年 11 月 28 日
1.2 (Python 3.10) 仅 CPU 2024 年 6 月 30 日 2025 年 6 月 30 日
1.0 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
0.24 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
0.23 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
0.22 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
0.20 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日

XGBoost

可用的 XGBoost 容器映像(点击可展开)

机器学习框架版本 支持的加速器(以及 CUDA 版本,如适用) 补丁程序和支持日期结束 提供终止日期 支持的图片
2.1 (Python 3.10) 仅 CPU 2026 年 7 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/xgboost-cpu.2-1:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/xgboost-cpu.2-1:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/xgboost-cpu.2-1:latest
2.0 (Python 3.10) 仅 CPU 2026 年 1 月 14 日 2027 年 1 月 14 日
  • us-docker.pkg.dev/vertex-ai/prediction/xgboost-cpu.2-0:latest
  • europe-docker.pkg.dev/vertex-ai/prediction/xgboost-cpu.2-0:latest
  • asia-docker.pkg.dev/vertex-ai/prediction/xgboost-cpu.2-0:latest
1.7 (Python 3.10) 仅 CPU 2024 年 6 月 30 日 2025 年 12 月 30 日
1.6 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
1.5 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
1.4 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
1.3 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
1.2 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
1.1 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
0.90 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日
0.82 仅 CPU 2023 年 11 月 15 日 2024 年 11 月 15 日

使用预构建容器

创建用于上传 Model 的自定义 TrainingPipeline 资源时,或者在将模型制品作为 Model 进行导入时,可以指定用于推理的预构建容器。

如需使用这些预构建容器之一,您必须将模型保存为符合预构建容器要求的一个或多个模型工件。如需了解详情,请参阅导出模型制品以进行推理

以下笔记本演示了如何使用预构建容器来执行推理。

您想要执行什么操作? 笔记本
使用预构建容器训练和提供 TensorFlow 模型 自定义训练和在线推理
使用预构建容器提供 PyTorch 模型 在 Agent Platform 上使用预构建容器提供 PyTorch 映像模型
使用预构建容器提供稳定的 Diffusion 模型 在 Agent Platform 上部署和托管 Stable Diffusion 模型

笔记本

后续步骤