יצירת גרסה ספציפית של מופע Agent Platform Workbench

בדף הזה מוסבר איך ליצור גרסה ספציפית של מכשיר עבודה בפלטפורמת הסוכנים של Gemini Enterprise.

למה כדאי ליצור גרסה ספציפית

כדי לוודא שבמופע של Agent Platform Workbench יש תוכנה שתואמת לקוד או לאפליקציה שלכם, כדאי ליצור גרסה ספציפית.

תמונות של מופעי Agent Platform Workbench מתעדכנות לעיתים קרובות, והגרסאות הספציפיות של תוכנות וחבילות שהותקנו מראש משתנות מגרסה לגרסה.

מידע נוסף על גרסאות ספציפיות של Agent Platform Workbench זמין בנתוני הגרסה של Agent Platform.

אחרי שיוצרים גרסה ספציפית של מופע Agent Platform Workbench, אפשר לשדרג אותה. שדרוג המופע מעדכן את התוכנה והחבילות שהותקנו מראש. מידע נוסף זמין במאמר שדרוג הסביבה של מופע.

לפני שמתחילים

  1. נכנסים לחשבון Google Cloud . אם אתם משתמשים חדשים ב- Google Cloud, צרו חשבון כדי שתוכלו להעריך את הביצועים של המוצרים שלנו בתרחישים מהעולם האמיתי. לקוחות חדשים מקבלים בחינם גם קרדיט בשווי 300$ להרצה, לבדיקה ולפריסה של עומסי העבודה.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Notebooks API.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the API

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Enable the Notebooks API.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the API

יצירת גרסה ספציפית

אפשר ליצור גרסה ספציפית של מופע Agent Platform Workbench באמצעות מסוף Google Cloud או Google Cloud CLI.

המסוף

כדי ליצור גרסה ספציפית של מופע Agent Platform Workbench:

  1. כשיוצרים מופע, בקטע סביבה, בוחרים באפשרות שימוש בגרסה קודמת.

  2. לוחצים על הרשימה Version (גרסה) ובוחרים גרסה. הגרסאות ממוספרות בפורמט M ואחריו מספר המהדורה, לדוגמה, M123.

  3. משלימים את שאר השדות בתיבת הדו-שיח ליצירת מכונה, ואז לוחצים על יצירה.

    הכלי Agent Platform Workbench יוצר מופע ומתחיל אותו באופן אוטומטי. כשהמופע מוכן לשימוש, מופעל קישור Open JupyterLab ב-Agent Platform Workbench.

gcloud

לפני השימוש בנתוני הפקודה הבאים, צריך להחליף את הנתונים הבאים:

  • INSTANCE_NAME: השם של מופע Agent Platform Workbench. השם צריך להתחיל באות, ואחריה יכולים להיות עד 62 אותיות קטנות, מספרים או מקפים (-). השם לא יכול להסתיים במקף.
  • PROJECT_ID: מזהה הפרויקט
  • LOCATION: האזור שבו רוצים למקם את המכונה
  • VM_IMAGE_NAME: שם התמונה. כדי לקבל רשימה של שמות התמונות הזמינים, משתמשים בפקודה get-config.
  • MACHINE_TYPE: סוג המכונה של מכונת ה-VM של המופע
  • METADATA: מטא-נתונים מותאמים אישית להחלה על המופע הזה. לדוגמה, כדי לציין סקריפט להפעלה אחרי האתחול, אפשר להשתמש בתג המטא-נתונים post-startup-script, בפורמט הבא: --metadata=post-startup-script=gs://BUCKET_NAME/hello.sh

מריצים את הפקודה הבאה:

‫Linux,‏ macOS או Cloud Shell

gcloud workbench instances create INSTANCE_NAME \
    --project=PROJECT_ID \
    --location=LOCATION \
    --vm-image-project="cloud-notebooks-managed" \
    --vm-image-name=VM_IMAGE_NAME \
    --machine-type=MACHINE_TYPE \
    --metadata=METADATA

‏Windows (PowerShell)

gcloud workbench instances create INSTANCE_NAME `
    --project=PROJECT_ID `
    --location=LOCATION `
    --vm-image-project="cloud-notebooks-managed" `
    --vm-image-name=VM_IMAGE_NAME `
    --machine-type=MACHINE_TYPE `
    --metadata=METADATA

Windows‏ (cmd.exe)

gcloud workbench instances create INSTANCE_NAME ^
    --project=PROJECT_ID ^
    --location=LOCATION ^
    --vm-image-project="cloud-notebooks-managed" ^
    --vm-image-name=VM_IMAGE_NAME ^
    --machine-type=MACHINE_TYPE ^
    --metadata=METADATA

מידע נוסף על הפקודה ליצירת מופע משורת הפקודה זמין במסמכי התיעוד של ה-CLI של gcloud.

הכלי Agent Platform Workbench יוצר מופע ומתחיל אותו באופן אוטומטי. כשהמופע מוכן לשימוש, קישור Open JupyterLab מופעל ב Google Cloud מסוף Agent Platform Workbench.

המאמרים הבאים