Giter Site home page Giter Site logo

Comments (8)

powerkimhub avatar powerkimhub commented on July 20, 2024 1

@MZC-CSC @CliffSynn @hippo-an (cc: @seokho-son )


[Image 목록 관련]



[제안]

  • (1) 가급적 Image Project List를 API로 획득
  • (2) 부득이 Driver 내 List 유지시 목록 업데이트

from cb-spider.

powerkimhub avatar powerkimhub commented on July 20, 2024 1
  • 넵, 아마도 될거라 생각합니다.

from cb-spider.

hippo-an avatar hippo-an commented on July 20, 2024 1

안녕하세요. @powerkimhub

말씀하신 내용과 관련하여 image list 를 조회하기 위한 api 를 호출시 사용되는 image project id list 를 조회할 수 있는 api 를 찾아보았지만 찾지 못하였습니다.
지원하는 모든 image project id list 를 확인할 수 있는 문서도 찾지 못했습니다.
일단 Google Cloud Support 에 문의를 남겨두었습니다.

문의에 대한 답변이 오면 답변 남겨드리도록 하겠습니다.


드라이버 내 image project id list 를 업데이트를 하는 방식에 대해서 조사한 내용에 대해 공유드리겠습니다.

image project id 리스트업을 위한 레퍼런스는 다음과 같습니다.

  gcloud compute images list

다음 단계를 따라서 image project id 리스트를 추출했습니다.

  1. 각 레퍼런스에서 추출 가능한 image project id 를 리스트업
  2. 중복 제거 및 모든 리스트를 순회하여 gcloud command 호출
  3. 지원하지 않거나 에러를 발생하는 image project id 를 제거

참고로 호출한 gcloud command 는 다음과 같습니다.

    gcloud compute images list --project "${item}" --no-standard-images

추출된 image project id list 는 다음과 같습니다.

## 기존 spider list 에 존재하는 목록
gce-uefi-images

centos-cloud
cos-cloud
coreos-cloud
debian-cloud
rhel-cloud
rhel-sap-cloud
suse-cloud
suse-sap-cloud
ubuntu-os-cloud
windows-cloud
windows-sql-cloud

## 추가 가능한 항목
almalinux-cloud
cloud-hpc-image-public
deeplearning-platform-release
fedora-cloud
fedora-coreos-cloud
freebsd-org-cloud-dev
ml-images
opensuse-cloud
rocky-linux-cloud
ubuntu-os-pro-cloud
suse-byos-cloud

  • sdk를 이용한 호출이 아닌 gcloud command 를 이용해 호출하였기 때문에 코드 작업시 추가적인 테스트는 필요해보입니다.

from cb-spider.

seokho-son avatar seokho-son commented on July 20, 2024

GCP 콘솔에서는 해당 이미지를 활용한 VM 구동을 확인하였습니다.

from cb-spider.

powerkimhub avatar powerkimhub commented on July 20, 2024

@seokho-son


  • 해당 이미지는 Spider 현재 Image List로는 제공되고 있지 않지만(patch 예정),
  • 다음 조건에서 VM 생성은 가능합니다.
    • Server: 75f73c0 적용된 버전
    • Driver: #1185 이슈 해결 전까지는 VM의 Security Group 정보에 deeplearning-vm이 잘못 포함되어 제공
    • 세부 내용 아래 참고

[Image Name 형식]

  • GetImage 호출 시 Spider가 Image List로 제공하는 url 형식의 name을 사용해야 합니다.
    • image

  • 해당 이미지 정보 호출 예시

    curl -sX GET http://localhost:1024/spider/vmimage/https://www.googleapis.com/compute/v1/projects/deeplearning-platform-release/global/images/tf-2-15-cu121-v20240417-debian-11 -H 'Content-Type: application/json' -d '{"ConnectionName": "gcp-iowa-config"}' |json_pp
    
    {
       "GuestOS" : "tf-2-15-cu121-debian-11",
       "IId" : {
          "NameId" : "https://www.googleapis.com/compute/v1/projects/deeplearning-platform-release/global/images/tf-2-15-cu121-v20240417-debian-11",
          "SystemId" : "https://www.googleapis.com/compute/v1/projects/deeplearning-platform-release/global/images/tf-2-15-cu121-v20240417-debian-11"
       },
       "KeyValueList" : [
          {
             "Key" : "Name",
             "Value" : "tf-2-15-cu121-v20240417-debian-11"
          },
          {
             "Key" : "SourceImage",
             "Value" : ""
          },
          {
             "Key" : "SourceType",
             "Value" : "RAW"
          },
          {
             "Key" : "SelfLink",
             "Value" : "https://www.googleapis.com/compute/v1/projects/deeplearning-platform-release/global/images/tf-2-15-cu121-v20240417-debian-11"
          },
          {
             "Key" : "Family",
             "Value" : "tf-2-15-cu121-debian-11"
          },
          {
             "Key" : "DiskSizeGb",
             "Value" : "50"
          }
       ],
       "Status" : "READY"
    }
    

  • 해당 이미지로 VM 생성 예시

  curl -sX POST http://localhost:1024/spider/vm -H 'Content-Type: application/json' -d '{
    "ConnectionName": "gcp-iowa-config",
    "ReqInfo": {
      "Name": "deeplearning-vm-test",
      "ImageType": "PublicImage",
      "ImageName": "https://www.googleapis.com/compute/v1/projects/deeplearning-platform-release/global/images/tf-2-15-cu121-v20240417-debian-11",
      "VMSpecName": "a2-highgpu-1g",
      "VPCName": "vpc-01",
      "SubnetName": "subnet-01",
      "SecurityGroupNames": ["sg-01"],
      "RootDiskType": "default",
      "DataDiskNames": [],
      "KeyPairName": "keypair-01",
      "VMUserId": "Administrator",
      "VMUserPasswd": "cloudbarista123^"
    }
  }'

from cb-spider.

seokho-son avatar seokho-son commented on July 20, 2024

@powerkimhub 확인 감사합니다.

https://www.googleapis.com/compute/v1/projects/deeplearning-platform-release/global/images/tf-2-15-cu121-v20240417-debian-11

https://www.googleapis.com/compute/v1/projects/deeplearning-platform-release/global/images/ 는 임의로 찾아서 붙여넣기 하면 되는 상황일까요? (tf-2-15-cu121-v20240417-debian-11 이미지 말고도 테스트해봐야 할 이미지가 더 있습니다.)

from cb-spider.

powerkimhub avatar powerkimhub commented on July 20, 2024

@hippo-an

  • 분석 및 현황 공유 감사드립니다.
  • 일단, Image List에 추가 가능한 항목 반영 부탁 드립니다.
  • 관련하여, 다음 3가지 API 점검 부탁 드립니다.
      ListImage() ([]*ImageInfo, error)
      GetImage(imageIID IID) (ImageInfo, error)
      CheckWindowsImage(imageIID IID) (bool, error)
    
  • 추가로, driver image list code 관련 부분에 현재 issue 링크 남겨 주시기 바랍니다.

from cb-spider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.