将 Gemini 模型权重加载到 GDC 中

本页面将引导您了解如何在 Google Distributed Cloud (GDC) 气隙环境中将 Gemini 模型权重加载到组织的存储桶中。

加载模型后,您可以在 GDC 中使用 Gemini。如需了解详情,请参阅功能

准备工作

如需将 Gemini 模型权重加载到存储桶中,您必须满足以下条件:

  • 现有存储桶。
  • 必要的身份和访问权限角色。请让您的 Security Admin 为您授予以下角色:

    • Gemini Artifact Distributor (gemini-artifacts-distributor):拥有对 gemini-model-artifact-registry 资源的对象存储分区的读写权限。
    • Gemini Artifacts Cluster Viewer (gemini-artifacts-distributor-cluster-role):对集群命名空间中的对象存储分区具有读取权限。
  • 下载并转移 Gemini 模型权重。模型权重从 tar 文件中提取,并以目录的形式显示在 /root/release/arbitrary-artifacts/gemini 中。

将 Gemini 模型加载到存储桶

如需将 Gemini 模型权重加载到存储桶,请按以下步骤操作:

  1. 登录已下载并提取 Gemini 的组织。如需了解详情,请参阅下载和转移 Gemini 模型

    gdcloud config set core/organization_console_url
    https://console.GEMINI_ORG.zone1.google.gdch.test
    

    GEMINI_ORG 替换为贵组织的名称。

  2. 使用 gdcloud CLI 登录。

  3. 设置提取并下载的模型的路径:

    export GEMINI_ARTIFACTS=/root/release/arbitrary-artifacts/gemini
    
  4. 使用 gdcloud system arbitrary-artifacts load 命令将模型权重加载到存储桶:

    gdcloud system arbitrary-artifacts load $GEMINI_ARTIFACTS
    
  5. 通过列出存储桶的内容,验证存储桶是否包含模型权重:

    gdcloud storage ls –-recursive s3://BUCKET_FQDN
    

    BUCKET_FQDN 替换为存储桶的完全限定名称。

  6. 使用 load-oci 命令将包含模型的容器映像加载到容器注册表中:

    gdcloud system container-registry load-oci BUNDLE_SUB_FOLDER --create-release-metadata=false --skip-failover-registry
    

    BUNDLE_SUB_FOLDER 替换为容器映像的路径,例如 oci/

    Gemini 现已加载到 GDC 中。

后续步骤