Skip to content
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

Updating NIMService CRD for multinode inferencing #188

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
21 changes: 18 additions & 3 deletions api/apps/v1alpha1/nimservice_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ const (
NIMServiceStatusFailed = "Failed"
)

// MultiNodeSpec defines the parameters to render a multi-node NIMService deployment.
type MultiNodeSpec struct {
ClusterStartTimeout int `json:"clusterStartTimeout,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
Workers int `json:"workers,omitempty"`
GpusPerNode int `json:"gpusPerNode,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the leaderworkerset, does the customer specify the # of GPUs needed for each worker / leader? If the customer specifies that value, GpusPerNode field would become redundant;

Or, do we assume that each worker would take the whole node and would fill GpusPernode to the worker template?

LeaderWorkerSet LeaderWorkerSet `json:"leaderWorkerSet,omitempty"`
}

// LeaderWorkerSet defines the details of leader-worker set CRD for the NIMService deployment.
type LeaderWorkerSet struct {
Enabled *bool `json:"enabled,omitempty"`
}

// NIMServiceSpec defines the desired state of NIMService
type NIMServiceSpec struct {
Image Image `json:"image,omitempty"`
Expand All @@ -75,9 +89,10 @@ type NIMServiceSpec struct {
Metrics Metrics `json:"metrics,omitempty"`
// +kubebuilder:validation:Minimum=1
// +kubebuilder:default:=1
Replicas int `json:"replicas,omitempty"`
UserID *int64 `json:"userID,omitempty"`
GroupID *int64 `json:"groupID,omitempty"`
Replicas int `json:"replicas,omitempty"`
UserID *int64 `json:"userID,omitempty"`
GroupID *int64 `json:"groupID,omitempty"`
MultiNode MultiNodeSpec `json:"multiNode,omitempty"`
}

// NIMCacheVolSpec defines the spec to use NIMCache volume
Expand Down
42 changes: 42 additions & 0 deletions api/apps/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions bundle/manifests/apps.nvidia.com_nimpipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,26 @@ spec:
type: string
type: object
type: object
multiNode:
description: MultiNodeSpec defines the parameters to render
a multi-node NIMService deployment.
properties:
clusterStartTimeout:
type: integer
enabled:
type: boolean
gpusPerNode:
type: integer
leaderWorkerSet:
description: LeaderWorkerSet defines the details of
leader-worker set CRD for the NIMService deployment.
properties:
enabled:
type: boolean
type: object
workers:
type: integer
type: object
nodeSelector:
additionalProperties:
type: string
Expand Down
20 changes: 20 additions & 0 deletions bundle/manifests/apps.nvidia.com_nimservices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,26 @@ spec:
type: string
type: object
type: object
multiNode:
description: MultiNodeSpec defines the parameters to render a multi-node
NIMService deployment.
properties:
clusterStartTimeout:
type: integer
enabled:
type: boolean
gpusPerNode:
type: integer
leaderWorkerSet:
description: LeaderWorkerSet defines the details of leader-worker
set CRD for the NIMService deployment.
properties:
enabled:
type: boolean
type: object
workers:
type: integer
type: object
nodeSelector:
additionalProperties:
type: string
Expand Down
20 changes: 20 additions & 0 deletions config/crd/bases/apps.nvidia.com_nimpipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,26 @@ spec:
type: string
type: object
type: object
multiNode:
description: MultiNodeSpec defines the parameters to render
a multi-node NIMService deployment.
properties:
clusterStartTimeout:
type: integer
enabled:
type: boolean
gpusPerNode:
type: integer
leaderWorkerSet:
description: LeaderWorkerSet defines the details of
leader-worker set CRD for the NIMService deployment.
properties:
enabled:
type: boolean
type: object
workers:
type: integer
type: object
nodeSelector:
additionalProperties:
type: string
Expand Down
20 changes: 20 additions & 0 deletions config/crd/bases/apps.nvidia.com_nimservices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,26 @@ spec:
type: string
type: object
type: object
multiNode:
description: MultiNodeSpec defines the parameters to render a multi-node
NIMService deployment.
properties:
clusterStartTimeout:
type: integer
enabled:
type: boolean
gpusPerNode:
type: integer
leaderWorkerSet:
description: LeaderWorkerSet defines the details of leader-worker
set CRD for the NIMService deployment.
properties:
enabled:
type: boolean
type: object
workers:
type: integer
type: object
nodeSelector:
additionalProperties:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,26 @@ spec:
type: string
type: object
type: object
multiNode:
description: MultiNodeSpec defines the parameters to render
a multi-node NIMService deployment.
properties:
clusterStartTimeout:
type: integer
enabled:
type: boolean
gpusPerNode:
type: integer
leaderWorkerSet:
description: LeaderWorkerSet defines the details of
leader-worker set CRD for the NIMService deployment.
properties:
enabled:
type: boolean
type: object
workers:
type: integer
type: object
nodeSelector:
additionalProperties:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,26 @@ spec:
type: string
type: object
type: object
multiNode:
description: MultiNodeSpec defines the parameters to render a multi-node
NIMService deployment.
properties:
clusterStartTimeout:
type: integer
enabled:
type: boolean
gpusPerNode:
type: integer
leaderWorkerSet:
description: LeaderWorkerSet defines the details of leader-worker
set CRD for the NIMService deployment.
properties:
enabled:
type: boolean
type: object
workers:
type: integer
type: object
nodeSelector:
additionalProperties:
type: string
Expand Down