diff --git a/docs/book/stacks/aws.md b/docs/book/stacks/aws.md index 8088527d..999dd614 100644 --- a/docs/book/stacks/aws.md +++ b/docs/book/stacks/aws.md @@ -16,7 +16,7 @@ as can a list of components that are coming soon. | Experiment Tracker | mlflow | | Orchestrator | kubeflow, kubernetes, sagemaker, skypilot, tekton | | MLOps Platform | zenml | -| Model Deployer | seldon | +| Model Deployer | seldon, huggingface | | Step Operator | sagemaker | ## Coming Soon! diff --git a/docs/book/stacks/gcp.md b/docs/book/stacks/gcp.md index 396032e6..4b6d7269 100644 --- a/docs/book/stacks/gcp.md +++ b/docs/book/stacks/gcp.md @@ -22,7 +22,7 @@ and cannot be created without one. | Experiment Tracker | mlflow | | Orchestrator | kubeflow, kubernetes, skypilot, tekton, vertex | | MLOps Platform | zenml | -| Model Deployer | seldon | +| Model Deployer | seldon, huggingface | | Step Operator | vertex | ## Coming Soon! diff --git a/docs/book/stacks/k3d.md b/docs/book/stacks/k3d.md index e05032d5..d2753baa 100644 --- a/docs/book/stacks/k3d.md +++ b/docs/book/stacks/k3d.md @@ -16,7 +16,7 @@ as can a list of components that are coming soon. | Experiment Tracker | mlflow | | Orchestrator | kubeflow, kubernetes, sagemaker, tekton | | MLOps Platform | zenml | -| Model Deployer | seldon | +| Model Deployer | seldon, huggingface | ## Coming Soon! diff --git a/src/mlstacks/constants.py b/src/mlstacks/constants.py index 3b88745b..ea97da03 100644 --- a/src/mlstacks/constants.py +++ b/src/mlstacks/constants.py @@ -38,7 +38,7 @@ "vertex", ], "mlops_platform": ["zenml"], - "model_deployer": ["seldon"], + "model_deployer": ["seldon", "huggingface"], "step_operator": ["sagemaker", "vertex"], } ALLOWED_COMPONENT_TYPES: Dict[str, Dict[str, List[str]]] = { diff --git a/src/mlstacks/enums.py b/src/mlstacks/enums.py index 122e2806..feb32b12 100644 --- a/src/mlstacks/enums.py +++ b/src/mlstacks/enums.py @@ -38,6 +38,7 @@ class ComponentFlavorEnum(str, Enum): AWS = "aws" GCP = "gcp" + HUGGINGFACE = "huggingface" KUBEFLOW = "kubeflow" KUBERNETES = "kubernetes" MINIO = "minio" diff --git a/src/mlstacks/terraform/aws-modular/eks.tf b/src/mlstacks/terraform/aws-modular/eks.tf index e1d4f79f..7be43342 100644 --- a/src/mlstacks/terraform/aws-modular/eks.tf +++ b/src/mlstacks/terraform/aws-modular/eks.tf @@ -266,4 +266,4 @@ data "external" "get_cluster_auth" { depends_on = [ aws_eks_cluster.cluster ] -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/aws-modular/istio.tf b/src/mlstacks/terraform/aws-modular/istio.tf index ca4f68e2..7e30f9fd 100644 --- a/src/mlstacks/terraform/aws-modular/istio.tf +++ b/src/mlstacks/terraform/aws-modular/istio.tf @@ -9,4 +9,4 @@ module "istio" { ] chart_version = local.istio.version -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/aws-modular/locals.tf b/src/mlstacks/terraform/aws-modular/locals.tf index fffb02a9..4273001a 100644 --- a/src/mlstacks/terraform/aws-modular/locals.tf +++ b/src/mlstacks/terraform/aws-modular/locals.tf @@ -64,7 +64,7 @@ locals { namespace = "seldon-system" workloads_namespace = "zenml-workloads-seldon" service_account_name = "seldon" - } + } zenml = { version = "" diff --git a/src/mlstacks/terraform/aws-modular/output_file.tf b/src/mlstacks/terraform/aws-modular/output_file.tf index 3106ef00..c123ec07 100644 --- a/src/mlstacks/terraform/aws-modular/output_file.tf +++ b/src/mlstacks/terraform/aws-modular/output_file.tf @@ -76,6 +76,13 @@ resource "local_file" "stack_file" { flavor: seldon name: eks_seldon_model_deployer configuration: {"kubernetes_context": "${aws_eks_cluster.cluster[0].arn}", "kubernetes_namespace": "${local.seldon.workloads_namespace}", "base_url": "http://${module.istio[0].ingress-hostname}:${module.istio[0].ingress-port}"}} +%{endif} +%{if var.enable_model_deployer_huggingface} + model_deployer: + id: ${uuid()} + flavor: huggingface + name: eks_huggingface_model_deployer + configuration: {"kubernetes_context": "${aws_eks_cluster.cluster[0].arn}", "kubernetes_namespace": "${local.huggingface.workloads_namespace}", "base_url": "http://${module.istio[0].ingress-hostname}:${module.istio[0].ingress-port}"}} %{endif} ADD filename = "./aws_modular_stack_${replace(substr(timestamp(), 0, 16), ":", "_")}.yaml" diff --git a/src/mlstacks/terraform/aws-modular/outputs.tf b/src/mlstacks/terraform/aws-modular/outputs.tf index b2771fb9..60871a58 100644 --- a/src/mlstacks/terraform/aws-modular/outputs.tf +++ b/src/mlstacks/terraform/aws-modular/outputs.tf @@ -84,24 +84,6 @@ output "experiment_tracker_configuration" { }) : "" } -# if seldon is enabled, set the model deployer outputs to the seldon values -# otherwise, set the model deployer outputs to empty strings -output "model_deployer_id" { - value = var.enable_model_deployer_seldon ? uuid() : "" -} -output "model_deployer_flavor" { - value = var.enable_model_deployer_seldon ? "seldon" : "" -} -output "model_deployer_name" { - value = var.enable_model_deployer_seldon ? "eks_seldon_model_deployer_${random_string.unique.result}" : "" -} -output "model_deployer_configuration" { - value = var.enable_model_deployer_seldon ? jsonencode({ - kubernetes_context = "${aws_eks_cluster.cluster[0].arn}" - kubernetes_namespace = local.seldon.workloads_namespace - base_url = "http://${module.istio[0].ingress-hostname}:${module.istio[0].ingress-port}" - }) : "" -} # if sagemaker is enabled as step operator, set the step operator outputs to the sagemaker values # otherwise, set the step operator outputs to empty strings @@ -162,6 +144,16 @@ output "seldon-base-url" { value = var.enable_model_deployer_seldon ? "http://${module.istio[0].ingress-hostname}:${module.istio[0].ingress-port}" : null } +# output for huggingface model deployer +output "huggingface-workload-namespace" { + value = var.enable_model_deployer_huggingface ? local.huggingface.workloads_namespace : null + description = "The namespace created for hosting your Huggingface workloads" +} + +output "huggingface-base-url" { + value = var.enable_model_deployer_huggingface ? "http://${module.istio[0].ingress-hostname}:${module.istio[0].ingress-port}" : null +} + # output the name of the stack YAML file created output "stack-yaml-path" { value = local_file.stack_file.filename diff --git a/src/mlstacks/terraform/aws-modular/variables.tf b/src/mlstacks/terraform/aws-modular/variables.tf index 0bcf927f..6f45afb1 100644 --- a/src/mlstacks/terraform/aws-modular/variables.tf +++ b/src/mlstacks/terraform/aws-modular/variables.tf @@ -35,6 +35,10 @@ variable "enable_model_deployer_seldon" { description = "Enable Seldon deployment" default = false } +variable "enable_model_deployer_huggingface" { + description = "Enable Huggingface deployment" + default = false +} variable "enable_step_operator_sagemaker" { description = "Enable SageMaker as step operator" default = false @@ -57,6 +61,17 @@ variable "region" { default = "eu-west-1" } +# variables for huggingface model model deployer +variable "huggingface_token"{ + description = "The Hugging Face authentication token." + default = "huggingfaceauthenticationtoken" +} + +variable "huggingface_namespace" { + description = "The namespace where the Inference Endpoint will be created." + default = "huggingfacenamespace" +} cb cb + # variables for the MLflow tracking server variable "mlflow-artifact-S3-access-key" { description = "Your AWS access key for using S3 as MLflow artifact store" diff --git a/src/mlstacks/terraform/gcp-modular/gke.tf b/src/mlstacks/terraform/gcp-modular/gke.tf index 64380b13..530eb552 100644 --- a/src/mlstacks/terraform/gcp-modular/gke.tf +++ b/src/mlstacks/terraform/gcp-modular/gke.tf @@ -180,4 +180,4 @@ resource "google_project_iam_binding" "vertex-ai-user" { members = [ "serviceAccount:${google_service_account.gke-service-account[0].email}", ] -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/gcp-modular/istio.tf b/src/mlstacks/terraform/gcp-modular/istio.tf index e287721f..62f13b2a 100644 --- a/src/mlstacks/terraform/gcp-modular/istio.tf +++ b/src/mlstacks/terraform/gcp-modular/istio.tf @@ -9,4 +9,4 @@ module "istio" { ] chart_version = local.istio.version -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/gcp-modular/kubernetes.tf b/src/mlstacks/terraform/gcp-modular/kubernetes.tf index e0b68f21..e914e820 100644 --- a/src/mlstacks/terraform/gcp-modular/kubernetes.tf +++ b/src/mlstacks/terraform/gcp-modular/kubernetes.tf @@ -52,4 +52,4 @@ resource "google_service_account_iam_member" "k8s-workload-access" { depends_on = [ kubernetes_namespace.k8s-workloads, ] -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/gcp-modular/locals.tf b/src/mlstacks/terraform/gcp-modular/locals.tf index 49bc362f..3de40f8b 100644 --- a/src/mlstacks/terraform/gcp-modular/locals.tf +++ b/src/mlstacks/terraform/gcp-modular/locals.tf @@ -75,7 +75,7 @@ locals { workloads_namespace = "zenml-workloads-seldon" service_account_name = "seldon" } - + zenml = { version = "" database_ssl_ca = "" diff --git a/src/mlstacks/terraform/gcp-modular/output_file.tf b/src/mlstacks/terraform/gcp-modular/output_file.tf index 3dd4256a..7ca13196 100644 --- a/src/mlstacks/terraform/gcp-modular/output_file.tf +++ b/src/mlstacks/terraform/gcp-modular/output_file.tf @@ -91,6 +91,13 @@ resource "local_file" "stack_file" { flavor: seldon name: gke_seldon configuration: {"kubernetes_context": "gke_${local.prefix}-${local.gke.cluster_name}", "kubernetes_namespace": "${local.seldon.workloads_namespace}", "base_url": "http://${module.istio[0].ingress-ip-address}:${module.istio[0].ingress-port}"} +%{endif} +%{if var.enable_model_deployer_huggingface} + model_deployer: + id: ${uuid()} + flavor: huggingface + name: eks_huggingface_model_deployer + configuration: {"kubernetes_context": "${aws_eks_cluster.cluster[0].arn}", "kubernetes_namespace": "${local.huggingface.workloads_namespace}", "base_url": "http://${module.istio[0].ingress-hostname}:${module.istio[0].ingress-port}"}} %{endif} ADD filename = "./gcp_modular_stack_${replace(substr(timestamp(), 0, 16), ":", "_")}.yaml" diff --git a/src/mlstacks/terraform/gcp-modular/outputs.tf b/src/mlstacks/terraform/gcp-modular/outputs.tf index 70403d17..49c639f6 100644 --- a/src/mlstacks/terraform/gcp-modular/outputs.tf +++ b/src/mlstacks/terraform/gcp-modular/outputs.tf @@ -100,25 +100,6 @@ output "experiment_tracker_configuration" { }) : "" } -# if seldon is enabled, set the model deployer outputs to the seldon values -# otherwise, set the model deployer outputs to empty strings -output "model_deployer_id" { - value = var.enable_model_deployer_seldon ? uuid() : "" -} -output "model_deployer_flavor" { - value = var.enable_model_deployer_seldon ? "seldon" : "" -} -output "model_deployer_name" { - value = var.enable_model_deployer_seldon ? "gke_seldon_model_deployer_${random_string.unique.result}" : "" -} -output "model_deployer_configuration" { - value = var.enable_model_deployer_seldon ? jsonencode({ - kubernetes_context = "gke_${var.project_id}_${var.region}_${local.prefix}-${local.gke.cluster_name}" - kubernetes_namespace = local.seldon.workloads_namespace - base_url = "http://${module.istio[0].ingress-ip-address}:${module.istio[0].ingress-port}" - }) : "" -} - # project id output "project-id" { value = var.project_id diff --git a/src/mlstacks/terraform/gcp-modular/variables.tf b/src/mlstacks/terraform/gcp-modular/variables.tf index 74d14e6f..7474cd7e 100644 --- a/src/mlstacks/terraform/gcp-modular/variables.tf +++ b/src/mlstacks/terraform/gcp-modular/variables.tf @@ -31,6 +31,10 @@ variable "enable_model_deployer_seldon" { description = "Enable Seldon deployment" default = false } +variable "enable_model_deployer_huggingface" { + description = "Enable Huggingface deployment" + default = false +} variable "enable_step_operator_vertex" { description = "Enable VertexAI Step Operator" default = false @@ -57,6 +61,16 @@ variable "project_id" { default = "" } +# variables for huggingface model model deployer +variable "huggingface_token"{ + description = "The Hugging Face authentication token." + default = "huggingfaceauthenticationtoken" +} + +variable "huggingface_namespace" { + description = "The namespace where the Inference Endpoint will be created." + default = "huggingfacenamespace" +} # variables for the MLflow tracking server variable "mlflow_bucket" { diff --git a/src/mlstacks/terraform/gcp-modular/vpc.tf b/src/mlstacks/terraform/gcp-modular/vpc.tf index 28eecc93..15c7338d 100644 --- a/src/mlstacks/terraform/gcp-modular/vpc.tf +++ b/src/mlstacks/terraform/gcp-modular/vpc.tf @@ -54,4 +54,4 @@ module "vpc" { next_hop_internet = "true" }, ] -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/k3d-modular/helm.tf b/src/mlstacks/terraform/k3d-modular/helm.tf index 5109a922..7b689bba 100644 --- a/src/mlstacks/terraform/k3d-modular/helm.tf +++ b/src/mlstacks/terraform/k3d-modular/helm.tf @@ -14,4 +14,4 @@ provider "helm" { var.enable_orchestrator_tekton || var.enable_orchestrator_kubernetes || var.enable_model_deployer_seldon || var.enable_experiment_tracker_mlflow || var.enable_artifact_store || var.enable_zenml) ? k3d_cluster.zenml-cluster[0].credentials.0.cluster_ca_certificate : "" } -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/k3d-modular/istio.tf b/src/mlstacks/terraform/k3d-modular/istio.tf index 5283beda..b3f0458d 100644 --- a/src/mlstacks/terraform/k3d-modular/istio.tf +++ b/src/mlstacks/terraform/k3d-modular/istio.tf @@ -8,4 +8,4 @@ module "istio" { ] chart_version = local.istio.version -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/k3d-modular/k3d.tf b/src/mlstacks/terraform/k3d-modular/k3d.tf index b5e99b1e..f2f64c76 100644 --- a/src/mlstacks/terraform/k3d-modular/k3d.tf +++ b/src/mlstacks/terraform/k3d-modular/k3d.tf @@ -100,4 +100,4 @@ resource "k3d_cluster" "zenml-cluster" { depends_on = [ k3d_registry.zenml-registry, ] -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/k3d-modular/kubeflow.tf b/src/mlstacks/terraform/k3d-modular/kubeflow.tf index 5add4799..05dc4217 100644 --- a/src/mlstacks/terraform/k3d-modular/kubeflow.tf +++ b/src/mlstacks/terraform/k3d-modular/kubeflow.tf @@ -16,4 +16,4 @@ module "kubeflow-pipelines" { ingress_host = (var.enable_model_deployer_seldon) ? "${local.kubeflow.ingress_host_prefix}.${module.istio[0].ingress-ip-address}.nip.io" : "${local.kubeflow.ingress_host_prefix}.${module.nginx-ingress[0].ingress-ip-address}.nip.io" tls_enabled = false istio_enabled = (var.enable_model_deployer_seldon) ? true : false -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/k3d-modular/kubernetes.tf b/src/mlstacks/terraform/k3d-modular/kubernetes.tf index 060ae5ed..552afef0 100644 --- a/src/mlstacks/terraform/k3d-modular/kubernetes.tf +++ b/src/mlstacks/terraform/k3d-modular/kubernetes.tf @@ -37,4 +37,4 @@ resource "kubernetes_namespace" "k8s-workloads" { depends_on = [ k3d_cluster.zenml-cluster, ] -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/k3d-modular/locals.tf b/src/mlstacks/terraform/k3d-modular/locals.tf index 20929900..c76d686f 100644 --- a/src/mlstacks/terraform/k3d-modular/locals.tf +++ b/src/mlstacks/terraform/k3d-modular/locals.tf @@ -61,7 +61,7 @@ locals { workloads_namespace = "zenml-workloads-seldon" service_account_name = "seldon" } - + common_tags = { "managedBy" = "terraform" "environment" = "dev" diff --git a/src/mlstacks/terraform/k3d-modular/minio.tf b/src/mlstacks/terraform/k3d-modular/minio.tf index a6b17138..3530b11d 100644 --- a/src/mlstacks/terraform/k3d-modular/minio.tf +++ b/src/mlstacks/terraform/k3d-modular/minio.tf @@ -47,4 +47,4 @@ resource "minio_s3_bucket" "zenml_bucket" { module.nginx-ingress, module.istio, ] -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/k3d-modular/mlflow.tf b/src/mlstacks/terraform/k3d-modular/mlflow.tf index 489f240d..feb1fb0b 100644 --- a/src/mlstacks/terraform/k3d-modular/mlflow.tf +++ b/src/mlstacks/terraform/k3d-modular/mlflow.tf @@ -48,4 +48,4 @@ resource "minio_s3_bucket" "mlflow_bucket" { module.nginx-ingress, module.istio, ] -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/k3d-modular/nginx_ingress.tf b/src/mlstacks/terraform/k3d-modular/nginx_ingress.tf index 5f6399f4..a9397409 100644 --- a/src/mlstacks/terraform/k3d-modular/nginx_ingress.tf +++ b/src/mlstacks/terraform/k3d-modular/nginx_ingress.tf @@ -10,4 +10,4 @@ module "nginx-ingress" { ] chart_version = local.nginx_ingress.version -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/k3d-modular/output_stack.tf b/src/mlstacks/terraform/k3d-modular/output_stack.tf index edb48405..5dbde1a6 100644 --- a/src/mlstacks/terraform/k3d-modular/output_stack.tf +++ b/src/mlstacks/terraform/k3d-modular/output_stack.tf @@ -90,4 +90,4 @@ resource "local_file" "stack_file" { %{endif} ADD filename = "./k3d_stack_${replace(substr(timestamp(), 0, 16), ":", "_")}.yaml" -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/k3d-modular/output_test_harness_cfg.tf b/src/mlstacks/terraform/k3d-modular/output_test_harness_cfg.tf index 429ca77f..e84adfa1 100644 --- a/src/mlstacks/terraform/k3d-modular/output_test_harness_cfg.tf +++ b/src/mlstacks/terraform/k3d-modular/output_test_harness_cfg.tf @@ -350,4 +350,4 @@ environments: %{endif} ADD filename = "./k3d_test_framework_cfg.yaml" -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/k3d-modular/outputs.tf b/src/mlstacks/terraform/k3d-modular/outputs.tf index 6c36527c..9ccbf5a5 100644 --- a/src/mlstacks/terraform/k3d-modular/outputs.tf +++ b/src/mlstacks/terraform/k3d-modular/outputs.tf @@ -23,22 +23,22 @@ output "artifact_store_configuration" { output "container_registry_id" { value = (var.enable_container_registry || var.enable_orchestrator_kubeflow || var.enable_orchestrator_tekton || var.enable_orchestrator_kubernetes || - var.enable_model_deployer_seldon || var.enable_experiment_tracker_mlflow || var.enable_artifact_store || var.enable_zenml) ? uuid() : "" + var.enable_model_deployer_huggingface || var.enable_model_deployer_seldon || var.enable_experiment_tracker_mlflow || var.enable_artifact_store || var.enable_zenml) ? uuid() : "" } output "container_registry_flavor" { value = (var.enable_container_registry || var.enable_orchestrator_kubeflow || var.enable_orchestrator_tekton || var.enable_orchestrator_kubernetes || - var.enable_model_deployer_seldon || var.enable_experiment_tracker_mlflow || var.enable_artifact_store || var.enable_zenml) ? "default" : "" + var.enable_model_deployer_huggingface || var.enable_model_deployer_seldon || var.enable_experiment_tracker_mlflow || var.enable_artifact_store || var.enable_zenml) ? "default" : "" } output "container_registry_name" { value = (var.enable_container_registry || var.enable_orchestrator_kubeflow || var.enable_orchestrator_tekton || var.enable_orchestrator_kubernetes || - var.enable_model_deployer_seldon || var.enable_experiment_tracker_mlflow || var.enable_artifact_store || var.enable_zenml) ? "k3d-${local.k3d_registry.name}-${random_string.cluster_id.result}" : "" + var.enable_model_deployer_huggingface || var.enable_model_deployer_seldon || var.enable_experiment_tracker_mlflow || var.enable_artifact_store || var.enable_zenml) ? "k3d-${local.k3d_registry.name}-${random_string.cluster_id.result}" : "" } output "container_registry_configuration" { value = (var.enable_container_registry || var.enable_orchestrator_kubeflow || var.enable_orchestrator_tekton || var.enable_orchestrator_kubernetes || - var.enable_model_deployer_seldon || var.enable_experiment_tracker_mlflow || var.enable_artifact_store || var.enable_zenml) ? jsonencode({ + var.enable_model_deployer_huggingface || var.enable_model_deployer_seldon || var.enable_experiment_tracker_mlflow || var.enable_artifact_store || var.enable_zenml) ? jsonencode({ uri = "k3d-${local.k3d_registry.name}-${random_string.cluster_id.result}.localhost:${local.k3d_registry.port}" }) : "" } @@ -92,30 +92,11 @@ output "experiment_tracker_configuration" { }) : "" } -# if seldon is enabled, set the model_deployer outputs to the seldon values -# otherwise, set the model_deployer outputs to empty strings -output "model_deployer_id" { - value = var.enable_model_deployer_seldon ? uuid() : "" -} -output "model_deployer_flavor" { - value = var.enable_model_deployer_seldon ? "seldon" : "" -} -output "model_deployer_name" { - value = var.enable_model_deployer_seldon ? "k3d-seldon-${random_string.cluster_id.result}" : "" -} -output "model_deployer_configuration" { - value = var.enable_model_deployer_seldon ? jsonencode({ - kubernetes_context = "k3d-${k3d_cluster.zenml-cluster[0].name}" - kubernetes_namespace = local.seldon.workloads_namespace - base_url = "http://${module.istio[0].ingress-ip-address}:${module.istio[0].ingress-port}" - }) : "" -} - # output for the k3d cluster output "k3d-cluster-name" { value = (var.enable_container_registry || var.enable_orchestrator_kubeflow || var.enable_orchestrator_tekton || var.enable_orchestrator_kubernetes || - var.enable_model_deployer_seldon || var.enable_experiment_tracker_mlflow || var.enable_artifact_store || var.enable_zenml) ? k3d_cluster.zenml-cluster[0].name : "" + var.enable_model_deployer_huggingface || var.enable_model_deployer_seldon || var.enable_experiment_tracker_mlflow || var.enable_artifact_store || var.enable_zenml) ? k3d_cluster.zenml-cluster[0].name : "" } # output for container registry @@ -165,6 +146,14 @@ output "seldon-base-url" { value = var.enable_model_deployer_seldon ? module.istio[0].ingress-ip-address : null } +output "huggingface-workload-namespace" { + value = var.enable_model_deployer_huggingface ? local.huggingface.workloads_namespace : null + description = "The namespace created for hosting your Huggingface workloads" +} +output "huggingface-base-url" { + value = var.enable_model_deployer_huggingface ? module.istio[0].ingress-ip-address : null +} + # output the name of the stack YAML file created output "stack-yaml-path" { value = local_file.stack_file.filename diff --git a/src/mlstacks/terraform/k3d-modular/tekton.tf b/src/mlstacks/terraform/k3d-modular/tekton.tf index f470d58d..2d34b361 100644 --- a/src/mlstacks/terraform/k3d-modular/tekton.tf +++ b/src/mlstacks/terraform/k3d-modular/tekton.tf @@ -29,4 +29,4 @@ resource "kubernetes_namespace" "tekton-workloads" { depends_on = [ module.tekton-pipelines, ] -} +} \ No newline at end of file diff --git a/src/mlstacks/terraform/k3d-modular/variables.tf b/src/mlstacks/terraform/k3d-modular/variables.tf index cc6a39ba..249d1ee4 100644 --- a/src/mlstacks/terraform/k3d-modular/variables.tf +++ b/src/mlstacks/terraform/k3d-modular/variables.tf @@ -27,11 +27,26 @@ variable "enable_model_deployer_seldon" { description = "Enable Seldon deployment" default = false } +variable "enable_model_deployer_huggingface" { + description = "Enable Huggingface deployment" + default = false +} variable "enable_zenml" { description = "Enable ZenML deployment" default = false } +# variables for huggingface model model deployer +variable "huggingface_token"{ + description = "The Hugging Face authentication token." + default = "huggingfaceauthenticationtoken" +} + +variable "huggingface_namespace" { + description = "The namespace where the Inference Endpoint will be created." + default = "huggingfacenamespace" +} + # variables for the MLflow tracking server and Minio S3 bucket variable "zenml-minio-store-access-key" { @@ -65,6 +80,12 @@ variable "seldon-secret-name" { type = string } +variable "huggingface-secret-name" { + description = "The Huggingface Model Deployer Secret name" + default = "zenml-huggingface-secret" + type = string +} + # variables for creating a ZenML stack configuration file variable "zenml-version" { description = "The version of ZenML being used"