runpodctl icon indicating copy to clipboard operation
runpodctl copied to clipboard

feat: Create spot pod by adding bidPerGpu argument

Open raghuveer-s opened this issue 9 months ago • 2 comments

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 avatar Mar 22 '25 17:03 raghuveer-s

Related issue: https://github.com/runpod/runpodctl/issues/11

raghuveer-s avatar Mar 22 '25 17:03 raghuveer-s

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.

justinwlin avatar Jun 27 '25 17:06 justinwlin