Skip to content

feat: Create spot pod by adding bidPerGpu argument#186

Closed
raghuveer-s wants to merge 1 commit intorunpod:mainfrom
raghuveer-s:feat-create-spot-pod
Closed

feat: Create spot pod by adding bidPerGpu argument#186
raghuveer-s wants to merge 1 commit intorunpod:mainfrom
raghuveer-s:feat-create-spot-pod

Conversation

@raghuveer-s
Copy link
Copy Markdown

Create Spot Pod

The create command can only create on-demand pods at the moment since it uses podFindAndDeployOnDemand in the GraphQL API underneath. If we want to create spot pods, we need to use the podRentInterruptable mutation which needs the bidPerGpu field as part of its input.

How I tested it

Manually tested and verified with the RunPod dashboard as well.
There are a few cases to watch for:

  • If bidPerGpu flag does not exist, then use the on-demand pod creation flow.
  • If bidPerGpu flag exists and it is <= 0, then return an error.
  • If bidPerGpu flag exists and it is > 0, then attempt to create a spot pod using the GraphQL API.

@raghuveer-s
Copy link
Copy Markdown
Author

Related issue: #11

@justinwlin
Copy link
Copy Markdown
Contributor

Thanks! Sorry for getting back after so long, Im currently in the process to own this repository and help get things moved in. Ill be looking deeper into this coming week or so, to see what I can do to get this merged in.

@TimPietruskyRunPod
Copy link
Copy Markdown
Member

Closing — this PR adds spot pod support to the old legacy create pod command (cmd/pod/createPod.go), which is deprecated in v2.0.0. The new pod create command (cmd/pod/create.go) needs its own implementation. Created #236 to track adding --bid-per-gpu to the new CLI. Thanks for the contribution — the approach in this PR is a useful reference!

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

Successfully merging this pull request may close these issues.

3 participants