Reference를 보고 구축된 Kubeflow Pipeline을 이용해 Tensor2Tensor 모델을 트레이닝하고 서빙하는 과정을 따라가 보았다. Kubeflow Pipeline을 이용해 ML 트레이닝을 진행하려면 GPU가 필요하다.(Reference: https://codelabs.developers.google.com/codelabs/cloud-kubeflow-pipelines-gis/index.html?index=..%2F..index#0)
GPU Node Pool을 생성하는 단계
message: "Insufficient quota to satisfy the request: Not all instances running in IGM after 17.643053934s. Expected 1, running 0, transitioning 1. Current errors: [GCE_QUOTA_EXCEEDED]: Instance 'gke-cluster-1-gpu-pool-485f2aac-3lc6' creation failed: Quota 'GPUS_ALL_REGIONS' exceeded. Limit: 0.0 globally.">] detail: "Insufficient quota to satisfy the request: Not all instances running in IGM after 17.643053934s. Expected 1, running 0, transitioning 1. Current errors: [GCE_QUOTA_EXCEEDED]: Instance 'gke-cluster-1-gpu-pool-485f2aac-3lc6' creation failed: Quota 'GPUS_ALL_REGIONS' exceeded. Limit: 0.0 globally." |
GPU nodel pool을 생성하는 단계에서 커멘드 실행시 위의 오류가 날 수 있다. 오류에서도 알 수 있듯이 부족한 quota 때문에 발생하는 문제이다. 이를 해결하기 위해서는 먼저 계정 변경이 필요하다.
Free tier 계정에서는 GPU를 사용할 수 없기 때문에 account를 유로 계정으로 변경시켜야 한다. 유료 계정으로 변환했다고 해서 리소스 사용에 대해 비용이 바로 청구되는 것이 아니라, Free tier에서 사용할 수 있는 만큼의 금액은 다 쓰고 난 후에 실제 비용 청구가 시작된다. 실제 비용이 청구되기 전에 알고 싶다면, alert를 설정해주면 된다.
그 후에 Default로 설정되어 있는 GPU 할당량 0을 늘려주어야 한다. GCP Console에 들어가보면, IAM 및 관리자 섹션에서 할당량을 선택한 후, GPUs (all regions)의 할당량 수정을 요청하면 몇 분 이내로 할당량을 늘렸다는 이메일이 온다.
'DevOps > Practices for MLOps' 카테고리의 다른 글
Kubernetes로 MNIST 데이터셋 훈련시키기 (0) | 2023.02.13 |
---|