Membuat instance notebook terkelola menggunakan Google Cloud konsol

Pelajari cara membuat instance notebook terkelola Vertex AI Workbench dan membuka JupyterLab menggunakan Google Cloud konsol. Halaman ini juga menjelaskan cara menghentikan, memulai, mereset, atau menghapus instance notebook terkelola.

Sebelum memulai

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  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 Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. 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 Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the API

  8. Membuat instance

    1. Di konsol Google Cloud , buka halaman Managed notebooks.

      Buka Managed notebooks

    2. Klik  Buat baru.

    3. Di jendela Create instance, di kolom Name, masukkan my-instance.

    4. Klik Create.

    Setelah menyelesaikan tugas yang dijelaskan dalam dokumen ini, Anda dapat menghindari penagihan berkelanjutan dengan menghapus resource yang Anda buat. Untuk mengetahui informasi selengkapnya, lihat Pembersihan.

    Buka JupyterLab

    Setelah Anda membuat instance, Vertex AI Workbench akan otomatis memulai instance tersebut. Saat instance siap digunakan, Vertex AI Workbench akan mengaktifkan link Open JupyterLab.

    1. Di samping nama instance notebook terkelola, klik Open JupyterLab.

    2. Pada dialog Authenticate your managed notebook, klik tombol untuk mendapatkan kode autentikasi.

    3. Pilih akun, lalu klik Allow. Salin kode autentikasi.

    4. Pada dialog Authenticate your Managed notebook, tempel kode autentikasi, lalu klik Authentication.

      Instance notebook terkelola Anda akan membuka JupyterLab.

    Membuka file notebook baru

    1. Pilih File > New > Notebook.

    2. Dalam dialog Select kernel, pilih Python, lalu klik Select.

      File notebook baru akan terbuka.

    Mengubah kernel

    Anda dapat mengubah kernel file notebook JupyterLab dari menu atau dalam file.

    1. Di JupyterLab, pada menu Kernel, klik Change kernel.

    2. Pada dialog Select kernel, pilih kernel lain untuk digunakan.

    3. Klik Select.

    Di dalam file

    1. Di file notebook JupyterLab Anda, klik nama kernel.

      Kernel saat ini.

    2. Pada dialog Select kernel, pilih kernel lain untuk digunakan.

    3. Klik Select.

    Menghentikan instance

    1. Di konsol Google Cloud , buka halaman Managed notebooks.

      Buka Managed notebooks

    2. Pilih instance yang ingin Anda hentikan.

    3. Klik  Stop.

    Memulai instance

    1. Di konsol Google Cloud , buka halaman Managed notebooks.

      Buka Managed notebooks

    2. Pilih instance yang ingin Anda mulai.

    3. Klik  Start.

    Mereset instance

    Mereset instance akan menghapus total isi memori instance Anda secara paksa dan mereset instance ke status awal. Untuk mempelajari lebih lanjut cara kerja mereset instance, lihat Mereset instance.

    1. Di konsol Google Cloud , buka halaman Managed notebooks.

      Buka Managed notebooks

    2. Pilih instance yang ingin Anda reset.

    3. Klik Reset, lalu klik Reset untuk mengonfirmasi.

    Pembersihan

    Agar akun Google Cloud Anda tidak dikenai biaya untuk resource yang digunakan pada halaman ini, ikuti langkah-langkah berikut.

    Jika Anda membuat project baru untuk mempelajari notebook terkelola Vertex AI Workbench dan Anda tidak lagi memerlukan project tersebut, hapus project tersebut.

    Jika Anda menggunakan project Google Cloud yang sudah ada, hapus resource yang Anda buat untuk menghindari timbulnya biaya pada akun Anda:

    1. Di konsol Google Cloud , buka halaman Managed notebooks.

      Buka Managed notebooks

    2. Pilih baris yang berisi instance yang ingin dihapus.

    3. Klik  Delete. (Bergantung pada ukuran jendela, tombol Delete mungkin ada di menu opsi  .)

    4. Untuk mengonfirmasi, klik Delete.

    Langkah berikutnya

    • Coba salah satu tutorial yang disertakan dalam instance notebook terkelola Anda yang baru. Di JupyterLab  File Browser, buka folder tutorials, dan buka salah satu file notebook.

      Folder tutorial di Browser File JupyterLab.

    • Baca Pengantar notebook terkelola.