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

feat: MPI operator installation code for distributed training use case #362

Merged
merged 3 commits into from
Nov 7, 2023
Merged
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
18 changes: 18 additions & 0 deletions ai-ml/trainium-inferentia/addons.tf
Original file line number Diff line number Diff line change
Expand Up @@ -499,3 +499,21 @@ resource "aws_launch_template" "trn1_lt" {
}
}
}

#---------------------------------------------------------------
# MPI Operator for distributed training on Trainium
#---------------------------------------------------------------
data "http" "mpi_operator_yaml" {
url = "https://raw.githubusercontent.com/kubeflow/mpi-operator/${var.mpi_operator_version}/deploy/v2beta1/mpi-operator.yaml"
}

data "kubectl_file_documents" "mpi_operator_yaml" {
content = data.http.mpi_operator_yaml.response_body
}

resource "kubectl_manifest" "mpi_operator" {
for_each = var.enable_mpi_operator ? data.kubectl_file_documents.mpi_operator_yaml.manifests : {}
yaml_body = each.value
depends_on = [module.eks.eks_cluster_id]
}

12 changes: 12 additions & 0 deletions ai-ml/trainium-inferentia/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,15 @@ variable "enable_amazon_prometheus" {
type = bool
default = true
}

variable "mpi_operator_version" {
description = "The version of the MPI Operator to install"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add type as string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vara-bonthu Thank you for the feedback. I added type as string in the variable

default = "v0.4.0"
type = string
}

variable "enable_mpi_operator" {
description = "Flag to enable the MPI Operator deployment"
type = bool
default = false
}
Loading