{"id":495,"date":"2019-12-09T14:02:54","date_gmt":"2019-12-09T06:02:54","guid":{"rendered":"https:\/\/www.myway5.com\/?p=495"},"modified":"2023-07-05T21:37:51","modified_gmt":"2023-07-05T13:37:51","slug":"tensorflow-serving","status":"publish","type":"post","link":"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/","title":{"rendered":"tensorflow-serving \u5728k8s\u4e2d\u7684\u6a21\u578b\u90e8\u7f72\u65b9\u6848"},"content":{"rendered":"<h2>\u7b80\u4ecb<\/h2>\n<p>tensorflow-serving\u662f\u4e00\u4e2atensorflow\u6a21\u578b\u90e8\u7f72\u7684\u65b9\u6848\uff0c\u5176\u5728\u8bbe\u8ba1\u65f6\uff0c\u5c31\u8003\u8651\u4e86\u975e\u5e38\u7075\u6d3b\u7684\u8bbe\u8ba1\uff0c\u6bd4\u5982\uff1a<\/p>\n<ul>\n<li>\u652f\u6301\u4e0d\u540c\u7684\u6587\u4ef6\u7cfb\u7edf\uff0c\u5e76\u4e14\u6613\u6269\u5c55<\/li>\n<li>\u5c06\u6a21\u578b\u53d1\u73b0\u3001\u52a0\u8f7d\u3001\u4f7f\u7528\u548c\u5378\u8f7d\u548c\u6a21\u578b\u751f\u547d\u5468\u671f\u7684\u7ba1\u7406\uff0c\u4ee5\u53ca\u5bf9\u5916\u63d0\u4f9b\u670d\u52a1\u89e3\u8026\u5408\uff0c\u56e0\u6b64\u975e\u5e38\u5bb9\u6613\u6269\u5c55\u5b83\u7684\u6a21\u578b\u53d1\u73b0\u65b9\u5f0f\uff0c\u4ee5\u53ca\u540c\u6837\u53ef\u4ee5\u652f\u6301\u5176\u4ed6\u6846\u67b6\u4e0b\u6a21\u578b\u7684\u6574\u5408\u3002<\/li>\n<li>\u6574\u4e2a\u670d\u52a1\u662f\u65e0\u72b6\u6001\u7684\uff0c\u56e0\u6b64\u65b9\u4fbf\u5728k8s\u4e0a\u8fdb\u884c\u90e8\u7f72<\/li>\n<\/ul>\n<p>\u4e0b\u56fe\u662f tensorflow serving \u7684\u6574\u4f53\u67b6\u6784:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.myway5.com\/wp-content\/uploads\/2019\/12\/serving_architecture.svg\" alt=\"tensorflow serving architecture\" \/><\/p>\n<h2>\u6a21\u578b\u52a0\u8f7d\u65b9\u5f0f<\/h2>\n<p>tensorflow-serving\u652f\u6301\u4ece\u4e0d\u540c\u7684\u5730\u65b9\uff0c\u4ee5\u4e0d\u540c\u7684\u65b9\u5f0f\u53bb\u52a0\u8f7d\u6a21\u578b\u3002\u6bd4\u5982\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u5728\u542f\u52a8tensorflow-serving\u65f6\u52a0\u4e0a\u6a21\u578b\u7684\u5730\u5740\uff0c\u4e5f\u53ef\u4ee5\u63d0\u4f9b\u6a21\u578b\u914d\u7f6e\u6587\u4ef6\u6765\u542f\u52a8\u670d\u52a1\u3002<\/p>\n<p>\u542f\u52a8\u65f6\u52a0\u4e0a\u53c2\u6570:<\/p>\n<pre><code class=\"line-numbers\">tensorflow_model_server --port=9000 --rest_api_port=8500 --model_name=resnet --model_base_path=\/home\/jiang\/data\/yolov3\n<\/code><\/pre>\n<p>\u4ece\u914d\u7f6e\u6587\u4ef6\u4e2d\u52a0\u8f7d\u6a21\u578b:<\/p>\n<p>\/etc\/config\/models.config<\/p>\n<pre><code class=\"line-numbers\">model_config_list {\n    config {\n        name: 'fashion'\n        base_path: 's3:\/\/models\/fashion\/'\n        model_platform: 'tensorflow'\n    }\n    config {\n        name: 'resnet'\n        base_path: 's3:\/\/models\/resnet\/'\n        model_platform: 'tensorflow'\n    }\n}\n<\/code><\/pre>\n<p>\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u52a0\u8f7d<code>fashion<\/code>\u548c<code>resnet<\/code>\u4e24\u4e2a\u6a21\u578b\uff1a<\/p>\n<pre><code class=\"line-numbers\">tensorflow_model_server --port=9000\", \"--rest_api_port=8500\", \"--model_config_file=\/etc\/config\/models.config\"\n<\/code><\/pre>\n<h2>\u6a21\u578b\u5b58\u50a8\u7cfb\u7edf<\/h2>\n<p><code>tensorflow-serving<\/code>\u7684\u53e6\u4e00\u4e2a\u7279\u70b9\u5c31\u662f\u652f\u6301\u4ece\u4e0d\u540c\u7c7b\u578b\u7684\u5b58\u50a8\u7cfb\u7edf\u4e2d\u52a0\u8f7d\u6a21\u578b\u3002\u6bd4\u5982\u672c\u5730\u7684\u6587\u4ef6\u7cfb\u7edf\u3001s3\u3001hdfs\u7b49\u7b49<\/p>\n<p><strong>\u4ece\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\u4e2d\u52a0\u8f7d<\/strong><\/p>\n<pre><code class=\"line-numbers\">tensorflow_model_server --port=9000 --rest_api_port=8500 --model_name=resnet --model_base_path=\/home\/jiang\/data\/yolov3\n<\/code><\/pre>\n<p><strong>\u4eces3\u52a0\u8f7d<\/strong><\/p>\n<p>\u4eces3\uff08\u517c\u5bb9s3\u7684\u5bf9\u8c61\u5b58\u50a8\u7cfb\u7edf\u90fd\u53ef\u4ee5\uff09\u4e2d\u52a0\u8f7d\u6a21\u578b\uff0c\u9700\u8981\u914d\u7f6e\u4e00\u4e9b\u73af\u5883\u53d8\u91cf<\/p>\n<pre><code class=\"line-numbers\">export AWS_ACCESS_KEY_ID=&lt;key id&gt;\nexport AWS_SECRET_ACCESS_KEY=&lt;key&gt;\nexport S3_ENDPOINT=minio-service.minio:9000\nexport S3_USE_HTTPS=0\nexport S3_VERIFY_SSL=0\nexport AWS_REGION=us-west-1\nexport S3_REGION=us-west-1\nexport AWS_LOG_LEVEL=3\n<\/code><\/pre>\n<p>\u7136\u540e\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8\u670d\u52a1\u5373\u53ef<\/p>\n<pre><code class=\"line-numbers\">tensorflow_model_server --port=9000 --rest_api_port=8500 --model_name=resnet --model_base_path=s3:\/\/models\/resnet\/\n<\/code><\/pre>\n<p><strong>\u4ecehdfs\u4e2d\u52a0\u8f7d<\/strong><\/p>\n<p>\u4ecehdfs\u4e2d\u52a0\u8f7d\u9700\u8981\u8bbe\u7f6e\u4ee5\u4e0b\u7684\u73af\u5883\u53d8\u91cf<\/p>\n<ul>\n<li><code>JAVA_HOME<\/code>:  Java \u7684\u5b89\u88c5\u8def\u5f84<\/p>\n<\/li>\n<li>\n<p><code>HADOOP_HDFS_HOME<\/code>: HDFS \u7684\u5b89\u88c5\u8def\u5f84\uff0c\u5982\u679c\u5728LD_LIBRARY_PATH\u4e2d\u8bbe\u7f6e\u4e86 <code>libhdfs.so<\/code> \u7684\u8def\u5f84\uff0c\u90a3\u4e48\u8fd9\u4e2a\u73af\u5883\u53d8\u91cf\u53ef\u4ee5\u4e0d\u8981\u3002<\/p>\n<\/li>\n<li>\n<p><code>LD_LIBRARY_PATH<\/code>: \u5f15\u5165 <code>libjvm.so<\/code> \u7684\u8def\u5f84\u3002\u5982\u679c\u4f60\u7684 HADOOP \u53d1\u884c\u7248\u5728 <code>${HADOOP_HDFS_HOME}\/lib\/native<\/code> \u8fd9\u4e2a\u76ee\u5f55\u4e0b\u6ca1\u6709\u5305\u542b <code>libhdfs.so<\/code>\uff0c\u4e5f\u9700\u8981\u5f15\u5165\u5b83\u3002<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"line-numbers\">export LD_LIBRARY_PATH=<span class=\"katex math inline\">{LD_LIBRARY_PATH}:<\/span>{JAVA_HOME}\/jre\/lib\/amd64\/server\n<\/code><\/pre>\n<ul>\n<li><code>CLASSPATH<\/code>: \u6ce8\u610f\u4ec5\u4ec5\u662f\u8bbe\u7f6e <code>CLASSPATH<\/code> \u73af\u5883\u53d8\u91cf\u662f\u4e0d\u884c\u7684\uff0c\u9700\u8981\u7528\u4ee5\u4e0b\u7684\u65b9\u5f0f\u4f7f\u7528:<\/li>\n<\/ul>\n<pre><code class=\"line-numbers\">CLASSPATH=<span class=\"katex math inline\">(<\/span>{HADOOP_HDFS_HOME}\/bin\/hadoop classpath --glob) tensorflow_model_server --port=9000 --rest_api_port=8500 --model_name=yolov3 --model_base_path=hdfs:\/\/worknode2:9000\/pipeline\/models\/yolov3\n<\/code><\/pre>\n<h2>\u5728k8s\u4e2d\u90e8\u7f72<\/h2>\n<p><strong>s3<\/strong><\/p>\n<p>tensorflow-serving \u5b98\u65b9\u63d0\u4f9b\u4e86docker\u955c\u50cf\uff0c\u56e0\u6b64\u4f7f\u7528 s3 \u7684\u65b9\u5f0f\u52a0\u8f7d\u6a21\u578b\u90e8\u7f72\u662f\u5f88\u7b80\u5355\u7684\u3002<\/p>\n<pre><code class=\"line-numbers\">apiVersion: extensions\/v1beta1\nkind: Deployment\nmetadata:\n  name: tfserving-deployment\nspec:\n  replicas: 1\n  template:\n    metadata:\n      labels:\n        app: tfserving\n    spec:\n      containers:\n      - name: serving-container\n        image: tensorflow\/serving:1.14.0  \n        ports:\n        - containerPort: 8500\n        - containerPort: 9000\n        env:\n        - name: AWS_ACCESS_KEY_ID\n          value: J5WW5NKKV7AE9S0WZCM1\n        - name: AWS_SECRET_ACCESS_KEY\n          value: TbG0Y6nnUV8nQNLL9n4B3u3UPMMCJvqs2COx3and\n        - name: S3_ENDPOINT\n          value: minio-service.minio:9000\n        - name: S3_USE_HTTPS\n          value: \"0\"\n        - name: S3_VERIFY_SSL\n          value: \"0\"\n        - name: AWS_REGION\n          value: us-west-1\n        - name: S3_REGION\n          value: us-west-1\n        - name: AWS_LOG_LEVEL\n          value: \"3\"\n        command: [\"\/usr\/bin\/tensorflow_model_server\"]\n        args: [\"--port=9000\", \"--rest_api_port=8500\", \"--model_name=resnet\", \"--model_base_path=s3:\/\/models\/resnet\/\"]\n\n---\napiVersion: v1\nkind: Service\nmetadata:\n  labels:\n    run: tf-service \n  name: tf-service\nspec:\n  ports:\n  - name: rest-api-port\n    port: 8500\n    targetPort: 8500\n  - name: grpc-port\n    port: 9000\n    targetPort: 9000\n  selector:\n    app: tfserving \n  type: NodePort\n<\/code><\/pre>\n<p><strong>hdfs<\/strong><\/p>\n<p>\u5728\u5b98\u65b9\u63d0\u4f9b\u7684 docker \u955c\u50cf\u4e2d\uff0c\u5e76\u6ca1\u6709\u6253\u5305 hdfs \u7684\u73af\u5883\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u81ea\u5df1\u6784\u5efa\u4e00\u4e2a\u955c\u50cf:<\/p>\n<p>Dockerfile \u6240\u5728\u76ee\u5f55\u5982\u4e0b:<\/p>\n<pre><code class=\"line-numbers\">hdfs_dockerfile\n\u251c\u2500\u2500 Dockerfile\n\u2514\u2500\u2500 hadoop-2.10.0\n    \u251c\u2500\u2500 bin\n    \u251c\u2500\u2500 etc\n    \u251c\u2500\u2500 include\n    \u251c\u2500\u2500 lib\n    \u251c\u2500\u2500 libexec\n    \u251c\u2500\u2500 LICENSE.txt\n    \u251c\u2500\u2500 logs\n    \u251c\u2500\u2500 NOTICE.txt\n    \u251c\u2500\u2500 README.txt\n    \u251c\u2500\u2500 sbin\n    \u2514\u2500\u2500 share\n<\/code><\/pre>\n<p>Dockerfile \u5982\u4e0b:<\/p>\n<pre><code class=\"line-numbers\">FROM tensorflow\/serving:1.14.0\n\nRUN apt update &amp;&amp; apt install -y openjdk-8-jre\n\nCOPY hadoop-2.10.0 \/root\/hadoop\n\nENV JAVA_HOME \/usr\/lib\/jvm\/java-8-openjdk-amd64\/\nENV HADOOP_HDFS_HOME \/root\/hadoop\nENV LD_LIBRARY_PATH <span class=\"katex math inline\">{LD_LIBRARY_PATH}:<\/span>{JAVA_HOME}\/jre\/lib\/amd64\/server\n\nRUN echo '#!\/bin\/bash \\n\\n\\\nCLASSPATH=<span class=\"katex math inline\">(<\/span>{HADOOP_HDFS_HOME}\/bin\/hadoop classpath --glob) tensorflow_model_server --port=8500 --rest_api_port=9000 \\\n--model_name=<span class=\"katex math inline\">{MODEL_NAME} --model_base_path=<\/span>{MODEL_BASE_PATH}\/<span class=\"katex math inline\">{MODEL_NAME} \\\n\"<\/span>@\"' &gt; \/usr\/bin\/tf_serving_entrypoint.sh \\\n&amp;&amp; chmod +x \/usr\/bin\/tf_serving_entrypoint.sh\n\nEXPOSE 8500\nEXPOSE 9000\nENTRYPOINT [\"\/usr\/bin\/tf_serving_entrypoint.sh\"]\n<\/code><\/pre>\n<p>\u8fdb\u884c\u6784\u5efa:<\/p>\n<pre><code class=\"line-numbers\">docker build -t tensorflow_serving:1.14-hadoop-2.10.0 .\n<\/code><\/pre>\n<p>\u8fd0\u884c:<\/p>\n<pre><code class=\"line-numbers\">docker run -p 9000:9000 --name tensorflow-serving -e MODEL_NAME=yolov3 -e MODEL_BASE_PATH=hdfs:\/\/192.168.50.166:9000\/pipeline\/models -t tensorflow_serving:1.14-hadoop-2.10.0\n<\/code><\/pre>\n<p>\u8fd9\u6837\u5c06\u4e0a\u9762\u7684\u90e8\u7f72\u6587\u4ef6\u7a0d\u5fae\u4fee\u6539\u4e00\u4e0b\u5373\u53ef\u4f7f\u7528\u3002<\/p>\n<pre><code class=\"line-numbers\">apiVersion: extensions\/v1beta1\nkind: Deployment\nmetadata:\n  name: tfserving-deployment\nspec:\n  replicas: 1\n  template:\n    metadata:\n      labels:\n        app: tfserving\n    spec:\n      containers:\n      - name: serving-container\n        image: joyme\/tensorflow_serving:1.14-hadoop-2.10.0\n        ports:\n        - containerPort: 8500\n        - containerPort: 9000\n        env:\n        - name: MODEL_NAME\n          value: yolov3\n        - name: MODEL_BASE_PATH\n          value: hdfs:\/\/192.168.50.166:9000\/pipeline\/models\n\n---\napiVersion: v1\nkind: Service\nmetadata:\n  labels:\n    run: tf-service \n  name: tf-service\nspec:\n  ports:\n  - name: rest-api-port\n    port: 8500\n    targetPort: 8500\n  - name: grpc-port\n    port: 9000\n    targetPort: 9000\n  selector:\n    app: tfserving \n  type: NodePort\n<\/code><\/pre>\n<h2>\u6a21\u578b\u8c03\u7528<\/h2>\n<p>tensorflow-serving \u652f\u6301\u4e24\u79cd\u65b9\u5f0f\u8c03\u7528\u6a21\u578b\u8fdb\u884c\u9884\u6d4b: GRPC \u548c RESTful api<\/p>\n<p>GRPC\u7684\u65b9\u5f0f\u5982\u4e0b:<\/p>\n<pre><code class=\"line-numbers\">from __future__ import print_function\n\nimport grpc\nimport requests\nimport tensorflow as tf\n\nfrom tensorflow_serving.apis import predict_pb2\nfrom tensorflow_serving.apis import prediction_service_pb2_grpc\n\nIMAGE_URL = 'https:\/\/tensorflow.org\/images\/blogs\/serving\/cat.jpg'\n\ntf.app.flags.DEFINE_string('server', '192.168.50.201:30806', 'PredictionService host:port')\ntf.app.flags.DEFINE_string('image', '', 'path to image in jpeg format')\nFLAGS = tf.app.flags.FLAGS\n\ndef main(_):\n    if FLAGS.image:\n        with open(FLAGS.image, 'rb') as f:\n            data = f.read()\n    else:\n        dl_request = requests.get(IMAGE_URL, stream=True)\n        dl_request.raise_for_status()\n        data = dl_request.content\n\n    channel = grpc.insecure_channel(FLAGS.server)\n    stub = prediction_service_pb2_grpc.PredictionServiceStub(channel)\n\n    # Send request\n    request = predict_pb2.PredictRequest()\n    request.model_spec.name = 'resnet'\n    request.model_spec.signature_name = 'serving_default'\n    request.inputs['image_bytes'].CopyFrom(\n            tf.contrib.util.make_tensor_proto(data, shape=[1]))\n\n    result = stub.Predict(request, 10.0) # 10 secs timeout\n    print(result)\n\nif __name__ == '__main__':\n    tf.app.run()\n<\/code><\/pre>\n<p>RESTful API\u7684\u65b9\u5f0f\u5982\u4e0b<\/p>\n<pre><code class=\"line-numbers\">import requests\nimport json\nimport base64\n\nwith open(\"cat.jpg\", \"rb\") as image_file:\n    encoded_string = base64.b64encode(image_file.read())\n\nheaders = {\"content-type\": \"application\/json\"}\nbody = {\n        \"instances\": [\n            {'b64': encoded_string}\n           ]\n        }\nr = requests.post('http:\/\/192.168.50.201:32063\/v1\/models\/resnet:predict', data = json.dumps(body), headers = headers)\n\nprint(r.text)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u4ecb tensorflow-serving\u662f\u4e00\u4e2atensorflow\u6a21\u578b\u90e8\u7f72\u7684\u65b9\u6848\uff0c\u5176\u5728\u8bbe\u8ba1\u65f6\uff0c\u5c31\u8003\u8651\u4e86\u975e\u5e38\u7075 &hellip; <a href=\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">tensorflow-serving \u5728k8s\u4e2d\u7684\u6a21\u578b\u90e8\u7f72\u65b9\u6848<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[89,100],"tags":[],"class_list":["post-495","post","type-post","status-publish","format-standard","hentry","category-k8s","category-tensorflow"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>tensorflow-serving \u5728k8s\u4e2d\u7684\u6a21\u578b\u90e8\u7f72\u65b9\u6848 - \u4e00\u53ea\u5b89\u9759\u7684\u732b<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"tensorflow-serving \u5728k8s\u4e2d\u7684\u6a21\u578b\u90e8\u7f72\u65b9\u6848 - \u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"og:description\" content=\"\u7b80\u4ecb tensorflow-serving\u662f\u4e00\u4e2atensorflow\u6a21\u578b\u90e8\u7f72\u7684\u65b9\u6848\uff0c\u5176\u5728\u8bbe\u8ba1\u65f6\uff0c\u5c31\u8003\u8651\u4e86\u975e\u5e38\u7075 &hellip; \u7ee7\u7eed\u9605\u8bfbtensorflow-serving \u5728k8s\u4e2d\u7684\u6a21\u578b\u90e8\u7f72\u65b9\u6848\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/\" \/>\n<meta property=\"og:site_name\" content=\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\" \/>\n<meta property=\"article:published_time\" content=\"2019-12-09T06:02:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-05T13:37:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.myway5.com\/wp-content\/uploads\/2019\/12\/serving_architecture.svg\" \/>\n<meta name=\"author\" content=\"jiangpengfei\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"jiangpengfei\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/\"},\"author\":{\"name\":\"jiangpengfei\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"headline\":\"tensorflow-serving \u5728k8s\u4e2d\u7684\u6a21\u578b\u90e8\u7f72\u65b9\u6848\",\"datePublished\":\"2019-12-09T06:02:54+00:00\",\"dateModified\":\"2023-07-05T13:37:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/\"},\"wordCount\":46,\"commentCount\":6,\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"image\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2019\/12\/serving_architecture.svg\",\"articleSection\":[\"k8s\",\"tensorflow\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/\",\"url\":\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/\",\"name\":\"tensorflow-serving \u5728k8s\u4e2d\u7684\u6a21\u578b\u90e8\u7f72\u65b9\u6848 - \u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"isPartOf\":{\"@id\":\"https:\/\/www.myway5.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2019\/12\/serving_architecture.svg\",\"datePublished\":\"2019-12-09T06:02:54+00:00\",\"dateModified\":\"2023-07-05T13:37:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#primaryimage\",\"url\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2019\/12\/serving_architecture.svg\",\"contentUrl\":\"https:\/\/www.myway5.com\/wp-content\/uploads\/2019\/12\/serving_architecture.svg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.myway5.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"tensorflow-serving \u5728k8s\u4e2d\u7684\u6a21\u578b\u90e8\u7f72\u65b9\u6848\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.myway5.com\/#website\",\"url\":\"https:\/\/www.myway5.com\/\",\"name\":\"\u4e00\u53ea\u5b89\u9759\u7684\u732b\",\"description\":\"\u60f3\u5565\u5462\",\"publisher\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.myway5.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685\",\"name\":\"jiangpengfei\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g\",\"caption\":\"jiangpengfei\"},\"logo\":{\"@id\":\"https:\/\/www.myway5.com\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.myway5.com\/index.php\/author\/joyme\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"tensorflow-serving \u5728k8s\u4e2d\u7684\u6a21\u578b\u90e8\u7f72\u65b9\u6848 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/","og_locale":"zh_CN","og_type":"article","og_title":"tensorflow-serving \u5728k8s\u4e2d\u7684\u6a21\u578b\u90e8\u7f72\u65b9\u6848 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","og_description":"\u7b80\u4ecb tensorflow-serving\u662f\u4e00\u4e2atensorflow\u6a21\u578b\u90e8\u7f72\u7684\u65b9\u6848\uff0c\u5176\u5728\u8bbe\u8ba1\u65f6\uff0c\u5c31\u8003\u8651\u4e86\u975e\u5e38\u7075 &hellip; \u7ee7\u7eed\u9605\u8bfbtensorflow-serving \u5728k8s\u4e2d\u7684\u6a21\u578b\u90e8\u7f72\u65b9\u6848","og_url":"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/","og_site_name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","article_published_time":"2019-12-09T06:02:54+00:00","article_modified_time":"2023-07-05T13:37:51+00:00","og_image":[{"url":"https:\/\/www.myway5.com\/wp-content\/uploads\/2019\/12\/serving_architecture.svg","type":"","width":"","height":""}],"author":"jiangpengfei","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"jiangpengfei","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#article","isPartOf":{"@id":"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/"},"author":{"name":"jiangpengfei","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"headline":"tensorflow-serving \u5728k8s\u4e2d\u7684\u6a21\u578b\u90e8\u7f72\u65b9\u6848","datePublished":"2019-12-09T06:02:54+00:00","dateModified":"2023-07-05T13:37:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/"},"wordCount":46,"commentCount":6,"publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"image":{"@id":"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#primaryimage"},"thumbnailUrl":"https:\/\/www.myway5.com\/wp-content\/uploads\/2019\/12\/serving_architecture.svg","articleSection":["k8s","tensorflow"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/","url":"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/","name":"tensorflow-serving \u5728k8s\u4e2d\u7684\u6a21\u578b\u90e8\u7f72\u65b9\u6848 - \u4e00\u53ea\u5b89\u9759\u7684\u732b","isPartOf":{"@id":"https:\/\/www.myway5.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#primaryimage"},"image":{"@id":"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#primaryimage"},"thumbnailUrl":"https:\/\/www.myway5.com\/wp-content\/uploads\/2019\/12\/serving_architecture.svg","datePublished":"2019-12-09T06:02:54+00:00","dateModified":"2023-07-05T13:37:51+00:00","breadcrumb":{"@id":"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#primaryimage","url":"https:\/\/www.myway5.com\/wp-content\/uploads\/2019\/12\/serving_architecture.svg","contentUrl":"https:\/\/www.myway5.com\/wp-content\/uploads\/2019\/12\/serving_architecture.svg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.myway5.com\/index.php\/2019\/12\/09\/tensorflow-serving\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.myway5.com\/"},{"@type":"ListItem","position":2,"name":"tensorflow-serving \u5728k8s\u4e2d\u7684\u6a21\u578b\u90e8\u7f72\u65b9\u6848"}]},{"@type":"WebSite","@id":"https:\/\/www.myway5.com\/#website","url":"https:\/\/www.myway5.com\/","name":"\u4e00\u53ea\u5b89\u9759\u7684\u732b","description":"\u60f3\u5565\u5462","publisher":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.myway5.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/b19267e8b106343431e163ec96950685","name":"jiangpengfei","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.myway5.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8c7de757f6e0247412bcfd31b7c2271?s=96&d=monsterid&r=g","caption":"jiangpengfei"},"logo":{"@id":"https:\/\/www.myway5.com\/#\/schema\/person\/image\/"},"url":"https:\/\/www.myway5.com\/index.php\/author\/joyme\/"}]}},"views":7626,"_links":{"self":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/comments?post=495"}],"version-history":[{"count":1,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/495\/revisions"}],"predecessor-version":[{"id":1567,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/posts\/495\/revisions\/1567"}],"wp:attachment":[{"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/media?parent=495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/categories?post=495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myway5.com\/index.php\/wp-json\/wp\/v2\/tags?post=495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}