简体   繁体   English

谷歌云平台:使用gpu监控时权限被拒绝

[英]Google cloud platform: permission denied when using gpu monitoring

I found no question regarding this issue.我没有发现关于这个问题的任何问题。 I'm trying to add a gpu monitoring to my vm instance, following the instructions here: https://cloud.google.com/compute/docs/gpus/monitor-gpus .我正在尝试按照此处的说明向我的 vm 实例添加 gpu 监控: https://cloud.google.com/compute/docs/gpus/monitor-gpus Yet when I tried to enable the gpu agent, I got this error: /lib/systemd/system/gpu_utilization_agent.service: Permission denied.然而,当我尝试启用 gpu 代理时,我收到此错误: /lib/systemd/system/gpu_utilization_agent.service: Permission denied.
Anyone has encountered this issue before or know how to resolve?有人遇到过这个问题或知道如何解决吗? What is really denying my access to what?什么是真正拒绝我访问什么?

It seems that you run these steps in cloud shell , it needs to run these steps on your VM s.您似乎在云 shell中运行这些步骤,它需要在您的 VM 上运行这些步骤。

You can try following this article created by Medium on "Enabling custom GPU metrics in Stackdriver for Google Cloud Platform" which might be a good place to look over for more details and Adding or removing GPUs document .您可以尝试阅读 Medium 创建的这篇关于“在 Stackdriver for Google Cloud Platform 中启用自定义 GPU 指标”的文章,这可能是查看更多详细信息和添加或删除 GPU 文档的好地方。

I got same problem and had solved.我遇到了同样的问题并且已经解决了。

You may check the permission of /lib/systemd/system/您可以检查 /lib/systemd/system/ 的权限

$ ls -ld /lib/systemd/system/
drwxr-xr-x 22 root root 36864 Nov  6 09:49 /lib/systemd/system/

So you need write permission temporarily.所以你暂时需要写权限。 Because you are going to write /lib/systemd/system/gpu_utilization_agent.service因为你要写 /lib/systemd/system/gpu_utilization_agent.service

sudo chmod 777 /lib/systemd/system

After writing gpu_utilization_agent.service, you can change back the permission.写完gpu_utilization_agent.service后,可以改回权限。

sudo chmod 755 /lib/systemd/system

And you may need sudo to run systemctl.你可能需要 sudo 来运行 systemctl。

sudo systemctl daemon-reload
sudo systemctl --no-reload --now enable /lib/systemd/system/gpu_utilization_agent.service

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM