用於推論和說明的預先建構容器

Gemini Enterprise Agent Platform 提供 Docker 容器映像檔,可做為預先建構的容器執行,以便從訓練模型構件提供推論和說明。這些容器是依據機器學習 (ML) 架構和架構版本來分類,提供 HTTP 推論伺服器,您只要進行最少設定,就能使用這些伺服器提供推論。在許多情況下,使用預先建構的容器會比建立推論專用的自訂容器來得簡單。

本文列出推論和解釋適用的預先建構容器,並說明如何搭配使用 Agent Platform 自訂訓練功能建立的模型構件,或在 Agent Platform 外部建立的模型構件。

支援政策和時程

Gemini Enterprise Agent Platform 會根據排程支援各個框架版本,盡可能減少安全漏洞。請參閱支援政策時間表,瞭解終止支援和終止供應日期帶來的影響。

可用的容器映像檔

下列各容器映像檔皆可在多個 Artifact Registry 存放區中使用,這些存放區會將資料儲存在不同位置。執行自訂訓練時,您可以使用映像檔的任何 URI,每個 URI 都會提供相同的容器映像檔。如果您使用 Google Cloud 控制台建立Model資源, Google Cloud 控制台會選取最符合使用 Agent Platform 的位置的 URI,以減少延遲。

TensorFlow

可用的 TensorFlow 容器映像檔 (點選即可展開)

ML 架構版本 支援的加速器 (和 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 執行階段容器映像檔 (點選展開)

ML 架構版本 支援的加速器 (和 CUDA 版本,如適用) 修補程式和支援終止日期 終止供應 支援的圖片
每晚 僅限 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
每晚 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
每晚 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 容器映像檔 (點選即可展開)

ML 架構版本 支援的加速器 (和 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 容器映像檔 (點選即可展開)

ML 架構版本 支援的加速器 (和 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 容器映像檔 (點選即可展開)

ML 架構版本 支援的加速器 (和 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 日

使用預先建構的容器

建立自訂 TrainingPipeline 資源以上傳 Model,或匯入模型構件做為 Model 時,您可以指定預先建構的容器進行推論。

如要使用其中一個預先建構的容器,您必須將模型儲存為一或多個符合預先建構容器規定的模型構件。詳情請參閱「匯出模型構件以進行推論」。

下列筆記本示範如何使用預先建構的容器提供推論。

您要執行什麼操作? 筆記本
使用預先建構的容器訓練及提供 TensorFlow 模型 自訂訓練和線上推論
使用預先建構的容器提供 PyTorch 模型 在 Agent Platform 使用預建容器提供 PyTorch 圖片模型
使用預先建構的容器提供 Stable Diffusion 模型 在 Agent Platform 部署及託管 Stable Diffusion 模型

Notebooks

後續步驟