Skip to content

feat: Create spot pod by adding bidPerGpu argument #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

raghuveer-s
Copy link

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
Author

Related issue: #11

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.

1 participant