Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Créer une instance de notebooks gérés par l'utilisateur avec un conteneur personnalisé
Vous pouvez créer une instance de notebooks gérés par l'utilisateur basée sur un conteneur personnalisé. L'utilisation d'un conteneur personnalisé vous permet de configurer un environnement de notebooks gérés par l'utilisateur adapté à vos besoins.
Le conteneur doit être accessible à votre compte de service Google Cloud et offrir l'accès à un service via le port 8080.
Nous vous recommandons de créer un conteneur dérivé d'une image de conteneur de deep learning, car ces images sont déjà configurées pour être compatibles avec les notebooks gérés par l'utilisateur.
Mise à jour des kernels de conteneurs personnalisés
Vertex AI Workbench extrait la dernière image de conteneur pour votre kernel :
lors de la création d'une instance ;
lors de la mise à niveau d'une instance ;
lors du démarrage d'une instance.
Le kernel d'un conteneur personnalisé ne persiste pas lorsque votre instance est arrêtée. Par conséquent, chaque fois que votre instance est démarrée, Vertex AI Workbench extrait la dernière version de l'image de conteneur.
Si votre instance est en cours d'exécution lors de la publication d'une nouvelle version de conteneur, le kernel de votre instance n'est pas mis à jour tant que vous n'avez pas arrêté et démarré votre instance.
Avant de commencer
Avant de pouvoir créer une instance de notebooks gérés par l'utilisateur, vous devez disposer d'un projet Google Cloud et activer l'API Notebooks pour ce projet.
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.
Si vous prévoyez d'utiliser des GPU avec votre instance de notebooks gérés par l'utilisateur, consultez la page des quotas dans la console Google Cloud pour vous assurer que vous disposez de suffisamment de GPU dans votre projet. Si les GPU ne figurent pas sur la page "Quotas" ou que vous avez besoin d'un quota de GPU supplémentaire, demandez une augmentation de quota. Consultez la section Demander une augmentation de quota de la page Quotas de ressources Compute Engine.
Rôles requis
Si vous avez créé le projet, vous disposez du rôle IAM Propriétaire (roles/owner) sur le projet, qui inclut toutes les autorisations requises. Ignorez cette section et commencez à créer votre instance de notebooks gérés par l'utilisateur. Si vous n'avez pas créé le projet vous-même, continuez dans cette section.
Pour vous assurer que votre compte utilisateur dispose des autorisations nécessaires pour créer une instance de notebooks gérés par l'utilisateur Vertex AI Workbench, demandez à votre administrateur d'attribuer les rôles IAM suivants à votre compte utilisateur sur le projet :
Votre administrateur peut également attribuer à votre compte utilisateur les autorisations requises via des rôles personnalisés ou d'autres rôles prédéfinis.
Vérifier que votre conteneur personnalisé est prêt
Assurez-vous de disposer d'un conteneur personnalisé accessible à votre compte de service Google Cloud. Pour en savoir plus sur la création d'un conteneur personnalisé à partir d'une image de conteneur de deep learning, consultez la page Créer un conteneur dérivé.
Créer une instance avec un conteneur personnalisé
Pour créer une instance de notebooks gérés par l'utilisateur avec un conteneur personnalisé, procédez comme suit :
Dans Google Cloud Console, accédez à la page Notebooks gérés par l'utilisateur.
Vous pouvez également accéder à notebook.new (https://notebook.new) et ignorer l'étape suivante.
Dans la section Détails de la page Créer une instance, fournissez les informations suivantes pour la nouvelle instance :
Nom : nom de la nouvelle instance.
Région et Zone : sélectionnez une région et une zone pour la nouvelle instance. Pour obtenir les meilleures performances réseau, sélectionnez la région la plus proche de vous géographiquement.
Découvrez les emplacements de notebooks gérés par l'utilisateur disponibles.
Dans la section Environnement, dans le champ Environnement, sélectionnez Conteneur personnalisé.
Dans le champ Image de conteneur Docker, ajoutez une image de conteneur Docker de l'une des manières suivantes :
Saisissez un chemin d'accès d'image de conteneur Docker. Par exemple, pour utiliser une image de conteneur TensorFlow 2.12 avec des accélérateurs à partir de Conteneurs de deep learning, saisissez us-docker.pkg.dev/deeplearning-platform-release/gcr.io/tf-cpu.2-12.py310.
Cliquez sur Sélectionner pour ajouter une image de conteneur Docker à partir d'Artifact Registry. Dans l'onglet Artifact Registry dans lequel votre image de conteneur est stockée, remplacez le projet par le projet qui inclut votre image de conteneur, puis sélectionnez votre image de conteneur.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 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/)."]]