I have an on-premise K8s cluster that is connected to Azure via Arc. Also have a machine learning workspace that has this as an attached cluster. In my workspace, I have a model created. I created an endpoint in the workspace. Now I want to deploy to this endpoint to provision a scoring endpoint on-premise. But the deployment doesnt go anywhere.
Below is the code for endpoint creation which succeeded
from azure.ai.ml.entities import (
KubernetesOnlineEndpoint,
KubernetesOnlineDeployment,
Model,
Environment,
)
online_endpoint_name = "mnist-test-endpoint"
# create an online endpoint
endpoint = KubernetesOnlineEndpoint(
name=online_endpoint_name,
compute="onpremk8scompute",
description="mnist_test_endpoint",
auth_mode="key",
)
endpoint = ml_client.online_endpoints.begin_create_or_update(endpoint).result()
print(f"Endpoint {endpoint.name} provisioning state: {endpoint.provisioning_state}")
And the code for deployment to the end point
from azure.ai.ml.entities import (
KubernetesOnlineEndpoint,
KubernetesOnlineDeployment,
Model,
Environment,
CodeConfiguration,
ResourceRequirementsSettings,
ResourceSettings
)
model = ml_client.models.get("mnist_model_test", version=1)
model
deployment = KubernetesOnlineDeployment(
name="mnist-deployment-v1",
endpoint_name=online_endpoint_name,
model=model,
environment=Environment(
conda_file="08_conda_env.yml",
image="mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04",
),
code_configuration=CodeConfiguration(
code="./inference_script", scoring_script="score.py"
),
resources=ResourceRequirementsSettings(
requests=ResourceSettings(
cpu="100m",
memory="0.5Gi",
),
),
instance_count=1,
)
ml_client.begin_create_or_update(deployment).result()
This does not work. I also dont find any resources in the on-premise K8s namespace designated for this.
Ideas?