Skip to content

Gpu preflight check FE #4297

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 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/server/handlers/project_integration/preflight_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var recognizedPreflightCheckKeys = []string{
"cidrAvailability",
"iamPermissions",
"resourceProviders",
"gpu",
}

func (p *CreatePreflightCheckHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
Expand Down
32 changes: 32 additions & 0 deletions dashboard/src/lib/clusters/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,33 @@ const AWS_VCPUS_QUOTA_RESOLUTION: PreflightCheckResolution = {
],
};

const AWS_GPU_QUOTA_RESOLUTION: PreflightCheckResolution = {
title: "Requesting more GPU-type vCPUs",
subtitle:
"You will need to either request more GPU-type vCPUs or delete existing instances in order to provision in the region specified. You can request more GPU-type vCPUs by following these steps:",
steps: [
{
text: "Log into your AWS Account",
externalLink:
"https://console.aws.amazon.com/billing/home?region=us-east-1#/account",
},
{
text: "Navigate to the Amazon Elastic Compute Cloud (Amazon EC2) Service Quotas portal",
externalLink:
"https://us-east-1.console.aws.amazon.com/servicequotas/home/services/ec2/quotas",
},
{
text: 'Search for "Running On-Demand G and VT instances" in the search box and click on the search result.',
},
{
text: 'Click on "Request quota increase". In order to provision with Porter, you will need to request the specified number of vCPUs above your current quota limit.',
},
{
text: "Once that request is approved, return to Porter and retry the provision.",
},
],
};

const SUPPORTED_AWS_PREFLIGHT_CHECKS: PreflightCheck[] = [
{
name: "eip",
Expand All @@ -968,6 +995,11 @@ const SUPPORTED_AWS_PREFLIGHT_CHECKS: PreflightCheck[] = [
displayName: "vCPU availability",
resolution: AWS_VCPUS_QUOTA_RESOLUTION,
},
{
name: "gpu",
displayName: "GPU availability",
resolution: AWS_GPU_QUOTA_RESOLUTION,
},
];

const SUPPORTED_GCP_PREFLIGHT_CHECKS: PreflightCheck[] = [
Expand Down
1 change: 1 addition & 0 deletions dashboard/src/lib/clusters/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ const preflightCheckKeyValidator = z.enum([
"apiEnabled",
"cidrAvailability",
"iamPermissions",
"gpu",
]);
type PreflightCheckKey = z.infer<typeof preflightCheckKeyValidator>;
export const preflightCheckValidator = z.object({
Expand Down