I am working on a machine learning project and I just set up a google cloud account.
我正在开发一个机器学习项目,我只是设置了一个谷歌云帐户。
I have a VM instance up and running and Jupyter is working. I placed a couple of file folders on Google Cloud Storage assuming I could connect it to my VM and use the files in a Jupyter notebook running Python 3.
我有一个VM实例启动并运行,Jupyter正在工作。假设我可以将其连接到我的VM并使用运行Python 3的Jupyter笔记本中的文件,我在Google云端存储上放置了几个文件夹。
I have not been able to find a way to access the files in storage from my virtual machine. Someone help please!?
我无法找到从虚拟机访问存储中文件的方法。有人请帮忙!?
1 个解决方案
#1
0
To access cloud storage from a VM, it needs the VM to have been created with the API access. When you initially create the VM, there are a number of options available under the cloud API scope section. Select the storage permission to give your VM access to cloud storage.
要从VM访问云存储,需要使用API访问创建VM。最初创建VM时,云API范围部分下有许多可用选项。选择存储权限以使VM访问云存储。
Now the VM has access to storage, you can use the gsutil command to access information directly from the cloud storage bucket using the name of the storage bucket.
现在VM可以访问存储,您可以使用gsutil命令使用存储桶的名称直接从云存储桶访问信息。
You will also be able to extend the access of the storage bucket to colleagues should you wish by doing the above. Access permissions for the project can be controlled via IAM section of google cloud.
如果您愿意,您还可以通过执行上述操作将存储桶的访问权限扩展到同事。可以通过Google云端的IAM部分控制项目的访问权限。
#1
0
To access cloud storage from a VM, it needs the VM to have been created with the API access. When you initially create the VM, there are a number of options available under the cloud API scope section. Select the storage permission to give your VM access to cloud storage.
要从VM访问云存储,需要使用API访问创建VM。最初创建VM时,云API范围部分下有许多可用选项。选择存储权限以使VM访问云存储。
Now the VM has access to storage, you can use the gsutil command to access information directly from the cloud storage bucket using the name of the storage bucket.
现在VM可以访问存储,您可以使用gsutil命令使用存储桶的名称直接从云存储桶访问信息。
You will also be able to extend the access of the storage bucket to colleagues should you wish by doing the above. Access permissions for the project can be controlled via IAM section of google cloud.
如果您愿意,您还可以通过执行上述操作将存储桶的访问权限扩展到同事。可以通过Google云端的IAM部分控制项目的访问权限。