	{"id":63719,"date":"2021-10-25T17:00:23","date_gmt":"2021-10-25T16:00:23","guid":{"rendered":"https:\/\/www.artefact.com\/?post_type=news&#038;p=63719"},"modified":"2024-09-20T17:45:46","modified_gmt":"2024-09-20T16:45:46","slug":"serving-ml-models-at-scale-using-mlflow-on-kubernetes-part-2","status":"publish","type":"blog","link":"https:\/\/www.artefact.com\/zh\/blog\/serving-ml-models-at-scale-using-mlflow-on-kubernetes-part-2\/","title":{"rendered":"\u5728 Kubernetes \u4e0a\u4f7f\u7528 Mlflow \u5927\u89c4\u6a21\u670d\u52a1 ML \u6a21\u578b - \u7b2c 2 \u90e8\u5206"},"content":{"rendered":"<p><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling article-author\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-background-color:#ffffff;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_2 1_2 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:50%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:50%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-title title fusion-title-1 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">\u4f5c\u8005<\/h2><\/div><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27150%27%20height%3D%270%27%20viewBox%3D%270%200%20150%200%27%3E%3Crect%20width%3D%27150%27%20height%3D%270%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/kais-laribi.jpeg\" alt=\"Image\" class=\"lazyload artefact-elegant-image align-left article-author-image\" style=\"width: 150px; border-radius: 54% 46% 77% 23% \/ 74% 40% 60% 26%; overflow: hidden;\" width=\"150\" height=\"auto\" \/><div class=\"fusion-title title fusion-title-2 fusion-sep-none fusion-title-text fusion-title-size-three article-author-name-title\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">\u51ef\u65af-\u62c9\u91cc\u6bd4<\/h3><\/div><div class=\"fusion-text fusion-text-1 article-author-description\"><p>Data \u9ad8\u7ea7\u79d1\u5b66\u5bb6\uff08Artefact<\/p>\n<\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-2 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-margin-top:40px;--awb-margin-bottom:40px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-center fusion-flex-justify-content-center fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-1 fusion_builder_column_1_1 1_1 fusion-flex-column fusion-flex-align-self-center fusion-column-inner-bg-wrapper\" style=\"--awb-padding-top:20px;--awb-padding-right:20px;--awb-padding-bottom:20px;--awb-padding-left:20px;--awb-overflow:hidden;--awb-inner-bg-size:cover;--awb-border-color:rgba(10,17,40,0.1);--awb-border-top:1px;--awb-border-right:1px;--awb-border-bottom:1px;--awb-border-left:1px;--awb-border-style:solid;--awb-border-radius:4px 4px 4px 4px;--awb-inner-bg-border-radius:4px 4px 4px 4px;--awb-inner-bg-overflow:hidden;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><span class=\"fusion-column-inner-bg hover-type-none\"><a class=\"fusion-column-anchor\" href=\"https:\/\/medium.com\/artefact-engineering-and-data-science\/serving-ml-models-at-scale-using-mlflow-on-kubernetes-7a85c28d38e\" rel=\"noopener noreferrer\" target=\"_blank\"><span class=\"fusion-column-inner-bg-image\"><\/span><\/a><\/span><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-center fusion-content-layout-row fusion-flex-align-items-center\"><div class=\"fusion-text fusion-text-2\"><p><u>\u9605\u8bfb\u6211\u4eec\u7684\u6587\u7ae0<\/u><\/p>\n<\/div><div class=\"fusion-image-element\" style=\"--awb-margin-right:20px;--awb-margin-left:20px;--awb-max-width:150px;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\"fusion-imageframe imageframe-none imageframe-1 hover-type-none\"><img decoding=\"async\" width=\"4000\" height=\"992\" title=\"\u4e2d\u578b Blog\" src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog.png\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog.png\" alt class=\"lazyload img-responsive wp-image-60582\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%274000%27%20height%3D%27992%27%20viewBox%3D%270%200%204000%20992%27%3E%3Crect%20width%3D%274000%27%20height%3D%27992%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-srcset=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-200x50.png 200w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-400x99.png 400w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-600x149.png 600w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-800x198.png 800w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog-1200x298.png 1200w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/04\/Medium-Blog.png 4000w\" data-sizes=\"auto\" data-orig-sizes=\"(max-width: 640px) 100vw, 4000px\" \/><\/span><\/div><div class=\"fusion-text fusion-text-3\"><p>.<\/p>\n<\/div><\/div><\/div><\/div><\/div><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-3 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-2 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-text fusion-text-4 description\"><p>\u672c\u6587\u662f\u7cfb\u5217\u6587\u7ae0\u7684\u7b2c\u4e8c\u90e8\u5206\uff0c\u5728\u8fd9\u4e00\u90e8\u5206\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u4f7f\u7528 Mlflow \u8bb0\u5f55\u6a21\u578b\u3001\u5c06\u5176\u4f5c\u4e3a API \u7aef\u70b9\u63d0\u4f9b\u4ee5\u53ca\u6700\u540e\u6839\u636e\u5e94\u7528\u9700\u6c42\u5bf9\u5176\u8fdb\u884c\u6269\u5c55\u7684\u8fc7\u7a0b\u3002\u5728\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728 k8s \u4e0a\u90e8\u7f72\u8ddf\u8e2a\u5b9e\u4f8b\uff0c\u5e76\u68c0\u67e5\u4e86\u5b9e\u9645\u64cd\u4f5c\u7684\u5148\u51b3\u6761\u4ef6\uff08\u79d8\u5bc6\u3001\u73af\u5883\u53d8\u91cf......\uff09\u3002.<br \/>\n\u4e0b\u9762\uff0c\u6211\u4eec\u5c06\u5c55\u793a\u5982\u4f55\u4e3a\u5df2\u5728 Mlflow \u4e2d\u6ce8\u518c\u7684\u673a\u5668\u5b66\u4e60\u6a21\u578b\u63d0\u4f9b\u670d\u52a1\uff0c\u5e76\u5c06\u5176\u4f5c\u4e3a API \u7aef\u70b9\u5728 k8s \u4e0a\u516c\u5f00\u3002.<\/p>\n<\/div><\/div><\/div><\/div><\/div><article class=\"fusion-fullwidth fullwidth-box fusion-builder-row-4 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-justify-content-center fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-3 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-title title fusion-title-3 fusion-sep-none fusion-title-text fusion-title-size-one\" style=\"--awb-margin-bottom-small:8px;\"><h1 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:70;line-height:1;\">\u7b2c 2 \u90e8\u5206--\u5982\u4f55\u5728 Kubernetes \u4e0a\u5c06\u6a21\u578b\u4f5c\u4e3a API \u63d0\u4f9b\uff1f<\/h1><\/div><div class=\"fusion-title title fusion-title-4 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">\u5bfc\u8a00<\/h2><\/div><div class=\"fusion-text fusion-text-5\"><p>\u663e\u800c\u6613\u89c1\uff0c\u8ddf\u8e2a\u548c\u4f18\u5316\u6a21\u578b\u6027\u80fd\u662f\u521b\u5efa ML \u6a21\u578b\u7684\u91cd\u8981\u90e8\u5206\u3002\u4e00\u65e6\u5b8c\u6210\uff0c\u4e0b\u4e00\u4e2a\u6311\u6218\u5c31\u662f\u5c06\u5b83\u4eec\u96c6\u6210\u5230\u5e94\u7528\u7a0b\u5e8f\u6216\u4ea7\u54c1\u4e2d\uff0c\u4ee5\u4fbf\u4f7f\u7528\u5b83\u4eec\u7684\u9884\u6d4b\u7ed3\u679c\u3002\u8fd9\u5c31\u662f\u6211\u4eec\u6240\u8bf4\u7684\u6a21\u578b\u670d\u52a1\u6216\u63a8\u7406\u3002\u6709\u4e0d\u540c\u7684\u6846\u67b6\u548c\u6280\u672f\u53ef\u4ee5\u8ba9\u6211\u4eec\u505a\u5230\u8fd9\u4e00\u70b9\u3002\u4e0d\u8fc7\uff0c\u5728\u8fd9\u91cc\u6211\u4eec\u5c06\u91cd\u70b9\u4ecb\u7ecd Mlflow\uff0c\u5e76\u5411\u5927\u5bb6\u5c55\u793a\u5b83\u662f\u5982\u4f55\u9ad8\u6548\u3001\u76f4\u63a5\u5730\u5b8c\u6210\u8fd9\u9879\u5de5\u4f5c\u7684\u3002.<\/p>\n<\/div><div class=\"fusion-title title fusion-title-5 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">\u6784\u5efa\u548c\u90e8\u7f72\u670d\u52a1\u6620\u50cf<\/h2><\/div><div class=\"fusion-text fusion-text-6\"><p>\u8fd9\u91cc\u4f7f\u7528\u7684\u4e0d\u540c\u914d\u7f6e\u6587\u4ef6\u662f\u00a0<a class=\"bv ig\" href=\"https:\/\/github.com\/artefactory-global\/mlflow-serving-example\" target=\"_blank\" rel=\"noopener ugc nofollow\">\u5b9e\u8df5\u5e93<\/a>\u00a0\u57fa\u672c\u4e0a\uff0c\u6211\u4eec\u9700\u8981<\/p>\n<\/div><div class=\"fusion-title title fusion-title-6 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">1.\u51c6\u5907\u597d Mlflow \u670d\u52a1\u7684 docker \u955c\u50cf\uff0c\u5e76\u5c06\u5176\u63a8\u9001\u5230 GCP \u4e0a\u7684\u5bb9\u5668\u6ce8\u518c\u4e2d\u5fc3\u3002.<\/h3><\/div><div class=\"fusion-text fusion-text-7\"><pre class=\"hp hq hr hs ht kg gv be\"><span id=\"09f2\" class=\"ej kh ii dm ki b kj kk kl s km\" data-selectable-paragraph=\"\">cd mlflow-serving-example<\/span><span id=\"eda1\" class=\"ej kh ii dm ki b kj kn ko kp kq kr kl s km\" data-selectable-paragraph=\"\">docker build --tag $\/mlflow_serving:v1 <br \/>--\u6587\u4ef6 docker_mlflow_serving .<\/span><span id=\"855d\" class=\"ej kh ii dm ki b kj kn ko kp kq kr kl s km\" data-selectable-paragraph=\"\">docker push $\/mlflow_serving:v1<\/span><\/pre>\n<\/div><div class=\"fusion-title title fusion-title-7 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">2.\u51c6\u5907 Kubernetes \u90e8\u7f72\u6587\u4ef6<\/h3><\/div><div class=\"fusion-text fusion-text-8\"><p>\u901a\u8fc7\u4fee\u6539\u5bb9\u5668\u90e8\u5206\u5e76\u5c06\u5176\u6620\u5c04\u5230\u00a0<strong>docker \u6620\u50cf<\/strong>\u00a0\u5148\u524d\u63a8\u9001\u5230 GCR\u3001,\u00a0<strong>\u6a21\u578b\u8def\u5f84<\/strong>\u00a0\u548c\u00a0<strong>\u670d\u52a1\u7aef\u53e3\u3002.<\/strong><\/p>\n<\/div><div class=\"fusion-text fusion-text-9\"><div class=\"code\">\n<table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\" data-paste-markdown-skip=\"\">\n<tbody>\n<tr>\n<td id=\"file-mlflow_serving-yaml-LC1\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">api \u7248\u672c<\/span>: <span class=\"pl-s\">apps\/v1<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L2\" class=\"blob-num js-line-number\" data-line-number=\"2\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC2\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u4e00\u79cd<\/span>: <span class=\"pl-s\">\u90e8\u7f72<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L3\" class=\"blob-num js-line-number\" data-line-number=\"3\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC3\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u5143 data<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L4\" class=\"blob-num js-line-number\" data-line-number=\"4\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC4\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u540d\u5b57<\/span>: <span class=\"pl-s\">mlflow-serving<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L5\" class=\"blob-num js-line-number\" data-line-number=\"5\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC5\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u6807\u7b7e<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L6\" class=\"blob-num js-line-number\" data-line-number=\"6\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC6\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u5e94\u7528<\/span>: <span class=\"pl-s\">\u670d\u52a1-ML-\u6a21\u578b-mlflow<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L7\" class=\"blob-num js-line-number\" data-line-number=\"7\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC7\" class=\"blob-code blob-code-inner js-file-line\">\u00a0<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L8\" class=\"blob-num js-line-number\" data-line-number=\"8\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC8\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u89c4\u683c<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L9\" class=\"blob-num js-line-number\" data-line-number=\"9\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC9\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u590d\u5236\u54c1<\/span>: <span class=\"pl-c1\">1<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L10\" class=\"blob-num js-line-number\" data-line-number=\"10\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC10\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u9009\u4e3e\u4eba<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L11\" class=\"blob-num js-line-number\" data-line-number=\"11\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC11\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">matchLabels<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L12\" class=\"blob-num js-line-number\" data-line-number=\"12\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC12\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u5e94\u7528<\/span>: <span class=\"pl-s\">mlflow-serving<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L13\" class=\"blob-num js-line-number\" data-line-number=\"13\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC13\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u6a21\u677f<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L14\" class=\"blob-num js-line-number\" data-line-number=\"14\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC14\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u5143 data<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L15\" class=\"blob-num js-line-number\" data-line-number=\"15\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC15\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u6807\u7b7e<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L16\" class=\"blob-num js-line-number\" data-line-number=\"16\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC16\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u5e94\u7528<\/span>: <span class=\"pl-s\">mlflow-serving<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L17\" class=\"blob-num js-line-number\" data-line-number=\"17\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC17\" class=\"blob-code blob-code-inner js-file-line\">\u00a0<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L18\" class=\"blob-num js-line-number\" data-line-number=\"18\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC18\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u89c4\u683c<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L19\" class=\"blob-num js-line-number\" data-line-number=\"19\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC19\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u96c6\u88c5\u7bb1<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L20\" class=\"blob-num js-line-number\" data-line-number=\"20\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC20\" class=\"blob-code blob-code-inner js-file-line\">- <span class=\"pl-ent\">\u540d\u5b57<\/span>: <span class=\"pl-s\">mlflow-serving<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L21\" class=\"blob-num js-line-number\" data-line-number=\"21\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC21\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u56fe\u50cf<\/span>: <span class=\"pl-s\">GCR_REPO\/mlflow_serving:v1 <\/span><span class=\"pl-c\">#change here<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L22\" class=\"blob-num js-line-number\" data-line-number=\"22\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC22\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u73af\u5883<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L23\" class=\"blob-num js-line-number\" data-line-number=\"23\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC23\" class=\"blob-code blob-code-inner js-file-line\">- <span class=\"pl-ent\">\u540d\u5b57<\/span>: <span class=\"pl-s\">MODEL_URI<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L24\" class=\"blob-num js-line-number\" data-line-number=\"24\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC24\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u4ef7\u503c<\/span>: <span class=\"pl-s\"><span class=\"pl-pds\">\u201c<\/span>gs:\/\/..\/artifacts\/..\/..\/artifacts\/..<span class=\"pl-pds\">\u201c<\/span><\/span> <span class=\"pl-c\">#change here<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L25\" class=\"blob-num js-line-number\" data-line-number=\"25\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC25\" class=\"blob-code blob-code-inner js-file-line\">- <span class=\"pl-ent\">\u540d\u5b57<\/span>: <span class=\"pl-s\">\u670d\u52a1\u7aef\u53e3<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L26\" class=\"blob-num js-line-number\" data-line-number=\"26\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC26\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u4ef7\u503c<\/span>: <span class=\"pl-s\"><span class=\"pl-pds\">\u201c<\/span>8082<span class=\"pl-pds\">\u201c<\/span><\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L27\" class=\"blob-num js-line-number\" data-line-number=\"27\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC27\" class=\"blob-code blob-code-inner js-file-line\">- <span class=\"pl-ent\">\u540d\u5b57<\/span>: <span class=\"pl-s\">\u8c37\u6b4c\u5e94\u7528\u7a0b\u5e8f\u51ed\u636e<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L28\" class=\"blob-num js-line-number\" data-line-number=\"28\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC28\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u4ef7\u503c<\/span>: <span class=\"pl-s\"><span class=\"pl-pds\">\u201c<\/span>\/etc\/secrets\/keyfile.json<span class=\"pl-pds\">\u201c<\/span><\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L29\" class=\"blob-num js-line-number\" data-line-number=\"29\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC29\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u5377\u6302\u8f7d<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L30\" class=\"blob-num js-line-number\" data-line-number=\"30\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC30\" class=\"blob-code blob-code-inner js-file-line\">- <span class=\"pl-ent\">\u540d\u5b57<\/span>: <span class=\"pl-s\">gcsfs-creds<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L31\" class=\"blob-num js-line-number\" data-line-number=\"31\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC31\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">mountPath<\/span>: <span class=\"pl-s\"><span class=\"pl-pds\">\u201c<\/span>\/etc\/secrets<span class=\"pl-pds\">\u201c<\/span><\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L32\" class=\"blob-num js-line-number\" data-line-number=\"32\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC32\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u53ea\u8bfb<\/span>: <span class=\"pl-c1\">\u771f<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L33\" class=\"blob-num js-line-number\" data-line-number=\"33\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC33\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u8d44\u6e90<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L34\" class=\"blob-num js-line-number\" data-line-number=\"34\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC34\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u8981\u6c42<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L35\" class=\"blob-num js-line-number\" data-line-number=\"35\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC35\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">CPU<\/span>: <span class=\"pl-s\"><span class=\"pl-pds\">\u201c<\/span>1000m<span class=\"pl-pds\">\u201c<\/span><\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L36\" class=\"blob-num js-line-number\" data-line-number=\"36\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC36\" class=\"blob-code blob-code-inner js-file-line\">\u00a0<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L37\" class=\"blob-num js-line-number\" data-line-number=\"37\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC37\" class=\"blob-code blob-code-inner js-file-line\">\u00a0<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L38\" class=\"blob-num js-line-number\" data-line-number=\"38\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC38\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u6d41\u91cf<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L39\" class=\"blob-num js-line-number\" data-line-number=\"39\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC39\" class=\"blob-code blob-code-inner js-file-line\">- <span class=\"pl-ent\">\u540d\u5b57<\/span>: <span class=\"pl-s\">gcsfs-creds<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L40\" class=\"blob-num js-line-number\" data-line-number=\"40\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC40\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u79d8\u5bc6<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L41\" class=\"blob-num js-line-number\" data-line-number=\"41\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC41\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u79d8\u5bc6\u540d\u79f0<\/span>: <span class=\"pl-s\">gcsfs-creds<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L42\" class=\"blob-num js-line-number\" data-line-number=\"42\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC42\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u9879\u76ee<\/span>:<\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L43\" class=\"blob-num js-line-number\" data-line-number=\"43\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC43\" class=\"blob-code blob-code-inner js-file-line\">- <span class=\"pl-ent\">\u5bc6\u94a5<\/span>: <span class=\"pl-s\">keyfile.json<\/span><\/td>\n<\/tr>\n<tr>\n<td id=\"file-mlflow_serving-yaml-L44\" class=\"blob-num js-line-number\" data-line-number=\"44\">\u00a0<\/td>\n<td id=\"file-mlflow_serving-yaml-LC44\" class=\"blob-code blob-code-inner js-file-line\"><span class=\"pl-ent\">\u8def<\/span>: <span class=\"pl-s\">keyfile.json<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div><div class=\"fusion-title title fusion-title-8 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">3.\u8fd0\u884c\u90e8\u7f72\u547d\u4ee4<\/h3><\/div><div class=\"fusion-text fusion-text-10\"><p>kubectl create -f deployments\/mlflow-serving\/mlflow_serving.yaml<\/p>\n<\/div><div class=\"fusion-title title fusion-title-9 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">4.\u5c06\u90e8\u7f72\u5bf9\u5916\u5f00\u653e<\/h3><\/div><div class=\"fusion-text fusion-text-11\"><p>\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5c06\u521b\u5efa\u4e00\u4e2a\u65b0\u8d44\u6e90\uff0c\u7528\u4e8e\u5c06\u5916\u90e8\u6d41\u91cf\u91cd\u5b9a\u5411\u5230\u6211\u4eec\u7684 API\u3002.<\/p>\n<pre class=\"hp hq hr hs ht kg gv be\"><span id=\"d7d7\" class=\"ej kh ii dm ki b kj kk kl s km\" data-selectable-paragraph=\"\">kubectl expose deployment mlflow-serving --port 8082 --type=\"LoadBalancer\"<\/span><\/pre>\n<\/div><div class=\"fusion-title title fusion-title-10 fusion-sep-none fusion-title-text fusion-title-size-three\" style=\"--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">5.\u68c0\u67e5\u90e8\u7f72\u60c5\u51b5\u5e76\u67e5\u8be2\u7aef\u70b9<\/h3><\/div><div class=\"fusion-text fusion-text-12\"><p>\u5982\u679c\u90e8\u7f72\u6210\u529f\uff0cmlflow-serving \u5e94\u5df2\u542f\u52a8\uff0c\u5e76\u4e14\u6709\u4e00\u4e2a pod \u53ef\u7528\u3002\u60a8\u53ef\u4ee5\u952e\u5165\u00a0<em><strong class=\"jh ka\">kubectl get pods<\/strong><\/em><\/p>\n<\/div><div class=\"fusion-image-element\" style=\"--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\"fusion-imageframe imageframe-none imageframe-2 hover-type-none\"><img decoding=\"async\" width=\"559\" height=\"60\" title=\"article-kais-part2\" src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2.png\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2.png\" alt class=\"lazyload img-responsive wp-image-63932\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27559%27%20height%3D%2760%27%20viewBox%3D%270%200%20559%2060%27%3E%3Crect%20width%3D%27559%27%20height%3D%2760%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-srcset=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2-200x21.png 200w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2-400x43.png 400w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2.png 559w\" data-sizes=\"auto\" data-orig-sizes=\"(max-width: 640px) 100vw, 559px\" \/><\/span><\/div><div class=\"fusion-text fusion-text-13\"><p>\u6700\u540e\u4e00\u6b65\u662f\u68c0\u67e5\u5206\u914d\u7ed9\u5c06\u6d41\u91cf\u91cd\u5b9a\u5411\u5230 API \u5bb9\u5668\u7684\u8d1f\u8f7d\u5e73\u8861\u5668\u7684\u5916\u90e8 IP \u5730\u5740\uff0c\u4f7f\u7528\u00a0<strong><em>kubectl get services<\/em><\/strong>\u00a0\u5e76\u6d4b\u8bd5\u5bf9\u4e00\u4e9b\u67e5\u8be2\u7684\u54cd\u5e94\u3002.<\/p>\n<\/div><div class=\"fusion-image-element\" style=\"--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\"fusion-imageframe imageframe-none imageframe-3 hover-type-none\"><img decoding=\"async\" width=\"700\" height=\"100\" title=\"article-kais-part2-2\" src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2-2.png\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2-2.png\" alt class=\"lazyload img-responsive wp-image-63933\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27700%27%20height%3D%27100%27%20viewBox%3D%270%200%20700%20100%27%3E%3Crect%20width%3D%27700%27%20height%3D%27100%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-srcset=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2-2-200x29.png 200w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2-2-400x57.png 400w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2-2-600x86.png 600w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2-2.png 700w\" data-sizes=\"auto\" data-orig-sizes=\"(max-width: 640px) 100vw, 700px\" \/><\/span><\/div><div class=\"fusion-text fusion-text-14\"><p>\u6267\u884c\u8fd9\u4e9b\u67e5\u8be2\u7684\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\u00a0<a class=\"bv ig\" href=\"https:\/\/github.com\/artefactory-global\/mlflow-serving-example\/blob\/main\/notebooks\/2.%20query%20mlflow%20serve%20API.ipynb\" target=\"_blank\" rel=\"noopener ugc nofollow\">\u7b14\u8bb0\u672c<\/a>\u00a0\u5176\u4e2d\uff0c\u6211\u4eec\u52a0\u8f7d\u4e86 data \u7684\u51e0\u884c\u6570\u636e\uff0c\u9009\u62e9\u4e86\u7279\u5f81\uff0c\u5c06\u5176\u8f6c\u6362\u4e3a JSON \u683c\u5f0f\uff0c\u5e76\u901a\u8fc7 post request \u5c06\u5176\u53d1\u9001\u5230 API\u3002.<br \/>\n\u73b0\u5728\uff0c\u7ed3\u5408\u6211\u4eec\u4e4b\u524d\u548c\u5f53\u524d\u6587\u7ae0\u4e2d\u7684\u6b65\u9aa4\uff0c\u6211\u4eec\u7684\u6700\u7ec8\u67b6\u6784\u5c06\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<\/div><div class=\"fusion-image-element\" style=\"--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\"fusion-imageframe imageframe-none imageframe-4 hover-type-none\"><img decoding=\"async\" width=\"700\" height=\"383\" title=\"article-kais-part2-3\" src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2-3.png\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2-3.png\" alt class=\"lazyload img-responsive wp-image-63934\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27700%27%20height%3D%27383%27%20viewBox%3D%270%200%20700%20383%27%3E%3Crect%20width%3D%27700%27%20height%3D%27383%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-srcset=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2-3-200x109.png 200w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2-3-400x219.png 400w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2-3-600x328.png 600w, https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/10\/article-kais-part2-3.png 700w\" data-sizes=\"auto\" data-orig-sizes=\"(max-width: 640px) 100vw, 700px\" \/><\/span><\/div><div class=\"fusion-title title fusion-title-11 fusion-sep-none fusion-title-text fusion-title-size-two\" style=\"--awb-margin-bottom-small:8px;\"><h2 class=\"fusion-title-heading title-heading-left fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:50;line-height:1.2;\">\u7ed3\u8bba<\/h2><\/div><div class=\"fusion-text fusion-text-15\"><p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528 Mlflow \u670d\u52a1\u6a21\u5757\u5c06\u673a\u5668\u5b66\u4e60\u6a21\u578b\u4f5c\u4e3a API \u7aef\u70b9\u8f7b\u677e\u90e8\u7f72\u3002.<\/p>\n<p>\u60a8\u53ef\u80fd\u4f1a\u6ce8\u610f\u5230\uff0c\u5728\u6211\u4eec\u5f53\u524d\u7684\u90e8\u7f72\u4e2d\uff0c\u53ea\u521b\u5efa\u4e86\u4e00\u4e2a pod \u6765\u4e3a\u6a21\u578b\u63d0\u4f9b\u670d\u52a1\u3002\u867d\u7136\u8fd9\u5bf9\u4e8e\u6211\u4eec\u4e0d\u9700\u8981\u8fdb\u884c\u591a\u6b21\u5e76\u884c\u67e5\u8be2\u7684\u5c0f\u578b\u5e94\u7528\u7a0b\u5e8f\u6765\u8bf4\u6548\u679c\u4e0d\u9519\uff0c\u4f46\u5bf9\u4e8e\u5176\u4ed6\u5e94\u7528\u7a0b\u5e8f\u6765\u8bf4\uff0c\u8fd9\u5f88\u5feb\u5c31\u4f1a\u663e\u793a\u51fa\u5b83\u7684\u5c40\u9650\u6027\uff0c\u56e0\u4e3a\u5355\u4e2a pod \u7684\u8d44\u6e90\u662f\u6709\u9650\u7684\u3002\u6b64\u5916\uff0c\u8fd9\u6837\u4e00\u6765\uff0c\u5e94\u7528\u7a0b\u5e8f\u5c31\u65e0\u6cd5\u4f7f\u7528\u8d85\u8fc7\u4e00\u4e2a\u8282\u70b9\u7684\u8ba1\u7b97\u80fd\u529b\u3002\u5728\u672c\u7cfb\u5217\u7684\u4e0b\u4e00\u7bc7\u4e5f\u662f\u6700\u540e\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u8ba8\u8bba\u53ef\u6269\u5c55\u6027\u95ee\u9898\u3002\u6211\u4eec\u5c06\u9996\u5148\u5f3a\u8c03\u74f6\u9888\u95ee\u9898\uff0c\u5e76\u5c1d\u8bd5\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\uff0c\u4ee5\u4fbf\u83b7\u5f97\u4e00\u4e2a\u53ef\u6269\u5c55\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u5145\u5206\u5229\u7528 Kubernetes \u96c6\u7fa4\u7684\u5f3a\u5927\u529f\u80fd\u3002.<\/p>\n<\/div><\/div><\/div><\/div><\/article><div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-5 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-margin-top:40px;--awb-margin-bottom:40px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-center fusion-flex-justify-content-center fusion-flex-content-wrap\" style=\"max-width:calc( 1440px + 20px );margin-left: calc(-20px \/ 2 );margin-right: calc(-20px \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-4 fusion_builder_column_1_1 1_1 fusion-flex-column fusion-flex-align-self-center\" style=\"--awb-padding-top:40px;--awb-padding-right:40px;--awb-padding-bottom:40px;--awb-padding-left:40px;--awb-overflow:hidden;--awb-bg-position:left center;--awb-bg-size:cover;--awb-border-color:rgba(10,17,40,0.1);--awb-border-style:solid;--awb-border-radius:4px 4px 4px 4px;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:10px;--awb-margin-bottom-large:0px;--awb-spacing-left-large:10px;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:10px;--awb-spacing-left-medium:10px;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:10px;--awb-spacing-left-small:10px;\"><div class=\"fusion-column-wrapper lazyload fusion-column-has-shadow fusion-flex-justify-content-center fusion-content-layout-column fusion-column-has-bg-image\" data-bg-url=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/03\/background.jpg\" data-bg=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/03\/background.jpg\"><div class=\"fusion-image-element\" style=\"text-align:center;--awb-margin-right:20px;--awb-margin-left:20px;--awb-max-width:150px;--awb-caption-title-font-family:var(--h2_typography-font-family);--awb-caption-title-font-weight:var(--h2_typography-font-weight);--awb-caption-title-font-style:var(--h2_typography-font-style);--awb-caption-title-size:var(--h2_typography-font-size);--awb-caption-title-transform:var(--h2_typography-text-transform);--awb-caption-title-line-height:var(--h2_typography-line-height);--awb-caption-title-letter-spacing:var(--h2_typography-letter-spacing);\"><span class=\"fusion-imageframe imageframe-none imageframe-5 hover-type-none\"><img decoding=\"async\" width=\"72\" height=\"41\" title=\"\u4e2d\u7b49\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2772%27%20height%3D%2741%27%20viewBox%3D%270%200%2072%2041%27%3E%3Crect%20width%3D%2772%27%20height%3D%2741%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/www.artefact.com\/\/wp-content\/uploads\/2021\/03\/medium.png\" alt class=\"lazyload img-responsive wp-image-60927\"\/><\/span><\/div><div class=\"fusion-title title fusion-title-12 fusion-sep-none fusion-title-center fusion-title-text fusion-title-size-three\" style=\"--awb-margin-top:20px;--awb-margin-bottom:0px;--awb-margin-bottom-small:8px;\"><h3 class=\"fusion-title-heading title-heading-center fusion-responsive-typography-calculated\" style=\"margin:0;--fontSize:20;line-height:1.2;\">\u4e2d\u53f7 Blog by Artefact\u3002.<\/h3><\/div><div class=\"fusion-text fusion-text-16\" style=\"--awb-content-alignment:center;\"><p>\u672c\u6587\u6700\u521d\u53d1\u8868\u4e8e <strong>Medium.com<\/strong>.<br \/>\n\u5728\u6211\u4eec\u7684 Medium Blog \u4e0a\u5173\u6ce8\u6211\u4eec\uff01<\/p>\n<\/div><div style=\"text-align:center;\"><a class=\"fusion-button button-flat button-medium button-default fusion-button-default button-1 fusion-button-default-span fusion-button-default-type\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"https:\/\/medium.com\/artefact-engineering-and-data-science\/serving-ml-models-at-scale-using-mlflow-on-kubernetes-7a85c28d38e\" aria-label=\"https:\/\/medium.com\/artefact-engineering-and-data-science\/serving-ml-models-at-scale-using-mlflow-on-kubernetes-7a85c28d38e\" href=\"https:\/\/medium.com\/artefact-engineering-and-data-science\/serving-ml-models-at-scale-using-mlflow-on-kubernetes-bf27258775e7\"><span class=\"fusion-button-text awb-button__text awb-button__text--default\">\u9605\u8bfb\u6211\u4eec\u7684\u6587\u7ae0<\/span><\/a><\/div><\/div><\/div><\/div><\/div><\/p>","protected":false},"excerpt":{"rendered":"<p>2021\u5e7410\u670825\u65e5<br \/>\n\u672c\u6587\u662f\u7cfb\u5217\u6587\u7ae0\u7684\u7b2c\u4e8c\u90e8\u5206\uff0c\u5728\u8fd9\u4e00\u90e8\u5206\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u4f7f\u7528 Mlflow \u8bb0\u5f55\u6a21\u578b\u3001\u5c06\u5176\u4f5c\u4e3a API \u7aef\u70b9\u63d0\u4f9b\u4ee5\u53ca\u6700\u540e\u6839\u636e\u5e94\u7528\u9700\u6c42\u5bf9\u5176\u8fdb\u884c\u6269\u5c55\u7684\u8fc7\u7a0b\u3002\u5728\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728 k8s \u4e0a\u90e8\u7f72\u8ddf\u8e2a\u5b9e\u4f8b\uff0c\u5e76\u68c0\u67e5\u4e86\u5b9e\u9645\u64cd\u4f5c\u7684\u5148\u51b3\u6761\u4ef6\uff08\u79d8\u5bc6\u3001\u73af\u5883\u53d8\u91cf......\uff09\u3002.<br \/>\n\u4e0b\u9762\uff0c\u6211\u4eec\u5c06\u5c55\u793a\u5982\u4f55\u4e3a\u5df2\u5728 Mlflow \u4e2d\u6ce8\u518c\u7684\u673a\u5668\u5b66\u4e60\u6a21\u578b\u63d0\u4f9b\u670d\u52a1\uff0c\u5e76\u5c06\u5176\u4f5c\u4e3a API \u7aef\u70b9\u5728 k8s \u4e0a\u516c\u5f00\u3002.<\/p>","protected":false},"featured_media":65014,"parent":0,"template":"","meta":{"_acf_changed":false,"ep_exclude_from_search":false},"blog-category":[21939],"blog-language":[2991],"class_list":["post-63719","blog","type-blog","status-publish","has-post-thumbnail","hentry","blog-category-medium","blog-language-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/blog\/63719","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/types\/blog"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/media\/65014"}],"wp:attachment":[{"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/media?parent=63719"}],"wp:term":[{"taxonomy":"blog-category","embeddable":true,"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/blog-category?post=63719"},{"taxonomy":"blog-language","embeddable":true,"href":"https:\/\/www.artefact.com\/zh\/wp-json\/wp\/v2\/blog-language?post=63719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}