azure-aks - AKS 中的 Deployemnt 超时错误和端点卡在“正在转换”状态
问题描述
我们正在使用 ML studio 和 azure Kubernetes 服务部署 170 个 ML 模型,该服务在以下文档链接“https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/machine-learning/如何部署-azure-kubernetes-service.md”。
我们正在使用带有自定义环境的 python 脚本来训练模型,并且我们正在 Azure ML 服务上注册 ml 模型。注册模式后,我们将使用容器映像将其部署在 AKS 上。
在部署 ML 模型时,我们能够为 AKS 中的每个节点的每个 pod 部署多达 10 到 11 个模型。当我们尝试在同一节点上部署模型时,我们收到部署超时错误,并且我们收到以下错误消息。
用于使用 Python 语言在 Azure Kubernetes 服务中部署模型,示例代码如下。
# Create an environment and add conda dependencies to it and for this creating our environment and building the custom container image.
myenv = Environment(name = Deployment_name)
myenv.python.conda_dependencies = CondaDependencies.create(pip_packages)
# Inference_Conifiguration
inf_config = InferenceConfig(environment= myenv, entry_script='./Script_file.py')
# Deployment_Conifiguration
deployment_config = AksWebservice.deploy_configuration(cpu_cores = 1, memory_gb = 1, cpu_cores_limit = 2, memory_gb_limit = 2, traffic_percentile = 10)
# AKS cluster compute target
aks_target = ComputeTarget(ws, 'pipeline')
# Deploying the model in AKS server
service = Model.deploy(ws, Deployment_name, model_1, inf_config,
deployment_config, aks_target, overwrite=True)
service.wait_for_deployment(show_output=True)
我们还检查了 azure 文档,我们可以找到 aks 节点的任何配置或部署设置。
您能否向我们提供更多关于“每次部署(每个容器)要部署的模型数量限制为 1,000 个模型”的说明,您能否就如何增加可部署的 ml 模型数量提供见解/反馈? Azure Kubernetes 服务中的每个节点?谢谢!
解决方案
根据错误,您的 PVC 似乎存在问题。
给定 Pod 的存储必须由 PersistentVolume Provisioner 基于请求的存储类进行配置,或者由管理员预先配置。
应该有一个 StorageClass 可以动态提供 PV 并在 volumeClaimTemplates 中提及 storageClassName 或者需要有一个 PV 可以满足 PVC。
volumeClaimTemplates:
- metadata:
name: elasticsearch-data-persistent-storage
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "standard"
resources:
requests:
storage: 10Gi
参考:pod 有未绑定的立即 PersistentVolumeClaims(重复 3 次)
也关注这个 GITHUB 讨论:https ://github.com/hashicorp/consul-helm/issues/237
推荐阅读
- android - 当应用程序在后台时检测设备上的用户交互
- php - 删除图像后删除属于图像的所有评论的正确方法?
- linux - 稍后时间点的 mmap 地址,仅包含我正在执行 mmap 的地址
- azure-cli - Azure CLI 未安装在 ASP.NET Core WebApp 上
- database-design - 每个产品都有很多uom
- python - 我们可以增强堆栈驱动程序的日志记录(Google AppEngine)(Python)(标准)吗?
- php - Extjs 6.2 无法解析 directFn QueryDatabase.getResults
- python - 从头开始构建线性模型
- c# - 如何捕捉无法连接数据库异常
- java - Selenium Chromedriver 超时窗口关闭