feat: Create spot pod by adding bidPerGpu argument
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.
Related issue: https://github.com/runpod/runpodctl/issues/11
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.