您可以访问您的实例在 Vertex AI Workbench 实例所属的项目中有权访问的任何 Cloud Storage 存储桶和文件。
准备工作
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.
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[],[],null,["# Access Cloud Storage buckets and files in JupyterLab in a Vertex AI Workbench instance.\n\nAccess Cloud Storage buckets and files in JupyterLab\n====================================================\n\nThis page shows you how to mount a Cloud Storage bucket to the\nJupyterLab interface of your Vertex AI Workbench instance so that you can\nbrowse files that are stored in Cloud Storage. You can also open\nand edit files that are compatible with JupyterLab, such as text files and\nnotebook (IPYNB) files.\n\nOverview\n--------\n\nVertex AI Workbench instances include a Cloud Storage integration\nthat lets you mount a Cloud Storage bucket. This means you can\nbrowse the contents of the bucket and work with compatible files from within\nthe JupyterLab interface.\n\nYou can access any of the Cloud Storage buckets and files that\nyour instance has access to within the same project as\nyour Vertex AI Workbench instance.\n| **Note:** Your Vertex AI Workbench instance's access to Cloud Storage is determined by the single user or service account that you used to grant access to your instance. For example, if you granted a specific service account access to your instance, you must also grant that service account access to the Cloud Storage buckets that you want to use in JupyterLab.\n\nBefore you begin\n----------------\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\n\u003cbr /\u003e\n\n### Required roles\n\n\nTo get the permissions that\nyou need to mount a Cloud Storage bucket to a Vertex AI Workbench instance,\n\nask your administrator to grant you the\nfollowing IAM roles on the project:\n\n- [Notebooks Runner](/iam/docs/roles-permissions/notebooks#notebooks.runner) (`roles/notebooks.runner`)\n- [Storage Object User](/iam/docs/roles-permissions/storage#storage.objectUser) (`roles/storage.objectUser`)\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### Required permission for enabling shared storage mounting\n\nTo enable shared storage mounting in your Vertex AI Workbench instance,\nask your administrator to grant your Vertex AI Workbench instance's\nservice account the `storage.buckets.list` permission on the project.\n\nThe `storage.buckets.list` permission is required for the\n**Mount shared storage** button to appear in the JupyterLab interface of your\nVertex AI Workbench instance.\n\nCreate a bucket and a Vertex AI Workbench instance\n--------------------------------------------------\n\nYou must have access to at least one Cloud Storage bucket in the same project as your Vertex AI Workbench instance.\n\n1. If you need to create a Cloud Storage bucket, see [Create a bucket](/storage/docs/creating-buckets).\n2. If you haven't already, [create a Vertex AI Workbench instance](/vertex-ai/docs/workbench/instances/create) in the same project as your Cloud Storage bucket.\n\nOpen JupyterLab\n---------------\n\n1. In the Google Cloud console, go to the **Instances** page.\n\n\n [Go to Instances](https://console.cloud.google.com/vertex-ai/workbench/instances)\n2. Next to your Vertex AI Workbench instance's name,\n click **Open JupyterLab**.\n\n Your Vertex AI Workbench instance opens JupyterLab.\n\nMount the Cloud Storage bucket\n------------------------------\n\nTo mount and then access a Cloud Storage bucket, do the following:\n\n1. In JupyterLab, make sure the\n folder **File Browser** tab\n is selected.\n\n2. In the left sidebar, click the\n **Mount\n shared storage** button. If you don't see the button, drag the right side\n of the sidebar to expand the sidebar until you see the button.\n\n\n3. In the **Bucket name** field, enter the Cloud Storage\n bucket name that you want to mount.\n\n4. Click **Mount**.\n\n5. Your Cloud Storage bucket appears as a folder in the\n **File browser** tab of the left sidebar. Double-click the folder\n to open it and browse the contents.\n\nTroubleshoot\n------------\n\nTo find methods for diagnosing and resolving issues with mounting a\nCloud Storage bucket to your instance, see [Troubleshooting\nVertex AI Workbench](/vertex-ai/docs/general/troubleshooting-workbench#instances).\n\nWhat's next\n-----------\n\n- Learn more about [Cloud Storage](/storage/docs/introduction).\n\n- Learn how to [query data in BigQuery\n from within JupyterLab](/vertex-ai/docs/workbench/instances/bigquery)."]]