Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use gcp service-account file to create a GPU instance #4

Open
godgunman opened this issue Oct 24, 2020 · 4 comments
Open

Use gcp service-account file to create a GPU instance #4

godgunman opened this issue Oct 24, 2020 · 4 comments

Comments

@godgunman
Copy link
Member

No description provided.

@gary9630
Copy link
Contributor

@godgunman 我查了一下,使用 gcloud compute 的指令,好像不能透過指定 credential 的方式來使用這個 API,必須要在 create VM 的時候就先設定好了,你可以幫我看看我有沒有搞錯這部分

https://stackoverflow.com/questions/35928534/403-request-had-insufficient-authentication-scopes-during-gcloud-container-clu/35932921

https://acloud.guru/forums/gcp-certified-associate-cloud-engineer/discussion/-Lh3ET0aNrv3FwNbNvh6/Insufficient%20Permission:%20Request%20had%20insufficient%20authentication%20scopes.

https://serverfault.com/questions/974012/how-to-start-an-instance-from-another-instance-in-the-same-project-gcp

只要一開始 VM 有開啟 compute engine API,就可以使用了,感覺不需要特別做什麼

@godgunman
Copy link
Member Author

我試過用 gcloud 可以直接開 gpu instance 所以應該是權限足夠的,正名一下好了,好像應該要叫做 service-account

$ gcloud compute instances create ggm-test \
>     --machine-type n1-standard-2 --zone asia-east1-a \
>     --accelerator type=nvidia-tesla-t4,count=1 \
>     --image-family pytorch-latest-gpu --image-project deeplearning-platform-release \
>     --maintenance-policy TERMINATE --restart-on-failure
Created [https://www.googleapis.com/compute/v1/projects/godgunman/zones/asia-east1-a/instances/ggm-test].
NAME      ZONE          MACHINE_TYPE   PREEMPTIBLE  INTERNAL_IP  EXTERNAL_IP   STATUS
ggm-test  asia-east1-a  n1-standard-2               10.140.0.2   a.b.c.d  RUNNING

@godgunman godgunman changed the title Use gcp credentials file to create a GPU instance Use gcp service-account file to create a GPU instance Dec 28, 2020
@gary9630
Copy link
Contributor

Done.

@gary9630
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants