Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Crea un'istanza di notebook gestiti dall'utente con un container personalizzato
Puoi creare un'istanza di blocchi note gestiti dall'utente basata su un container personalizzato. L'utilizzo di un container personalizzato ti consente di personalizzare un ambiente di blocchi note gestiti dall'utente in base alle tue esigenze specifiche.
Il container deve essere accessibile al tuo
account di servizioGoogle Cloud ed esporre un servizio sulla porta 8080.
Ti consigliamo di creare un container derivato da un'immagine Deep Learning Containers, perché queste immagini sono già configurate per essere compatibili con i blocchi note gestiti dall'utente.
Come vengono aggiornati i kernel dei container personalizzati
Vertex AI Workbench estrae l'immagine container più recente per il kernel:
Quando crei l'istanza.
Quando esegui l'upgrade dell'istanza.
Quando avvii l'istanza.
Il kernel del container personalizzato non viene mantenuto quando l'istanza viene arrestata, quindi ogni volta che l'istanza viene avviata, Vertex AI Workbench recupera l'ultima versione dell'immagine container.
Se l'istanza è in esecuzione quando viene rilasciata una nuova versione di un container,
il kernel dell'istanza non viene aggiornato finché non la arresti e la riavvii.
Prima di iniziare
Prima di poter creare un'istanza di blocchi note gestiti dall'utente,
devi disporre di un
progettoGoogle Cloud e abilitare l'API Notebooks
per quel progetto.
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.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Se prevedi di utilizzare le GPU con l'istanza di notebook gestiti dall'utente, controlla la pagina Quote nella console Google Cloud per assicurarti di disporre di un numero sufficiente di GPU nel progetto. Se le GPU
non sono elencate nella pagina Quote o se hai bisogno di una quota di GPU aggiuntiva, puoi richiedere un aumento della quota. Consulta la sezione Richiesta di aumento della quota nella pagina Quote delle risorse di Compute Engine.
Ruoli obbligatori
Se hai creato il progetto, disponi del ruolo IAM Proprietario (roles/owner) per il progetto, che include tutte le autorizzazioni richieste. Salta questa sezione e
inizia a creare l'istanza di blocchi note gestiti dall'utente. Se non hai
creato tu il progetto, continua in questa sezione.
Per ottenere le autorizzazioni
necessarie per creare un'istanza di blocchi note gestiti dall'utente di Vertex AI Workbench,
chiedi all'amministratore di concederti i
seguenti ruoli IAM nel progetto:
Assicurati che il contenitore personalizzato sia pronto
Assicurati di avere un container personalizzato accessibile al tuo
service accountGoogle Cloud . Per informazioni su come creare un container personalizzato da un'immagine Deep Learning Containers, consulta Creazione di un container derivato.
Crea un'istanza con un container personalizzato
Per creare un'istanza di blocchi note gestiti dall'utente
con un container personalizzato, completa i seguenti passaggi:
Nella console Google Cloud , vai alla pagina Notebook gestiti dall'utente.
In alternativa, vai a notebook.new
(https://notebook.new) e salta il passaggio successivo.
Nella pagina Crea istanza,
nella sezione Dettagli,
fornisci le seguenti informazioni per la nuova istanza:
Nome: un nome per la nuova istanza
Regione e Zona: seleziona una regione e una zona per
la nuova istanza. Per ottenere le migliori prestazioni di rete,
seleziona la regione geograficamente più vicina a te.
Visualizza le posizioni dei blocchi note gestiti dall'utente
disponibili.
Nella sezione Ambiente, nel campo Ambiente,
seleziona Container personalizzato.
Nel campo Immagine container Docker, aggiungi un'immagine container Docker
in uno dei seguenti modi:
Inserisci un percorso dell'immagine container Docker. Ad esempio,
per utilizzare un'immagine container TensorFlow 2.12 con acceleratori di
Deep Learning Containers,
inserisci us-docker.pkg.dev/deeplearning-platform-release/gcr.io/tf-cpu.2-12.py310.
Fai clic su Seleziona per aggiungere un'immagine container Docker da
Artifact Registry. Poi, nella scheda Artifact Registry
in cui è archiviata l'immagine container, cambia il progetto
con quello che include l'immagine container e seleziona
l'immagine container.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[],[],null,["# Create a Vertex AI Workbench user-managed notebooks instance with a custom container\n\nCreate a user-managed notebooks instance with a custom container\n================================================================\n\n\n| Vertex AI Workbench user-managed notebooks is\n| [deprecated](/vertex-ai/docs/deprecations). On\n| April 14, 2025, support for\n| user-managed notebooks will end and the ability to create user-managed notebooks instances\n| will be removed. Existing instances will continue to function\n| but patches, updates, and upgrades won't be available. To continue using\n| Vertex AI Workbench, we recommend that you\n| [migrate\n| your user-managed notebooks instances to Vertex AI Workbench instances](/vertex-ai/docs/workbench/user-managed/migrate-to-instances).\n\n\u003cbr /\u003e\n\nYou can create a user-managed notebooks instance based on a custom\ncontainer. Using a custom container lets you customize a\nuser-managed notebooks environment for your specific needs.\nThe container must be accessible to your\nGoogle Cloud service account and expose a service on port 8080.\nWe recommend creating a container derived from a\n[Deep Learning Containers\nimage](/deep-learning-containers/docs/choosing-container#choose_a_container_image_type),\nbecause those images are already configured to be compatible\nwith user-managed notebooks.\n\nHow custom container kernels are updated\n----------------------------------------\n\nVertex AI Workbench pulls the latest container image for your kernel:\n\n- When you create your instance.\n\n- When you upgrade your instance.\n\n- When you start your instance.\n\nThe custom container kernel doesn't persist when your instance is stopped,\nso each time your instance is started, Vertex AI Workbench pulls\nthe latest version of the container image.\n\nIf your instance is running when a new version of a container is released,\nyour instance's kernel isn't updated until you stop and start your instance.\n\nBefore you begin\n----------------\n\nBefore you can create a user-managed notebooks instance, you must have a Google Cloud project and enable the Notebooks API for that project.\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Notebooks API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=notebooks.googleapis.com&redirect=https://console.cloud.google.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Notebooks API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=notebooks.googleapis.com&redirect=https://console.cloud.google.com)\n\n1. If you plan to use GPUs with your user-managed notebooks instance, [check the quotas page in the\n Google Cloud console](https://console.cloud.google.com/quotas) to ensure that you have enough GPUs available in your project. If GPUs are not listed on the quotas page, or you require additional GPU quota, you can request a quota increase. See [Requesting an increase in\n quota](/compute/quotas#requesting_additional_quota) on the Compute Engine [Resource quotas](/compute/quotas) page.\n\n\u003cbr /\u003e\n\n### Required roles\n\nIf you created the project, you have the\nOwner (`roles/owner`) IAM role on the project,\nwhich includes all required permissions. Skip this section and\nstart creating your user-managed notebooks instance. If you didn't\ncreate the project yourself, continue in this section.\n\n\nTo get the permissions that\nyou need to create a Vertex AI Workbench user-managed notebooks instance,\n\nask your administrator to grant you the\nfollowing IAM roles on the project:\n\n- Notebooks Admin ([`roles/notebooks.admin`](/vertex-ai/docs/workbench/user-managed/iam#notebooks.admin))\n- Service Account User ([`roles/iam.serviceAccountUser`](/iam/docs/understanding-roles#iam.serviceAccountUser))\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\n### Make sure your custom container is ready\n\nMake sure you have a custom container that is accessible to your\nGoogle Cloud service account. For information about how to create a\ncustom container from a\n[Deep Learning Containers image](/deep-learning-containers/docs/choosing-container#choose_a_container_image_type), see\n[Creating a derivative container](/deep-learning-containers/docs/derivative-container).\n\nCreate an instance with a custom container\n------------------------------------------\n\nTo create a user-managed notebooks instance\nwith a custom container, complete the following steps:\n\n1. In the Google Cloud console, go to the **User-managed notebooks** page.\n Or go to [notebook.new](https://notebook.new)\n (https://notebook.new) and skip the next step.\n\n [Go to User-managed notebooks](https://console.cloud.google.com/vertex-ai/workbench/user-managed)\n2. Click add_box **Create new**.\n\n3. Click **Advanced options**.\n\n4. On the **Create instance** page,\n in the **Details** section,\n provide the following information for your new instance:\n\n - **Name**: a name for your new instance\n - **Region** and **Zone** : Select a region and zone for the new instance. For best network performance, select the region that is geographically closest to you. See the available [user-managed notebooks\n locations](/vertex-ai/docs/general/locations#user-managed-notebooks-locations).\n5. In the **Environment** section, in the **Environment** field,\n select **Custom container**.\n\n6. In the **Docker container image** field, add a Docker container image\n in one of the following ways:\n\n - Enter a Docker container image path. For example, to use a TensorFlow 2.12 container image with accelerators from [Deep Learning Containers](/deep-learning-containers/docs/choosing-container#deciding), enter `us-docker.pkg.dev/deeplearning-platform-release/gcr.io/tf-cpu.2-12.py310`.\n - Click **Select** to add a Docker container image from Artifact Registry. Then on the **Artifact Registry** tab where your container image is stored, change the project to the project that includes your container image, and select your container image.\n7. Make the rest of your selections, or leave them on their default\n setting. For more information about these settings, see [Create a\n user-managed notebooks instance with specific properties](/vertex-ai/docs/workbench/user-managed/create-new#create-with-options).\n\n8. Click **Create**. Vertex AI Workbench creates\n a user-managed notebooks instance for you, based\n on your custom container.\n\nWhat's next\n-----------\n\n- Read about how to [push container images to\n Artifact Registry](/artifact-registry/docs/docker/pushing-and-pulling). If the container images you push to Artifact Registry are derived from a [Deep Learning Containers\n image](/deep-learning-containers/docs/choosing-container#choose_a_container_image_type), you can use these container images when creating user-managed notebooks instances.\n- Learn more about modifying your custom containers by reading [Best practices for writing\n Dockerfiles](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/)."]]