{"id":87877,"date":"2026-07-31T02:56:36","date_gmt":"2026-07-30T18:56:36","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/87877.html"},"modified":"2026-07-31T02:56:36","modified_gmt":"2026-07-30T18:56:36","slug":"qwen3-vl-8b%e5%bc%80%e6%ba%90%e9%83%a8%e7%bd%b2%e6%95%99%e7%a8%8b%ef%bc%9aansible%e8%87%aa%e5%8a%a8%e5%8c%96%e8%84%9a%e6%9c%ac%e5%ae%9e%e7%8e%b010%e5%8f%b0%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%89%b9%e9%87%8f","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/87877.html","title":{"rendered":"Qwen3-VL-8B\u5f00\u6e90\u90e8\u7f72\u6559\u7a0b\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b010\u53f0\u670d\u52a1\u5668\u6279\u91cf\u90e8\u7f72"},"content":{"rendered":"<h2>Qwen3-VL-8B\u5f00\u6e90\u90e8\u7f72\u6559\u7a0b&#xff1a;Ansible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b010\u53f0\u670d\u52a1\u5668\u6279\u91cf\u90e8\u7f72<\/h2>\n<h3>1. \u5f15\u8a00<\/h3>\n<p>\u60f3\u8c61\u4e00\u4e0b&#xff0c;\u4f60\u9700\u8981\u572810\u53f0\u670d\u52a1\u5668\u4e0a\u90e8\u7f72\u4e00\u4e2a\u5b8c\u6574\u7684AI\u804a\u5929\u7cfb\u7edf\u3002\u6bcf\u53f0\u670d\u52a1\u5668\u90fd\u8981\u5b89\u88c5Python\u73af\u5883\u3001\u4e0b\u8f7d\u51e0\u5341GB\u7684\u6a21\u578b\u6587\u4ef6\u3001\u914d\u7f6evLLM\u63a8\u7406\u5f15\u64ce\u3001\u8bbe\u7f6e\u53cd\u5411\u4ee3\u7406\u3001\u90e8\u7f72\u524d\u7aef\u754c\u9762\u2026\u2026\u5982\u679c\u624b\u52a8\u64cd\u4f5c&#xff0c;\u4e00\u53f0\u670d\u52a1\u5668\u53ef\u80fd\u5c31\u8981\u6298\u817e\u534a\u5929&#xff0c;10\u53f0\u670d\u52a1\u5668\u7b80\u76f4\u662f\u4e2a\u5669\u68a6\u3002<\/p>\n<p>\u8fd9\u5c31\u662f\u6211\u4eec\u4eca\u5929\u8981\u89e3\u51b3\u7684\u95ee\u9898\u3002\u6211\u5c06\u5206\u4eab\u4e00\u4e2a\u57fa\u4e8eAnsible\u7684\u81ea\u52a8\u5316\u90e8\u7f72\u65b9\u6848&#xff0c;\u8ba9\u4f60\u7528\u4e00\u6761\u547d\u4ee4\u5c31\u80fd\u572810\u53f0\u3001\u751a\u81f3100\u53f0\u670d\u52a1\u5668\u4e0a\u6279\u91cf\u90e8\u7f72Qwen3-VL-8B AI\u804a\u5929\u7cfb\u7edf\u3002\u65e0\u8bba\u4f60\u662f\u4f01\u4e1aIT\u8fd0\u7ef4\u3001AI\u5b9e\u9a8c\u5ba4\u7ba1\u7406\u5458&#xff0c;\u8fd8\u662f\u9700\u8981\u7ba1\u7406\u591a\u53f0GPU\u670d\u52a1\u5668\u7684\u5f00\u53d1\u8005&#xff0c;\u8fd9\u5957\u65b9\u6848\u90fd\u80fd\u5e2e\u4f60\u8282\u7701\u5927\u91cf\u65f6\u95f4\u548c\u7cbe\u529b\u3002<\/p>\n<p>\u901a\u8fc7\u672c\u6559\u7a0b&#xff0c;\u4f60\u5c06\u5b66\u4f1a&#xff1a;<\/p>\n<ul>\n<li>\u5982\u4f55\u51c6\u5907Ansible\u81ea\u52a8\u5316\u90e8\u7f72\u73af\u5883<\/li>\n<li>\u5982\u4f55\u7f16\u5199\u6279\u91cf\u90e8\u7f72\u7684Playbook\u811a\u672c<\/li>\n<li>\u5982\u4f55\u4e00\u952e\u572810\u53f0\u670d\u52a1\u5668\u4e0a\u90e8\u7f72\u5b8c\u6574\u7684AI\u804a\u5929\u7cfb\u7edf<\/li>\n<li>\u5982\u4f55\u76d1\u63a7\u548c\u7ba1\u7406\u6279\u91cf\u90e8\u7f72\u7684\u96c6\u7fa4<\/li>\n<\/ul>\n<h3>2. \u7cfb\u7edf\u67b6\u6784\u4e0e\u90e8\u7f72\u6311\u6218<\/h3>\n<h4>2.1 Qwen3-VL-8B\u804a\u5929\u7cfb\u7edf\u67b6\u6784<\/h4>\n<p>\u5728\u5f00\u59cb\u81ea\u52a8\u5316\u90e8\u7f72\u4e4b\u524d&#xff0c;\u6211\u4eec\u5148\u4e86\u89e3\u4e00\u4e0b\u8981\u90e8\u7f72\u7684\u7cfb\u7edf\u67b6\u6784\u3002\u8fd9\u4e2aAI\u804a\u5929\u7cfb\u7edf\u5305\u542b\u4e09\u4e2a\u6838\u5fc3\u7ec4\u4ef6&#xff1a;<\/p>\n<p>\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502  \u6d4f\u89c8\u5668\u5ba2\u6237\u7aef  \u2502<br \/>\n\u2502 (chat.html) \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>\n       \u2502 HTTP<br \/>\n       \u2193<br \/>\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502  \u4ee3\u7406\u670d\u52a1\u5668       \u2502<br \/>\n\u2502 (proxy_server)  \u2502  \u2190 \u7aef\u53e3 8000<br \/>\n\u2502  &#8211; \u9759\u6001\u6587\u4ef6\u670d\u52a1   \u2502<br \/>\n\u2502  &#8211; API \u8bf7\u6c42\u8f6c\u53d1  \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>\n       \u2502 HTTP<br \/>\n       \u2193<br \/>\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502  vLLM \u63a8\u7406\u5f15\u64ce   \u2502  \u2190 \u7aef\u53e3 3001<br \/>\n\u2502  &#8211; \u6a21\u578b\u52a0\u8f7d      \u2502<br \/>\n\u2502  &#8211; \u63a8\u7406\u8ba1\u7b97      \u2502<br \/>\n\u2502  &#8211; OpenAI API   \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/p>\n<p>\u7ec4\u4ef6\u8bf4\u660e&#xff1a;<\/p>\n<li>\u524d\u7aef\u754c\u9762&#xff1a;\u57fa\u4e8eHTML\/CSS\/JS\u7684\u804a\u5929\u754c\u9762&#xff0c;\u63d0\u4f9b\u7528\u6237\u4ea4\u4e92<\/li>\n<li>\u4ee3\u7406\u670d\u52a1\u5668&#xff1a;\u5904\u7406\u9759\u6001\u6587\u4ef6\u670d\u52a1\u548cAPI\u8bf7\u6c42\u8f6c\u53d1<\/li>\n<li>vLLM\u63a8\u7406\u5f15\u64ce&#xff1a;\u8fd0\u884cQwen3-VL-8B\u6a21\u578b&#xff0c;\u63d0\u4f9bAI\u5bf9\u8bdd\u80fd\u529b<\/li>\n<h4>2.2 \u6279\u91cf\u90e8\u7f72\u7684\u4e3b\u8981\u6311\u6218<\/h4>\n<p>\u5728\u591a\u53f0\u670d\u52a1\u5668\u4e0a\u90e8\u7f72\u8fd9\u4e2a\u7cfb\u7edf&#xff0c;\u4f1a\u9047\u5230\u51e0\u4e2a\u5178\u578b\u95ee\u9898&#xff1a;<\/p>\n<p>\u73af\u5883\u5dee\u5f02\u95ee\u9898<\/p>\n<ul>\n<li>\u4e0d\u540c\u670d\u52a1\u5668\u7684Python\u7248\u672c\u53ef\u80fd\u4e0d\u540c<\/li>\n<li>CUDA\u548cGPU\u9a71\u52a8\u7248\u672c\u4e0d\u4e00\u81f4<\/li>\n<li>\u7cfb\u7edf\u4f9d\u8d56\u5305\u7f3a\u5931\u6216\u7248\u672c\u51b2\u7a81<\/li>\n<\/ul>\n<p>\u6a21\u578b\u4e0b\u8f7d\u95ee\u9898<\/p>\n<ul>\n<li>\u6a21\u578b\u6587\u4ef6\u7ea64-5GB&#xff0c;\u6bcf\u53f0\u670d\u52a1\u5668\u90fd\u8981\u4e0b\u8f7d<\/li>\n<li>\u7f51\u7edc\u4e0d\u7a33\u5b9a\u53ef\u80fd\u5bfc\u81f4\u4e0b\u8f7d\u5931\u8d25<\/li>\n<li>\u91cd\u590d\u4e0b\u8f7d\u6d6a\u8d39\u5e26\u5bbd\u548c\u65f6\u95f4<\/li>\n<\/ul>\n<p>\u914d\u7f6e\u7ba1\u7406\u95ee\u9898<\/p>\n<ul>\n<li>\u6bcf\u53f0\u670d\u52a1\u5668\u7684\u7aef\u53e3\u914d\u7f6e\u9700\u8981\u7edf\u4e00<\/li>\n<li>\u670d\u52a1\u542f\u52a8\u811a\u672c\u9700\u8981\u9002\u914d\u4e0d\u540c\u73af\u5883<\/li>\n<li>\u65e5\u5fd7\u548c\u76d1\u63a7\u914d\u7f6e\u9700\u8981\u4fdd\u6301\u4e00\u81f4<\/li>\n<\/ul>\n<p>\u8fd0\u7ef4\u7ba1\u7406\u95ee\u9898<\/p>\n<ul>\n<li>\u5982\u4f55\u6279\u91cf\u542f\u52a8\/\u505c\u6b62\u670d\u52a1<\/li>\n<li>\u5982\u4f55\u7edf\u4e00\u67e5\u770b\u6240\u6709\u670d\u52a1\u5668\u7684\u72b6\u6001<\/li>\n<li>\u5982\u4f55\u6279\u91cf\u66f4\u65b0\u914d\u7f6e\u548c\u4ee3\u7801<\/li>\n<\/ul>\n<h3>3. Ansible\u81ea\u52a8\u5316\u90e8\u7f72\u65b9\u6848\u8bbe\u8ba1<\/h3>\n<h4>3.1 \u4e3a\u4ec0\u4e48\u9009\u62e9Ansible&#xff1f;<\/h4>\n<p>Ansible\u662f\u76ee\u524d\u6700\u6d41\u884c\u7684\u81ea\u52a8\u5316\u8fd0\u7ef4\u5de5\u5177\u4e4b\u4e00&#xff0c;\u7279\u522b\u9002\u5408\u6279\u91cf\u90e8\u7f72\u573a\u666f&#xff1a;<\/p>\n<p>\u65e0\u4ee3\u7406\u67b6\u6784&#xff1a;\u4e0d\u9700\u8981\u5728\u76ee\u6807\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u5ba2\u6237\u7aef&#xff0c;\u901a\u8fc7SSH\u5c31\u80fd\u7ba1\u7406 \u58f0\u660e\u5f0f\u8bed\u6cd5&#xff1a;\u7528YAML\u7f16\u5199Playbook&#xff0c;\u914d\u7f6e\u5373\u4ee3\u7801 \u5e42\u7b49\u6027&#xff1a;\u591a\u6b21\u6267\u884c\u4e0d\u4f1a\u4ea7\u751f\u526f\u4f5c\u7528&#xff0c;\u786e\u4fdd\u90e8\u7f72\u4e00\u81f4\u6027 \u6a21\u5757\u4e30\u5bcc&#xff1a;\u5185\u7f6e\u5927\u91cf\u6a21\u5757&#xff0c;\u8986\u76d6\u7cfb\u7edf\u7ba1\u7406\u3001\u8f6f\u4ef6\u5b89\u88c5\u3001\u6587\u4ef6\u64cd\u4f5c\u7b49<\/p>\n<h4>3.2 \u90e8\u7f72\u6d41\u7a0b\u8bbe\u8ba1<\/h4>\n<p>\u6211\u4eec\u7684\u81ea\u52a8\u5316\u90e8\u7f72\u6d41\u7a0b\u5206\u4e3a\u56db\u4e2a\u9636\u6bb5&#xff1a;<\/p>\n<p>\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502   \u73af\u5883\u51c6\u5907\u9636\u6bb5    \u2502    \u2502   \u4f9d\u8d56\u5b89\u88c5\u9636\u6bb5    \u2502    \u2502   \u7cfb\u7edf\u90e8\u7f72\u9636\u6bb5    \u2502    \u2502   \u9a8c\u8bc1\u6d4b\u8bd5\u9636\u6bb5    \u2502<br \/>\n\u2502 1. \u7cfb\u7edf\u68c0\u67e5      \u2502\u2500\u2500\u2500\u25b6\u2502 2. \u5b89\u88c5Python    \u2502\u2500\u2500\u2500\u25b6\u2502 3. \u4e0b\u8f7d\u6a21\u578b      \u2502\u2500\u2500\u2500\u25b6\u2502 4. \u542f\u52a8\u670d\u52a1      \u2502<br \/>\n\u2502    &#8211; \u7528\u6237\u6743\u9650     \u2502    \u2502    &#8211; pip\u5305      \u2502    \u2502    &#8211; \u914d\u7f6e\u6587\u4ef6     \u2502    \u2502    &#8211; \u7aef\u53e3\u68c0\u67e5     \u2502<br \/>\n\u2502    &#8211; \u78c1\u76d8\u7a7a\u95f4     \u2502    \u2502    &#8211; CUDA\u5de5\u5177   \u2502    \u2502    &#8211; \u524d\u7aef\u6587\u4ef6     \u2502    \u2502    &#8211; \u670d\u52a1\u72b6\u6001     \u2502<br \/>\n\u2502    &#8211; \u7f51\u7edc\u8fde\u63a5     \u2502    \u2502    &#8211; \u7cfb\u7edf\u4f9d\u8d56   \u2502    \u2502    &#8211; \u542f\u52a8\u811a\u672c     \u2502    \u2502    &#8211; \u529f\u80fd\u6d4b\u8bd5     \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<\/p>\n<h4>3.3 \u670d\u52a1\u5668\u6e05\u5355\u8bbe\u8ba1<\/h4>\n<p>\u6211\u4eec\u9700\u8981\u4e00\u4e2a\u670d\u52a1\u5668\u6e05\u5355\u6587\u4ef6\u6765\u7ba1\u7406\u6240\u6709\u8981\u90e8\u7f72\u7684\u673a\u5668\u3002\u6839\u636e\u670d\u52a1\u5668\u914d\u7f6e&#xff0c;\u53ef\u4ee5\u5206\u4e3a\u4e0d\u540c\u7c7b\u578b&#xff1a;<\/p>\n<p># inventory.yml<br \/>\nall:<br \/>\n  vars:<br \/>\n    ansible_user: root<br \/>\n    ansible_ssh_private_key_file: ~\/.ssh\/id_rsa<\/p>\n<p>  children:<br \/>\n    gpu_servers:  # GPU\u670d\u52a1\u5668\u7ec4<br \/>\n      hosts:<br \/>\n        gpu-server-01:<br \/>\n          ansible_host: 192.168.1.101<br \/>\n          gpu_memory: 24GB<br \/>\n        gpu-server-02:<br \/>\n          ansible_host: 192.168.1.102<br \/>\n          gpu_memory: 16GB<\/p>\n<p>    cpu_servers:  # CPU\u670d\u52a1\u5668\u7ec4&#xff08;\u7528\u4e8e\u4ee3\u7406\u670d\u52a1&#xff09;<br \/>\n      hosts:<br \/>\n        proxy-server-01:<br \/>\n          ansible_host: 192.168.1.201<br \/>\n        proxy-server-02:<br \/>\n          ansible_host: 192.168.1.202<\/p>\n<p>    all_servers:  # \u6240\u6709\u670d\u52a1\u5668<br \/>\n      children:<br \/>\n        &#8211; gpu_servers<br \/>\n        &#8211; cpu_servers<\/p>\n<h3>4. Ansible Playbook\u8be6\u7ec6\u5b9e\u73b0<\/h3>\n<h4>4.1 \u4e3b\u90e8\u7f72Playbook<\/h4>\n<p>\u521b\u5efa\u4e00\u4e2a\u4e3b\u90e8\u7f72Playbook\u6587\u4ef6 deploy_qwen.yml&#xff1a;<\/p>\n<p>&#8212;<br \/>\n&#8211; name: \u6279\u91cf\u90e8\u7f72Qwen3-VL-8B AI\u804a\u5929\u7cfb\u7edf<br \/>\n  hosts: all_servers<br \/>\n  become: yes<br \/>\n  vars:<br \/>\n    project_dir: \/root\/build<br \/>\n    model_id: &#034;qwen\/Qwen2-VL-7B-Instruct-GPTQ-Int4&#034;<br \/>\n    model_name: &#034;Qwen3-VL-8B-Instruct-4bit-GPTQ&#034;<br \/>\n    vllm_port: 3001<br \/>\n    web_port: 8000<\/p>\n<p>  tasks:<br \/>\n    &#8211; name: \u68c0\u67e5\u7cfb\u7edf\u73af\u5883<br \/>\n      block:<br \/>\n        &#8211; name: \u68c0\u67e5\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c<br \/>\n          command: cat \/etc\/os-release<br \/>\n          register: os_info<\/p>\n<p>        &#8211; name: \u68c0\u67e5\u78c1\u76d8\u7a7a\u95f4<br \/>\n          shell: df -h \/ | tail -1 | awk &#039;{print $4}&#039;<br \/>\n          register: disk_space<\/p>\n<p>        &#8211; name: \u68c0\u67e5GPU\u72b6\u6001&#xff08;\u4ec5GPU\u670d\u52a1\u5668&#xff09;<br \/>\n          shell: |<br \/>\n            if command -v nvidia-smi &amp;&gt; \/dev\/null; then<br \/>\n              nvidia-smi &#8211;query-gpu&#061;name,memory.total &#8211;format&#061;csv,noheader<br \/>\n            else<br \/>\n              echo &#034;No GPU detected&#034;<br \/>\n            fi<br \/>\n          when: &#034;&#039;gpu_servers&#039; in group_names&#034;<br \/>\n          register: gpu_info<\/p>\n<p>        &#8211; name: \u663e\u793a\u68c0\u67e5\u7ed3\u679c<br \/>\n          debug:<br \/>\n            msg: |<br \/>\n              \u64cd\u4f5c\u7cfb\u7edf: {{ os_info.stdout }}<br \/>\n              \u78c1\u76d8\u7a7a\u95f4: {{ disk_space.stdout }}<br \/>\n              GPU\u4fe1\u606f: {{ gpu_info.stdout if gpu_info is defined else &#039;N\/A&#039; }}<\/p>\n<h4>4.2 \u73af\u5883\u51c6\u5907\u4efb\u52a1<\/h4>\n<p>    &#8211; name: \u5b89\u88c5\u7cfb\u7edf\u4f9d\u8d56<br \/>\n      apt:<br \/>\n        name:<br \/>\n          &#8211; python3-pip<br \/>\n          &#8211; python3-venv<br \/>\n          &#8211; git<br \/>\n          &#8211; wget<br \/>\n          &#8211; curl<br \/>\n          &#8211; supervisor<br \/>\n        state: present<br \/>\n        update_cache: yes<br \/>\n      when: ansible_os_family &#061;&#061; &#034;Debian&#034;<\/p>\n<p>    &#8211; name: \u4e3aCentOS\u5b89\u88c5\u4f9d\u8d56<br \/>\n      yum:<br \/>\n        name:<br \/>\n          &#8211; python3-pip<br \/>\n          &#8211; git<br \/>\n          &#8211; wget<br \/>\n          &#8211; curl<br \/>\n          &#8211; supervisor<br \/>\n        state: present<br \/>\n      when: ansible_os_family &#061;&#061; &#034;RedHat&#034;<\/p>\n<p>    &#8211; name: \u521b\u5efa\u9879\u76ee\u76ee\u5f55<br \/>\n      file:<br \/>\n        path: &#034;{{ project_dir }}&#034;<br \/>\n        state: directory<br \/>\n        mode: &#039;0755&#039;<\/p>\n<h4>4.3 \u6a21\u578b\u4e0b\u8f7d\u4f18\u5316<\/h4>\n<p>\u6a21\u578b\u4e0b\u8f7d\u662f\u90e8\u7f72\u4e2d\u6700\u8017\u65f6\u7684\u73af\u8282\u3002\u6211\u4eec\u91c7\u7528\u4e24\u79cd\u4f18\u5316\u7b56\u7565&#xff1a;<\/p>\n<p>\u7b56\u75651&#xff1a;\u672c\u5730\u7f13\u5b58\u670d\u52a1\u5668 \u5982\u679c\u6709\u591a\u53f0\u670d\u52a1\u5668\u5728\u540c\u4e00\u4e2a\u5185\u7f51&#xff0c;\u53ef\u4ee5\u5148\u5728\u4e00\u53f0\u670d\u52a1\u5668\u4e0b\u8f7d\u6a21\u578b&#xff0c;\u7136\u540e\u901a\u8fc7\u5185\u7f51\u4f20\u8f93\u5230\u5176\u4ed6\u670d\u52a1\u5668\u3002<\/p>\n<p>    &#8211; name: \u68c0\u67e5\u6a21\u578b\u662f\u5426\u5df2\u5b58\u5728<br \/>\n      stat:<br \/>\n        path: &#034;{{ project_dir }}\/qwen\/model.safetensors&#034;<br \/>\n      register: model_file<\/p>\n<p>    &#8211; name: \u4ece\u7f13\u5b58\u670d\u52a1\u5668\u4e0b\u8f7d\u6a21\u578b&#xff08;\u5982\u679c\u5b58\u5728&#xff09;<br \/>\n      get_url:<br \/>\n        url: &#034;http:\/\/cache-server:8080\/models\/{{ model_id }}.tar.gz&#034;<br \/>\n        dest: &#034;{{ project_dir }}\/model_cache.tar.gz&#034;<br \/>\n        mode: &#039;0644&#039;<br \/>\n      when: not model_file.stat.exists and cache_server_available<\/p>\n<p>    &#8211; name: \u89e3\u538b\u7f13\u5b58\u6a21\u578b<br \/>\n      unarchive:<br \/>\n        src: &#034;{{ project_dir }}\/model_cache.tar.gz&#034;<br \/>\n        dest: &#034;{{ project_dir }}\/qwen&#034;<br \/>\n        remote_src: yes<br \/>\n      when: not model_file.stat.exists and cache_server_available<\/p>\n<p>    &#8211; name: \u4eceModelScope\u4e0b\u8f7d\u6a21\u578b&#xff08;\u5907\u7528\u65b9\u6848&#xff09;<br \/>\n      shell: |<br \/>\n        cd {{ project_dir }}<br \/>\n        python3 -c &#034;<br \/>\n        from modelscope import snapshot_download<br \/>\n        snapshot_download(&#039;{{ model_id }}&#039;,<br \/>\n                         cache_dir&#061;&#039;{{ project_dir }}\/qwen&#039;,<br \/>\n                         local_files_only&#061;False)<br \/>\n        &#034;<br \/>\n      when: not model_file.stat.exists and not cache_server_available<br \/>\n      async: 3600  # \u5f02\u6b65\u6267\u884c&#xff0c;\u6700\u591a\u7b49\u5f851\u5c0f\u65f6<br \/>\n      poll: 30     # \u6bcf30\u79d2\u68c0\u67e5\u4e00\u6b21<\/p>\n<p>\u7b56\u75652&#xff1a;\u5e76\u884c\u4e0b\u8f7d \u5bf9\u4e8e\u6ca1\u6709\u7f13\u5b58\u670d\u52a1\u5668\u7684\u60c5\u51b5&#xff0c;\u6211\u4eec\u53ef\u4ee5\u5728\u591a\u53f0\u670d\u52a1\u5668\u4e0a\u5e76\u884c\u4e0b\u8f7d&#xff0c;\u4f46\u9700\u8981\u63a7\u5236\u5e76\u53d1\u6570\u907f\u514d\u7f51\u7edc\u62e5\u5835\u3002<\/p>\n<h4>4.4 \u670d\u52a1\u90e8\u7f72\u914d\u7f6e<\/h4>\n<p>    &#8211; name: \u90e8\u7f72\u524d\u7aef\u6587\u4ef6<br \/>\n      copy:<br \/>\n        src: &#034;files\/chat.html&#034;<br \/>\n        dest: &#034;{{ project_dir }}\/chat.html&#034;<br \/>\n        mode: &#039;0644&#039;<\/p>\n<p>    &#8211; name: \u90e8\u7f72\u4ee3\u7406\u670d\u52a1\u5668<br \/>\n      template:<br \/>\n        src: &#034;templates\/proxy_server.py.j2&#034;<br \/>\n        dest: &#034;{{ project_dir }}\/proxy_server.py&#034;<br \/>\n        mode: &#039;0755&#039;<br \/>\n      vars:<br \/>\n        vllm_host: &#034;localhost&#034;<br \/>\n        vllm_port: &#034;{{ vllm_port }}&#034;<br \/>\n        web_port: &#034;{{ web_port }}&#034;<\/p>\n<p>    &#8211; name: \u90e8\u7f72\u542f\u52a8\u811a\u672c<br \/>\n      copy:<br \/>\n        src: &#034;scripts\/start_all.sh&#034;<br \/>\n        dest: &#034;{{ project_dir }}\/start_all.sh&#034;<br \/>\n        mode: &#039;0755&#039;<\/p>\n<p>    &#8211; name: \u914d\u7f6eSupervisor\u670d\u52a1<br \/>\n      template:<br \/>\n        src: &#034;templates\/qwen-chat.conf.j2&#034;<br \/>\n        dest: &#034;\/etc\/supervisor\/conf.d\/qwen-chat.conf&#034;<br \/>\n        mode: &#039;0644&#039;<\/p>\n<p>    &#8211; name: \u91cd\u8f7dSupervisor\u914d\u7f6e<br \/>\n      shell: supervisorctl reread &amp;&amp; supervisorctl update<\/p>\n<p>    &#8211; name: \u542f\u52a8Qwen\u804a\u5929\u670d\u52a1<br \/>\n      supervisorctl:<br \/>\n        name: qwen-chat<br \/>\n        state: started<\/p>\n<h4>4.5 \u4ee3\u7406\u670d\u52a1\u5668\u6a21\u677f<\/h4>\n<p>\u521b\u5efa\u6a21\u677f\u6587\u4ef6 templates\/proxy_server.py.j2&#xff1a;<\/p>\n<p>#!\/usr\/bin\/env python3<br \/>\nimport http.server<br \/>\nimport socketserver<br \/>\nimport requests<br \/>\nimport json<br \/>\nimport logging<br \/>\nfrom urllib.parse import urlparse<\/p>\n<p># \u914d\u7f6e\u53c2\u6570<br \/>\nVLLM_HOST &#061; &#034;{{ vllm_host }}&#034;<br \/>\nVLLM_PORT &#061; {{ vllm_port }}<br \/>\nWEB_PORT &#061; {{ web_port }}<\/p>\n<p>logging.basicConfig(<br \/>\n    level&#061;logging.INFO,<br \/>\n    format&#061;&#039;%(asctime)s &#8211; %(levelname)s &#8211; %(message)s&#039;<br \/>\n)<br \/>\nlogger &#061; logging.getLogger(__name__)<\/p>\n<p>class ProxyHandler(http.server.SimpleHTTPRequestHandler):<br \/>\n    def do_GET(self):<br \/>\n        # \u5904\u7406\u9759\u6001\u6587\u4ef6\u8bf7\u6c42<br \/>\n        if self.path &#061;&#061; &#039;\/&#039; or self.path &#061;&#061; &#039;\/chat.html&#039;:<br \/>\n            self.path &#061; &#039;\/chat.html&#039;<br \/>\n            return super().do_GET()<br \/>\n        elif self.path.endswith(&#039;.js&#039;) or self.path.endswith(&#039;.css&#039;):<br \/>\n            return super().do_GET()<br \/>\n        else:<br \/>\n            self.send_error(404, &#034;File not found&#034;)<\/p>\n<p>    def do_POST(self):<br \/>\n        # \u8f6c\u53d1API\u8bf7\u6c42\u5230vLLM<br \/>\n        if self.path &#061;&#061; &#039;\/v1\/chat\/completions&#039;:<br \/>\n            content_length &#061; int(self.headers[&#039;Content-Length&#039;])<br \/>\n            post_data &#061; self.rfile.read(content_length)<\/p>\n<p>            try:<br \/>\n                # \u8f6c\u53d1\u8bf7\u6c42\u5230vLLM<br \/>\n                vllm_url &#061; f&#034;http:\/\/{VLLM_HOST}:{VLLM_PORT}\/v1\/chat\/completions&#034;<br \/>\n                response &#061; requests.post(<br \/>\n                    vllm_url,<br \/>\n                    data&#061;post_data,<br \/>\n                    headers&#061;{&#039;Content-Type&#039;: &#039;application\/json&#039;},<br \/>\n                    timeout&#061;30<br \/>\n                )<\/p>\n<p>                # \u8fd4\u56de\u54cd\u5e94<br \/>\n                self.send_response(response.status_code)<br \/>\n                self.send_header(&#039;Content-Type&#039;, &#039;application\/json&#039;)<br \/>\n                self.send_header(&#039;Access-Control-Allow-Origin&#039;, &#039;*&#039;)<br \/>\n                self.end_headers()<br \/>\n                self.wfile.write(response.content)<\/p>\n<p>                logger.info(f&#034;Forwarded request to vLLM, status: {response.status_code}&#034;)<\/p>\n<p>            except Exception as e:<br \/>\n                logger.error(f&#034;Error forwarding request: {e}&#034;)<br \/>\n                self.send_error(500, f&#034;Internal Server Error: {str(e)}&#034;)<br \/>\n        else:<br \/>\n            self.send_error(404, &#034;API endpoint not found&#034;)<\/p>\n<p>if __name__ &#061;&#061; &#034;__main__&#034;:<br \/>\n    with socketserver.TCPServer((&#034;&#034;, WEB_PORT), ProxyHandler) as httpd:<br \/>\n        logger.info(f&#034;Proxy server started on port {WEB_PORT}&#034;)<br \/>\n        logger.info(f&#034;vLLM backend: {VLLM_HOST}:{VLLM_PORT}&#034;)<br \/>\n        httpd.serve_forever()<\/p>\n<h3>5. \u6279\u91cf\u90e8\u7f72\u6267\u884c\u4e0e\u7ba1\u7406<\/h3>\n<h4>5.1 \u6267\u884c\u6279\u91cf\u90e8\u7f72<\/h4>\n<p>\u51c6\u5907\u597d\u6240\u6709Playbook\u548c\u914d\u7f6e\u6587\u4ef6\u540e&#xff0c;\u6267\u884c\u90e8\u7f72\u547d\u4ee4&#xff1a;<\/p>\n<p># 1. \u6d4b\u8bd5\u8fde\u63a5\u6240\u6709\u670d\u52a1\u5668<br \/>\nansible all_servers -i inventory.yml -m ping<\/p>\n<p># 2. \u6267\u884c\u90e8\u7f72Playbook&#xff08;\u9650\u52365\u53f0\u5e76\u53d1&#xff09;<br \/>\nansible-playbook -i inventory.yml deploy_qwen.yml &#8211;limit 5 &#8211;forks 5<\/p>\n<p># 3. \u67e5\u770b\u90e8\u7f72\u8fdb\u5ea6<br \/>\ntail -f \/var\/log\/ansible\/deploy.log<\/p>\n<p># 4. \u68c0\u67e5\u90e8\u7f72\u7ed3\u679c<br \/>\nansible all_servers -i inventory.yml -m shell -a &#034;supervisorctl status qwen-chat&#034;<\/p>\n<h4>5.2 \u5206\u9636\u6bb5\u90e8\u7f72\u7b56\u7565<\/h4>\n<p>\u5bf9\u4e8e\u5927\u89c4\u6a21\u90e8\u7f72&#xff08;\u598210\u53f0\u4ee5\u4e0a&#xff09;&#xff0c;\u5efa\u8bae\u91c7\u7528\u5206\u9636\u6bb5\u7b56\u7565&#xff1a;<\/p>\n<p># \u7b2c\u4e00\u9636\u6bb5&#xff1a;\u5148\u90e8\u7f722\u53f0\u4f5c\u4e3a\u6d4b\u8bd5<br \/>\nansible-playbook -i inventory.yml deploy_qwen.yml &#8211;limit &#034;gpu-server-01,gpu-server-02&#034;<\/p>\n<p># \u7b2c\u4e8c\u9636\u6bb5&#xff1a;\u9a8c\u8bc1\u6d4b\u8bd5\u670d\u52a1\u5668<br \/>\nansible gpu_servers[0:1] -i inventory.yml -m uri -a &#034;url&#061;http:\/\/localhost:8000\/chat.html return_content&#061;yes&#034;<\/p>\n<p># \u7b2c\u4e09\u9636\u6bb5&#xff1a;\u6279\u91cf\u90e8\u7f72\u5269\u4f59\u670d\u52a1\u5668&#xff08;\u5206\u6279\u6b21&#xff09;<br \/>\nansible-playbook -i inventory.yml deploy_qwen.yml &#8211;limit &#034;gpu-server-03:gpu-server-05&#034; &#8211;forks 3<br \/>\nansible-playbook -i inventory.yml deploy_qwen.yml &#8211;limit &#034;gpu-server-06:gpu-server-10&#034; &#8211;forks 3<\/p>\n<h4>5.3 \u90e8\u7f72\u76d1\u63a7\u4e0e\u65e5\u5fd7\u6536\u96c6<\/h4>\n<p>\u521b\u5efa\u76d1\u63a7Playbook monitor_deployment.yml&#xff1a;<\/p>\n<p>&#8212;<br \/>\n&#8211; name: \u76d1\u63a7\u90e8\u7f72\u72b6\u6001<br \/>\n  hosts: all_servers<br \/>\n  gather_facts: no<br \/>\n  tasks:<br \/>\n    &#8211; name: \u68c0\u67e5\u670d\u52a1\u72b6\u6001<br \/>\n      shell: |<br \/>\n        status&#061;$(supervisorctl status qwen-chat | awk &#039;{print $2}&#039;)<br \/>\n        if [ &#034;$status&#034; &#061; &#034;RUNNING&#034; ]; then<br \/>\n          echo &#034;OK &#8211; Service is running&#034;<br \/>\n          exit 0<br \/>\n        else<br \/>\n          echo &#034;ERROR &#8211; Service status: $status&#034;<br \/>\n          exit 1<br \/>\n        fi<br \/>\n      register: service_status<br \/>\n      ignore_errors: yes<\/p>\n<p>    &#8211; name: \u68c0\u67e5\u7aef\u53e3\u76d1\u542c<br \/>\n      wait_for:<br \/>\n        port: &#034;{{ web_port }}&#034;<br \/>\n        host: &#034;{{ ansible_host }}&#034;<br \/>\n        timeout: 5<br \/>\n      register: port_check<br \/>\n      ignore_errors: yes<\/p>\n<p>    &#8211; name: \u68c0\u67e5API\u53ef\u7528\u6027<br \/>\n      uri:<br \/>\n        url: &#034;http:\/\/{{ ansible_host }}:{{ vllm_port }}\/health&#034;<br \/>\n        method: GET<br \/>\n        timeout: 10<br \/>\n      register: api_check<br \/>\n      ignore_errors: yes<\/p>\n<p>    &#8211; name: \u6c47\u603b\u68c0\u67e5\u7ed3\u679c<br \/>\n      debug:<br \/>\n        msg: |<br \/>\n          \u670d\u52a1\u5668: {{ inventory_hostname }}<br \/>\n          \u670d\u52a1\u72b6\u6001: {{ service_status.stdout if service_status is succeeded else &#039;FAILED&#039; }}<br \/>\n          \u7aef\u53e3\u76d1\u542c: {{ &#039;OK&#039; if port_check is succeeded else &#039;FAILED&#039; }}<br \/>\n          API\u5065\u5eb7: {{ &#039;OK&#039; if api_check.status &#061;&#061; 200 else &#039;FAILED&#039; }}<\/p>\n<p>\u6267\u884c\u76d1\u63a7&#xff1a;<\/p>\n<p># \u5b9e\u65f6\u76d1\u63a7\u6240\u6709\u670d\u52a1\u5668\u72b6\u6001<br \/>\nwhile true; do<br \/>\n  ansible-playbook -i inventory.yml monitor_deployment.yml<br \/>\n  sleep 30<br \/>\ndone<\/p>\n<h3>6. \u9ad8\u7ea7\u529f\u80fd\u4e0e\u4f18\u5316<\/h3>\n<h4>6.1 \u6eda\u52a8\u66f4\u65b0\u4e0e\u84dd\u7eff\u90e8\u7f72<\/h4>\n<p>\u5bf9\u4e8e\u751f\u4ea7\u73af\u5883&#xff0c;\u6211\u4eec\u9700\u8981\u652f\u6301\u65e0\u7f1d\u66f4\u65b0&#xff1a;<\/p>\n<p>&#8212;<br \/>\n&#8211; name: \u84dd\u7eff\u90e8\u7f72\u66f4\u65b0<br \/>\n  hosts: gpu_servers<br \/>\n  serial: 2  # \u6bcf\u6b21\u66f4\u65b02\u53f0&#xff0c;\u786e\u4fdd\u670d\u52a1\u53ef\u7528\u6027<br \/>\n  vars:<br \/>\n    new_version: &#034;v1.2.0&#034;<\/p>\n<p>  tasks:<br \/>\n    &#8211; name: \u6807\u8bb0\u670d\u52a1\u5668\u4e3a\u7ef4\u62a4\u6a21\u5f0f<br \/>\n      uri:<br \/>\n        url: &#034;http:\/\/{{ ansible_host }}:{{ web_port }}\/maintenance&#034;<br \/>\n        method: POST<br \/>\n        body: &#039;{&#034;mode&#034;: &#034;on&#034;}&#039;<\/p>\n<p>    &#8211; name: \u505c\u6b62\u65e7\u7248\u672c\u670d\u52a1<br \/>\n      supervisorctl:<br \/>\n        name: qwen-chat<br \/>\n        state: stopped<\/p>\n<p>    &#8211; name: \u5907\u4efd\u5f53\u524d\u7248\u672c<br \/>\n      archive:<br \/>\n        path: &#034;{{ project_dir }}&#034;<br \/>\n        dest: &#034;\/backup\/qwen-{{ ansible_date_time.date }}.tar.gz&#034;<\/p>\n<p>    &#8211; name: \u90e8\u7f72\u65b0\u7248\u672c<br \/>\n      include_tasks: deploy_qwen.yml<br \/>\n      vars:<br \/>\n        version: &#034;{{ new_version }}&#034;<\/p>\n<p>    &#8211; name: \u542f\u52a8\u65b0\u7248\u672c\u670d\u52a1<br \/>\n      supervisorctl:<br \/>\n        name: qwen-chat<br \/>\n        state: started<\/p>\n<p>    &#8211; name: \u5065\u5eb7\u68c0\u67e5<br \/>\n      uri:<br \/>\n        url: &#034;http:\/\/{{ ansible_host }}:{{ web_port }}\/health&#034;<br \/>\n        method: GET<br \/>\n        register: health_check<br \/>\n        until: health_check.status &#061;&#061; 200<br \/>\n        retries: 10<br \/>\n        delay: 5<\/p>\n<p>    &#8211; name: \u79fb\u9664\u7ef4\u62a4\u6a21\u5f0f<br \/>\n      uri:<br \/>\n        url: &#034;http:\/\/{{ ansible_host }}:{{ web_port }}\/maintenance&#034;<br \/>\n        method: POST<br \/>\n        body: &#039;{&#034;mode&#034;: &#034;off&#034;}&#039;<\/p>\n<h4>6.2 \u81ea\u52a8\u5316\u6d4b\u8bd5\u4e0e\u9a8c\u8bc1<\/h4>\n<p>\u90e8\u7f72\u5b8c\u6210\u540e\u81ea\u52a8\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b&#xff1a;<\/p>\n<p>&#8212;<br \/>\n&#8211; name: \u81ea\u52a8\u5316\u6d4b\u8bd5\u9a8c\u8bc1<br \/>\n  hosts: all_servers<br \/>\n  tasks:<br \/>\n    &#8211; name: \u6d4b\u8bd5\u804a\u5929\u529f\u80fd<br \/>\n      uri:<br \/>\n        url: &#034;http:\/\/localhost:{{ vllm_port }}\/v1\/chat\/completions&#034;<br \/>\n        method: POST<br \/>\n        body_format: json<br \/>\n        body:<br \/>\n          model: &#034;{{ model_name }}&#034;<br \/>\n          messages:<br \/>\n            &#8211; role: user<br \/>\n              content: &#034;\u4f60\u597d&#xff0c;\u8bf7\u7528\u4e00\u53e5\u8bdd\u4ecb\u7ecd\u4f60\u81ea\u5df1&#034;<br \/>\n          temperature: 0.7<br \/>\n          max_tokens: 100<br \/>\n        status_code: 200<br \/>\n        timeout: 30<br \/>\n      register: chat_test<\/p>\n<p>    &#8211; name: \u9a8c\u8bc1\u54cd\u5e94\u5185\u5bb9<br \/>\n      assert:<br \/>\n        that:<br \/>\n          &#8211; &#034;&#039;assistant&#039; in chat_test.json.choices[0].message.role&#034;<br \/>\n          &#8211; &#034;chat_test.json.choices[0].message.content|length &gt; 0&#034;<br \/>\n        fail_msg: &#034;\u804a\u5929\u529f\u80fd\u6d4b\u8bd5\u5931\u8d25&#034;<\/p>\n<p>    &#8211; name: \u6d4b\u8bd5\u6587\u4ef6\u670d\u52a1<br \/>\n      uri:<br \/>\n        url: &#034;http:\/\/localhost:{{ web_port }}\/chat.html&#034;<br \/>\n        method: GET<br \/>\n        status_code: 200<br \/>\n      register: web_test<\/p>\n<p>    &#8211; name: \u6027\u80fd\u538b\u529b\u6d4b\u8bd5&#xff08;\u53ef\u9009&#xff09;<br \/>\n      shell: |<br \/>\n        ab -n 100 -c 10 http:\/\/localhost:{{ web_port }}\/chat.html 2&gt;\/dev\/null | grep &#034;Requests per second&#034;<br \/>\n      when: performance_test_enabled<br \/>\n      register: perf_test<\/p>\n<p>    &#8211; name: \u751f\u6210\u6d4b\u8bd5\u62a5\u544a<br \/>\n      template:<br \/>\n        src: &#034;templates\/test_report.j2&#034;<br \/>\n        dest: &#034;\/tmp\/deployment_test_{{ inventory_hostname }}.md&#034;<\/p>\n<h4>6.3 \u914d\u7f6e\u7ba1\u7406\u4e0e\u7248\u672c\u63a7\u5236<\/h4>\n<p>\u4f7f\u7528Ansible Vault\u7ba1\u7406\u654f\u611f\u914d\u7f6e&#xff1a;<\/p>\n<p># 1. \u521b\u5efa\u52a0\u5bc6\u7684\u914d\u7f6e\u6587\u4ef6<br \/>\nansible-vault create group_vars\/all\/vault.yml<\/p>\n<p># 2. \u7f16\u8f91\u52a0\u5bc6\u6587\u4ef6&#xff08;\u8f93\u5165\u5bc6\u7801&#xff09;<br \/>\nansible-vault edit group_vars\/all\/vault.yml<\/p>\n<p># 3. \u5728Playbook\u4e2d\u4f7f\u7528\u52a0\u5bc6\u53d8\u91cf<br \/>\n# vault.yml\u5185\u5bb9&#xff1a;<br \/>\nmodel_download_token: &#034;your-secret-token&#034;<br \/>\napi_keys:<br \/>\n  openai: &#034;sk-xxx&#034;<br \/>\n  anthropic: &#034;claude-xxx&#034;<\/p>\n<p># 4. \u6267\u884c\u65f6\u63d0\u4f9b\u5bc6\u7801<br \/>\nansible-playbook -i inventory.yml deploy_qwen.yml &#8211;ask-vault-pass<\/p>\n<h3>7. \u6545\u969c\u6392\u9664\u4e0e\u7ef4\u62a4<\/h3>\n<h4>7.1 \u5e38\u89c1\u95ee\u9898\u89e3\u51b3<\/h4>\n<p>\u95ee\u98981&#xff1a;\u6a21\u578b\u4e0b\u8f7d\u5931\u8d25<\/p>\n<p># \u68c0\u67e5\u7f51\u7edc\u8fde\u63a5<br \/>\nansible all_servers -i inventory.yml -m shell -a &#034;curl -I https:\/\/modelscope.cn&#034;<\/p>\n<p># \u624b\u52a8\u4e0b\u8f7d\u6a21\u578b\u5230\u7f13\u5b58\u670d\u52a1\u5668<br \/>\nansible cache_server -i inventory.yml -m shell -a &#034;cd \/var\/cache\/models &amp;&amp; wget https:\/\/modelscope.cn\/models\/{{ model_id }}\/repo?Revision&#061;master&#034;<\/p>\n<p># \u4ece\u7f13\u5b58\u670d\u52a1\u5668\u5206\u53d1<br \/>\nansible gpu_servers -i inventory.yml -m synchronize -a &#034;src&#061;\/var\/cache\/models\/ dest&#061;{{ project_dir }}\/qwen\/&#034;<\/p>\n<p>\u95ee\u98982&#xff1a;GPU\u5185\u5b58\u4e0d\u8db3<\/p>\n<p># \u8c03\u6574vLLM\u5185\u5b58\u914d\u7f6e<br \/>\n&#8211; name: \u8c03\u6574GPU\u5185\u5b58\u4f7f\u7528\u7387<br \/>\n  lineinfile:<br \/>\n    path: &#034;{{ project_dir }}\/start_all.sh&#034;<br \/>\n    regexp: &#039;^.*&#8211;gpu-memory-utilization.*$&#039;<br \/>\n    line: &#039;    &#8211;gpu-memory-utilization 0.5&#039;<\/p>\n<p># \u6216\u8005\u4f7f\u7528CPU\u6a21\u5f0f<br \/>\n&#8211; name: \u4f7f\u7528CPU\u6a21\u5f0f&#xff08;\u5907\u7528\u65b9\u6848&#xff09;<br \/>\n  lineinfile:<br \/>\n    path: &#034;{{ project_dir }}\/start_all.sh&#034;<br \/>\n    regexp: &#039;^vllm serve&#039;<br \/>\n    line: &#039;vllm serve &#034;$ACTUAL_MODEL_PATH&#034; &#8211;device cpu&#039;<br \/>\n  when: gpu_memory &lt; &#039;8GB&#039;<\/p>\n<p>\u95ee\u98983&#xff1a;\u670d\u52a1\u542f\u52a8\u8d85\u65f6<\/p>\n<p># \u589e\u52a0\u542f\u52a8\u8d85\u65f6\u65f6\u95f4<br \/>\nansible all_servers -i inventory.yml -m shell -a &#034;sed -i &#039;s\/startsecs&#061;10\/startsecs&#061;30\/&#039; \/etc\/supervisor\/conf.d\/qwen-chat.conf &amp;&amp; supervisorctl update&#034;<\/p>\n<p># \u67e5\u770b\u8be6\u7ec6\u65e5\u5fd7<br \/>\nansible all_servers -i inventory.yml -m shell -a &#034;tail -100 {{ project_dir }}\/vllm.log&#034;<\/p>\n<h4>7.2 \u76d1\u63a7\u4e0e\u544a\u8b66<\/h4>\n<p>\u521b\u5efa\u76d1\u63a7\u811a\u672c monitor_services.sh&#xff1a;<\/p>\n<p>#!\/bin\/bash<br \/>\n# \u76d1\u63a7\u6240\u6709\u670d\u52a1\u5668\u7684\u670d\u52a1\u72b6\u6001<\/p>\n<p>INVENTORY&#061;&#034;inventory.yml&#034;<br \/>\nLOG_FILE&#061;&#034;\/var\/log\/qwen_monitor.log&#034;<\/p>\n<p># \u68c0\u67e5\u5355\u53f0\u670d\u52a1\u5668<br \/>\ncheck_server() {<br \/>\n    local host&#061;$1<br \/>\n    local ip&#061;$2<\/p>\n<p>    # \u68c0\u67e5\u670d\u52a1\u8fdb\u7a0b<br \/>\n    ssh $ip &#034;supervisorctl status qwen-chat&#034; | grep -q &#034;RUNNING&#034;<br \/>\n    if [ $? -ne 0 ]; then<br \/>\n        echo &#034;$(date) &#8211; ERROR: Service not running on $host&#034; &gt;&gt; $LOG_FILE<br \/>\n        return 1<br \/>\n    fi<\/p>\n<p>    # \u68c0\u67e5\u7aef\u53e3<br \/>\n    nc -z $ip 8000<br \/>\n    if [ $? -ne 0 ]; then<br \/>\n        echo &#034;$(date) &#8211; ERROR: Port 8000 not listening on $host&#034; &gt;&gt; $LOG_FILE<br \/>\n        return 1<br \/>\n    fi<\/p>\n<p>    # \u68c0\u67e5API<br \/>\n    curl -s http:\/\/$ip:3001\/health | grep -q &#034;healthy&#034;<br \/>\n    if [ $? -ne 0 ]; then<br \/>\n        echo &#034;$(date) &#8211; ERROR: API not healthy on $host&#034; &gt;&gt; $LOG_FILE<br \/>\n        return 1<br \/>\n    fi<\/p>\n<p>    echo &#034;$(date) &#8211; OK: $host is healthy&#034; &gt;&gt; $LOG_FILE<br \/>\n    return 0<br \/>\n}<\/p>\n<p># \u4eceAnsible\u6e05\u5355\u8bfb\u53d6\u670d\u52a1\u5668\u5217\u8868<br \/>\nservers&#061;$(ansible-inventory -i $INVENTORY &#8211;list | jq -r &#039;.all_servers.hosts[]&#039;)<\/p>\n<p>for server in $servers; do<br \/>\n    ip&#061;$(ansible-inventory -i $INVENTORY &#8211;host $server | jq -r &#039;.ansible_host&#039;)<br \/>\n    check_server $server $ip &amp;<br \/>\ndone<\/p>\n<p>wait<\/p>\n<h4>7.3 \u5b9a\u671f\u7ef4\u62a4\u4efb\u52a1<\/h4>\n<p>\u521b\u5efa\u7ef4\u62a4Playbook maintenance.yml&#xff1a;<\/p>\n<p>&#8212;<br \/>\n&#8211; name: \u5b9a\u671f\u7ef4\u62a4\u4efb\u52a1<br \/>\n  hosts: all_servers<br \/>\n  tasks:<br \/>\n    &#8211; name: \u6e05\u7406\u65e5\u5fd7\u6587\u4ef6<br \/>\n      shell: |<br \/>\n        find {{ project_dir }} -name &#034;*.log&#034; -type f -size &#043;100M -exec truncate -s 50M {} \\\\;<\/p>\n<p>    &#8211; name: \u68c0\u67e5\u78c1\u76d8\u7a7a\u95f4<br \/>\n      shell: df -h \/ | awk &#039;NR&#061;&#061;2 {print $5}&#039; | sed &#039;s\/%\/\/&#039;<br \/>\n      register: disk_usage<\/p>\n<p>    &#8211; name: \u78c1\u76d8\u7a7a\u95f4\u544a\u8b66<br \/>\n      debug:<br \/>\n        msg: &#034;\u8b66\u544a&#xff1a;{{ inventory_hostname }} \u78c1\u76d8\u4f7f\u7528\u7387 {{ disk_usage.stdout }}%&#034;<br \/>\n      when: disk_usage.stdout|int &gt; 80<\/p>\n<p>    &#8211; name: \u66f4\u65b0\u7cfb\u7edf\u5305<br \/>\n      apt:<br \/>\n        upgrade: yes<br \/>\n        update_cache: yes<br \/>\n      when: ansible_os_family &#061;&#061; &#034;Debian&#034;<\/p>\n<p>    &#8211; name: \u91cd\u542f\u670d\u52a1&#xff08;\u6bcf\u5468\u4e00\u6b21&#xff09;<br \/>\n      shell: supervisorctl restart qwen-chat<br \/>\n      when: ansible_date_time.weekday &#061;&#061; &#034;Monday&#034;<\/p>\n<h3>8. \u603b\u7ed3<\/h3>\n<p>\u901a\u8fc7\u8fd9\u5957Ansible\u81ea\u52a8\u5316\u90e8\u7f72\u65b9\u6848&#xff0c;\u6211\u4eec\u6210\u529f\u89e3\u51b3\u4e86\u5728\u591a\u53f0\u670d\u52a1\u5668\u4e0a\u6279\u91cf\u90e8\u7f72Qwen3-VL-8B AI\u804a\u5929\u7cfb\u7edf\u7684\u96be\u9898\u3002\u8ba9\u6211\u4eec\u56de\u987e\u4e00\u4e0b\u5173\u952e\u8981\u70b9&#xff1a;<\/p>\n<p>\u90e8\u7f72\u6548\u7387\u5927\u5e45\u63d0\u5347<\/p>\n<ul>\n<li>\u4ece\u624b\u52a8\u5355\u53f0\u90e8\u7f72&#xff08;\u6bcf\u53f01-2\u5c0f\u65f6&#xff09;\u5230\u6279\u91cf\u81ea\u52a8\u5316\u90e8\u7f72&#xff08;10\u53f0\u7ea630\u5206\u949f&#xff09;<\/li>\n<li>\u652f\u6301\u5e76\u884c\u90e8\u7f72&#xff0c;\u53ef\u540c\u65f6\u90e8\u7f72\u591a\u53f0\u670d\u52a1\u5668<\/li>\n<li>\u4e00\u952e\u5b8c\u6210\u73af\u5883\u68c0\u67e5\u3001\u4f9d\u8d56\u5b89\u88c5\u3001\u6a21\u578b\u4e0b\u8f7d\u3001\u670d\u52a1\u914d\u7f6e\u5168\u6d41\u7a0b<\/li>\n<\/ul>\n<p>\u914d\u7f6e\u7ba1\u7406\u66f4\u52a0\u89c4\u8303<\/p>\n<ul>\n<li>\u6240\u6709\u914d\u7f6e\u901a\u8fc7\u4ee3\u7801\u7ba1\u7406&#xff0c;\u786e\u4fdd\u73af\u5883\u4e00\u81f4\u6027<\/li>\n<li>\u652f\u6301\u7248\u672c\u63a7\u5236&#xff0c;\u4fbf\u4e8e\u56de\u6eda\u548c\u5ba1\u8ba1<\/li>\n<li>\u654f\u611f\u4fe1\u606f\u901a\u8fc7Ansible Vault\u52a0\u5bc6\u4fdd\u62a4<\/li>\n<\/ul>\n<p>\u8fd0\u7ef4\u76d1\u63a7\u5168\u9762\u8986\u76d6<\/p>\n<ul>\n<li>\u5b9e\u65f6\u76d1\u63a7\u670d\u52a1\u72b6\u6001\u548c\u5065\u5eb7\u5ea6<\/li>\n<li>\u81ea\u52a8\u5316\u6d4b\u8bd5\u786e\u4fdd\u90e8\u7f72\u8d28\u91cf<\/li>\n<li>\u6545\u969c\u81ea\u52a8\u68c0\u6d4b\u548c\u544a\u8b66<\/li>\n<\/ul>\n<p>\u6269\u5c55\u6027\u826f\u597d<\/p>\n<ul>\n<li>\u652f\u6301\u4ece10\u53f0\u6269\u5c55\u5230100\u53f0\u670d\u52a1\u5668<\/li>\n<li>\u6a21\u5757\u5316\u8bbe\u8ba1&#xff0c;\u4fbf\u4e8e\u5b9a\u5236\u548c\u6269\u5c55<\/li>\n<li>\u652f\u6301\u84dd\u7eff\u90e8\u7f72\u3001\u6eda\u52a8\u66f4\u65b0\u7b49\u9ad8\u7ea7\u7279\u6027<\/li>\n<\/ul>\n<p>\u5b9e\u9645\u90e8\u7f72\u5efa\u8bae<\/p>\n<li>\u5148\u6d4b\u8bd5\u540e\u751f\u4ea7&#xff1a;\u5148\u57282-3\u53f0\u6d4b\u8bd5\u670d\u52a1\u5668\u4e0a\u9a8c\u8bc1\u90e8\u7f72\u6d41\u7a0b<\/li>\n<li>\u5206\u6279\u90e8\u7f72&#xff1a;\u5927\u89c4\u6a21\u90e8\u7f72\u65f6\u91c7\u7528\u5206\u6279\u7b56\u7565&#xff0c;\u964d\u4f4e\u98ce\u9669<\/li>\n<li>\u76d1\u63a7\u5148\u884c&#xff1a;\u90e8\u7f72\u524d\u5148\u642d\u5efa\u76d1\u63a7\u7cfb\u7edf&#xff0c;\u4fbf\u4e8e\u95ee\u9898\u6392\u67e5<\/li>\n<li>\u6587\u6863\u5b8c\u5584&#xff1a;\u8bb0\u5f55\u90e8\u7f72\u8fc7\u7a0b\u4e2d\u7684\u6240\u6709\u914d\u7f6e\u548c\u8c03\u6574<\/li>\n<p>\u8fd9\u5957\u65b9\u6848\u4e0d\u4ec5\u9002\u7528\u4e8eQwen3-VL-8B&#xff0c;\u7ecf\u8fc7\u9002\u5f53\u8c03\u6574\u540e&#xff0c;\u4e5f\u53ef\u4ee5\u7528\u4e8e\u90e8\u7f72\u5176\u4ed6AI\u6a21\u578b\u548c\u5e94\u7528\u3002\u81ea\u52a8\u5316\u90e8\u7f72\u662fAI\u5de5\u7a0b\u5316\u7684\u91cd\u8981\u4e00\u73af&#xff0c;\u80fd\u663e\u8457\u63d0\u5347\u56e2\u961f\u7684\u751f\u4ea7\u529b\u548c\u7cfb\u7edf\u7684\u53ef\u9760\u6027\u3002<\/p>\n<hr \/>\n<p>\u83b7\u53d6\u66f4\u591aAI\u955c\u50cf<\/p>\n<p>\u60f3\u63a2\u7d22\u66f4\u591aAI\u955c\u50cf\u548c\u5e94\u7528\u573a\u666f&#xff1f;\u8bbf\u95ee CSDN\u661f\u56fe\u955c\u50cf\u5e7f\u573a&#xff0c;\u63d0\u4f9b\u4e30\u5bcc\u7684\u9884\u7f6e\u955c\u50cf&#xff0c;\u8986\u76d6\u5927\u6a21\u578b\u63a8\u7406\u3001\u56fe\u50cf\u751f\u6210\u3001\u89c6\u9891\u751f\u6210\u3001\u6a21\u578b\u5fae\u8c03\u7b49\u591a\u4e2a\u9886\u57df&#xff0c;\u652f\u6301\u4e00\u952e\u90e8\u7f72\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Qwen3-VL-8B\u5f00\u6e90\u90e8\u7f72\u6559\u7a0b&#xff1a;Ansible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b010\u53f0\u670d\u52a1\u5668\u6279\u91cf\u90e8\u7f72<br \/>\n1. \u5f15\u8a00<br \/>\n\u60f3\u8c61\u4e00\u4e0b&#xff0c;\u4f60\u9700\u8981\u572810\u53f0\u670d\u52a1\u5668\u4e0a\u90e8\u7f72\u4e00\u4e2a\u5b8c\u6574\u7684AI\u804a\u5929\u7cfb\u7edf\u3002\u6bcf\u53f0\u670d\u52a1\u5668\u90fd\u8981\u5b89\u88c5Python\u73af\u5883\u3001\u4e0b\u8f7d\u51e0\u5341GB\u7684\u6a21\u578b\u6587\u4ef6\u3001\u914d\u7f6evLLM\u63a8\u7406\u5f15\u64ce\u3001\u8bbe\u7f6e\u53cd\u5411\u4ee3\u7406\u3001\u90e8\u7f72\u524d\u7aef\u754c\u9762\u2026\u2026\u5982\u679c\u624b\u52a8\u64cd\u4f5c&#xff0c;\u4e00\u53f0\u670d\u52a1\u5668\u53ef\u80fd\u5c31\u8981\u6298\u817e\u534a\u5929&#xff0c;10\u53f0\u670d\u52a1\u5668\u7b80\u76f4\u662f\u4e2a\u5669\u68a6\u3002<br \/>\n\u8fd9\u5c31\u662f\u6211\u4eec\u4eca\u5929\u8981\u89e3\u51b3\u7684\u95ee\u9898\u3002\u6211\u5c06\u5206\u4eab\u4e00\u4e2a\u57fa\u4e8eAnsible\u7684\u81ea\u52a8\u5316\u90e8\u7f72\u65b9\u6848&amp;#<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[7591,1064,956,118],"topic":[],"class_list":["post-87877","post","type-post","status-publish","format-standard","hentry","category-server","tag-ai","tag-ansible","tag-956","tag-118"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Qwen3-VL-8B\u5f00\u6e90\u90e8\u7f72\u6559\u7a0b\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b010\u53f0\u670d\u52a1\u5668\u6279\u91cf\u90e8\u7f72 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/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.wsisp.com\/helps\/87877.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Qwen3-VL-8B\u5f00\u6e90\u90e8\u7f72\u6559\u7a0b\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b010\u53f0\u670d\u52a1\u5668\u6279\u91cf\u90e8\u7f72 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Qwen3-VL-8B\u5f00\u6e90\u90e8\u7f72\u6559\u7a0b&#xff1a;Ansible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b010\u53f0\u670d\u52a1\u5668\u6279\u91cf\u90e8\u7f72 1. \u5f15\u8a00 \u60f3\u8c61\u4e00\u4e0b&#xff0c;\u4f60\u9700\u8981\u572810\u53f0\u670d\u52a1\u5668\u4e0a\u90e8\u7f72\u4e00\u4e2a\u5b8c\u6574\u7684AI\u804a\u5929\u7cfb\u7edf\u3002\u6bcf\u53f0\u670d\u52a1\u5668\u90fd\u8981\u5b89\u88c5Python\u73af\u5883\u3001\u4e0b\u8f7d\u51e0\u5341GB\u7684\u6a21\u578b\u6587\u4ef6\u3001\u914d\u7f6evLLM\u63a8\u7406\u5f15\u64ce\u3001\u8bbe\u7f6e\u53cd\u5411\u4ee3\u7406\u3001\u90e8\u7f72\u524d\u7aef\u754c\u9762\u2026\u2026\u5982\u679c\u624b\u52a8\u64cd\u4f5c&#xff0c;\u4e00\u53f0\u670d\u52a1\u5668\u53ef\u80fd\u5c31\u8981\u6298\u817e\u534a\u5929&#xff0c;10\u53f0\u670d\u52a1\u5668\u7b80\u76f4\u662f\u4e2a\u5669\u68a6\u3002 \u8fd9\u5c31\u662f\u6211\u4eec\u4eca\u5929\u8981\u89e3\u51b3\u7684\u95ee\u9898\u3002\u6211\u5c06\u5206\u4eab\u4e00\u4e2a\u57fa\u4e8eAnsible\u7684\u81ea\u52a8\u5316\u90e8\u7f72\u65b9\u6848&amp;#\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/87877.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-30T18:56:36+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/87877.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/87877.html\",\"name\":\"Qwen3-VL-8B\u5f00\u6e90\u90e8\u7f72\u6559\u7a0b\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b010\u53f0\u670d\u52a1\u5668\u6279\u91cf\u90e8\u7f72 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-30T18:56:36+00:00\",\"dateModified\":\"2026-07-30T18:56:36+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/87877.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/87877.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/87877.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Qwen3-VL-8B\u5f00\u6e90\u90e8\u7f72\u6559\u7a0b\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b010\u53f0\u670d\u52a1\u5668\u6279\u91cf\u90e8\u7f72\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Qwen3-VL-8B\u5f00\u6e90\u90e8\u7f72\u6559\u7a0b\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b010\u53f0\u670d\u52a1\u5668\u6279\u91cf\u90e8\u7f72 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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.wsisp.com\/helps\/87877.html","og_locale":"zh_CN","og_type":"article","og_title":"Qwen3-VL-8B\u5f00\u6e90\u90e8\u7f72\u6559\u7a0b\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b010\u53f0\u670d\u52a1\u5668\u6279\u91cf\u90e8\u7f72 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Qwen3-VL-8B\u5f00\u6e90\u90e8\u7f72\u6559\u7a0b&#xff1a;Ansible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b010\u53f0\u670d\u52a1\u5668\u6279\u91cf\u90e8\u7f72 1. \u5f15\u8a00 \u60f3\u8c61\u4e00\u4e0b&#xff0c;\u4f60\u9700\u8981\u572810\u53f0\u670d\u52a1\u5668\u4e0a\u90e8\u7f72\u4e00\u4e2a\u5b8c\u6574\u7684AI\u804a\u5929\u7cfb\u7edf\u3002\u6bcf\u53f0\u670d\u52a1\u5668\u90fd\u8981\u5b89\u88c5Python\u73af\u5883\u3001\u4e0b\u8f7d\u51e0\u5341GB\u7684\u6a21\u578b\u6587\u4ef6\u3001\u914d\u7f6evLLM\u63a8\u7406\u5f15\u64ce\u3001\u8bbe\u7f6e\u53cd\u5411\u4ee3\u7406\u3001\u90e8\u7f72\u524d\u7aef\u754c\u9762\u2026\u2026\u5982\u679c\u624b\u52a8\u64cd\u4f5c&#xff0c;\u4e00\u53f0\u670d\u52a1\u5668\u53ef\u80fd\u5c31\u8981\u6298\u817e\u534a\u5929&#xff0c;10\u53f0\u670d\u52a1\u5668\u7b80\u76f4\u662f\u4e2a\u5669\u68a6\u3002 \u8fd9\u5c31\u662f\u6211\u4eec\u4eca\u5929\u8981\u89e3\u51b3\u7684\u95ee\u9898\u3002\u6211\u5c06\u5206\u4eab\u4e00\u4e2a\u57fa\u4e8eAnsible\u7684\u81ea\u52a8\u5316\u90e8\u7f72\u65b9\u6848&amp;#","og_url":"https:\/\/www.wsisp.com\/helps\/87877.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-30T18:56:36+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"9 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/87877.html","url":"https:\/\/www.wsisp.com\/helps\/87877.html","name":"Qwen3-VL-8B\u5f00\u6e90\u90e8\u7f72\u6559\u7a0b\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b010\u53f0\u670d\u52a1\u5668\u6279\u91cf\u90e8\u7f72 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-30T18:56:36+00:00","dateModified":"2026-07-30T18:56:36+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/87877.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/87877.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/87877.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Qwen3-VL-8B\u5f00\u6e90\u90e8\u7f72\u6559\u7a0b\uff1aAnsible\u81ea\u52a8\u5316\u811a\u672c\u5b9e\u73b010\u53f0\u670d\u52a1\u5668\u6279\u91cf\u90e8\u7f72"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/87877","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=87877"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/87877\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=87877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=87877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=87877"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=87877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}