{"id":78504,"date":"2026-02-27T18:51:18","date_gmt":"2026-02-27T10:51:18","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/78504.html"},"modified":"2026-02-27T18:51:18","modified_gmt":"2026-02-27T10:51:18","slug":"wsl2-ubuntu-24-04-docker-desktop-%e9%85%8d%e7%bd%ae%e5%8f%8c%e5%86%85%e6%a0%b8%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/78504.html","title":{"rendered":"WSL2 + Ubuntu 24.04 + Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883"},"content":{"rendered":"<h3>WSL2 &#043; Ubuntu 24.04 &#043; Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883<\/h3>\n<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\n<ul>\n<li>WSL2 &#043; Ubuntu 24.04 &#043; Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883<\/li>\n<\/ul>\n<\/li>\n<li>WSL2 &#043; Ubuntu 24.04 &#043; Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883<\/li>\n<li>\n<ul>\n<li>\u4f7f\u7528WSL\u81ea\u52a8\u5b89\u88c5<\/li>\n<li>\u624b\u52a8\u5b89\u88c5<\/li>\n<li>\u26a0\ufe0f \u5173\u4e8e\u5185\u6838\u7248\u672c\u8fc7\u65e7 (5.10.16) \u7684\u91cd\u8981\u63d0\u793a<\/li>\n<\/ul>\n<\/li>\n<li>\u5c06ubuntu\u5bfc\u51fa\u5230D\u76d8<\/li>\n<li>\u5b89\u88c5Docker Desktop<\/li>\n<li>\n<ul>\n<li>\u5907\u4efd\u539f\u6709mysql\u5e76\u505c\u6b62<\/li>\n<li>&#x1f680; \u6267\u884c\u6b65\u9aa4&#xff1a;\u5b89\u88c5 Docker Desktop<\/li>\n<li>docker\u914d\u7f6e<\/li>\n<li>\n<ul>\n<li>&#x1f680; \u7b2c\u4e00\u6b65&#xff1a;\u521b\u5efa\u9879\u76ee\u7ed3\u6784\u4e0e\u914d\u7f6e\u6587\u4ef6<\/li>\n<li>&#x1f4dd; \u7b2c\u4e8c\u6b65&#xff1a;\u586b\u5165\u914d\u7f6e\u5185\u5bb9<\/li>\n<li>&#x1f6e0;\ufe0f \u7b2c\u4e09\u6b65&#xff1a;\u542f\u52a8\u670d\u52a1<\/li>\n<li>\n<ul>\n<li>\u7f51\u7edc\u8bbe\u7f6e<\/li>\n<li>\u7f51\u7edc\u6ce2\u52a8\u5bfc\u81f4\u5931\u8d25<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u73b0\u4ee3\u4e91\u539f\u751f\u5f00\u53d1\u7684\u6838\u5fc3\u7406\u5ff5<\/li>\n<li>\n<ul>\n<li>\u590d\u7528docker-compose.yml&#xff0c;\u8fd8\u4f1a\u518d\u62c9\u53d6\u4e00\u904dmysql\u955c\u50cf\u518d\u542f\u52a8\u4e00\u4e2a\u5b9e\u4f8b\u5417&#xff1f;<\/li>\n<li>\n<ul>\n<li>&#x1f4a1; \u6700\u4f73\u5b9e\u8df5\u5efa\u8bae<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u5176\u4ed6\u64cd\u4f5c<\/li>\n<li>\n<ul>\n<li>\u505c\u6b62\u5bb9\u5668<\/li>\n<li>\u6e05\u7406mysql\u6570\u636e\u96c6<\/li>\n<li>\u4fee\u6539\u7aef\u53e3\u6620\u5c04<\/li>\n<li>\u5168\u9762\u6d4b\u8bd5<\/li>\n<li>\u5185\u5b58\u5360\u7528\u95ee\u9898<\/li>\n<li>\u4fee\u6539\u7ec8\u7aef\u6837\u5f0f<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>WSL2 &#043; Ubuntu 24.04 &#043; Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883<\/h2>\n<h3>\u4f7f\u7528WSL\u81ea\u52a8\u5b89\u88c5<\/h3>\n<p>wsl &#8211;set-default-version <span class=\"token number\">2<\/span><br \/>\n<span class=\"token comment\"># \u67e5\u770b\u7f51\u7edc\u4e0a\u6709\u54ea\u4e9b Ubuntu \u7248\u672c\u53ef\u7528<\/span><br \/>\nwsl &#8211;list &#8211;online<br \/>\n<span class=\"token comment\"># \u5b89\u88c5 Ubuntu 24.04<\/span><br \/>\nwsl &#8211;install Ubuntu-24.04<\/p>\n<p>\u5982\u679c\u4e0a\u9762\u7684\u65b9\u6848\u4e0d\u884c&#xff0c;\u5c1d\u8bd5\u624b\u52a8\u5b89\u88c5\u3002<\/p>\n<h3>\u624b\u52a8\u5b89\u88c5<\/h3>\n<p>\u6839\u636e\u5fae\u8f6f\u5b98\u65b9\u6587\u6863&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u83b7\u53d6Ubuntu 24.04\u5b89\u88c5\u5305&#xff1a;<\/p>\n<li>\n<p>\u8bbf\u95ee\u5fae\u8f6f\u5b98\u65b9\u4e0b\u8f7d\u94fe\u63a5&#xff1a;<\/p>\n<ul>\n<li>Ubuntu 24.04 LTS (x64, arm64)<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u5728 PowerShell (\u7ba1\u7406\u5458) \u4e2d\u8fd0\u884c&#xff1a;<\/p>\n<\/li>\n<p><span class=\"token comment\"># \u5c06\u8def\u5f84\u66ff\u6362\u4e3a\u4f60\u5b9e\u9645\u4e0b\u8f7d\u7684\u6587\u4ef6\u8def\u5f84<\/span><br \/>\n<span class=\"token function\">Add-AppxPackage<\/span> <span class=\"token operator\">&#8211;<\/span>Path <span class=\"token string\">&#034;C:\\\\Users\\\\\u7528\u6237\u540d\\\\Downloads\\\\CanonicalGroupLimited.Ubuntu24.04LTS_2404.1.26.0_neutral_~_79rhkp1fndgsc.AppxBundle&#034;<\/span><\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e&#xff0c;\u5728\u5f00\u59cb\u83dc\u5355\u641c\u7d22 \u201cUbuntu 24.04\u201d \u5e76\u70b9\u51fb\u8fd0\u884c\u3002\u5b83\u4f1a\u5f39\u51fa\u4e00\u4e2a\u5c0f\u9ed1\u6846\u8fdb\u884c\u6700\u540e\u7684\u89e3\u538b\u548c\u521d\u59cb\u5316&#xff08;\u8fd9\u4e00\u6b65\u5f88\u5feb&#xff0c;\u4e0d\u9700\u8981\u8054\u7f51\u4e0b\u8f7d\u5927\u6587\u4ef6&#xff09;\u3002 \u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801\u5373\u53ef\u3002<\/p>\n<p>\u2705 \u9a8c\u8bc1\u5b89\u88c5\u6210\u529f<\/p>\n<p>wsl -l -v<\/p>\n<p>\u8f93\u51fa<\/p>\n<p>  NAME            STATE           VERSION<br \/>\n* Ubuntu-24.04    Running         1<\/p>\n<p>\u7531\u4e8e\u89c2\u5bdf\u5230 version \u4e3a1,\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5c06 Ubuntu-24.04 \u8f6c\u6362\u4e3a WSL 2&#xff1a;<\/p>\n<p>wsl &#8211;set-version Ubuntu-24.04 2<\/p>\n<p>\u6ce8\u610f&#xff1a;\u8fd9\u4e2a\u8fc7\u7a0b\u53ef\u80fd\u9700\u8981\u51e0\u5206\u949f&#xff0c;\u56e0\u4e3a\u5b83\u9700\u8981\u5c06\u6587\u4ef6\u7cfb\u7edf\u4ece\u865a\u62df\u786c\u76d8\u683c\u5f0f\u8f6c\u6362\u4e3a VHDX \u683c\u5f0f\u3002\u8bf7\u8010\u5fc3\u7b49\u5f85\u76f4\u5230\u663e\u793a \u201cConversion complete\u201d\u3002<\/p>\n<h3>\u26a0\ufe0f \u5173\u4e8e\u5185\u6838\u7248\u672c\u8fc7\u65e7 (5.10.16) \u7684\u91cd\u8981\u63d0\u793a<\/h3>\n<p>\u4f60\u63d0\u5230\u7684 \u5185\u6838\u7248\u672c&#xff1a;5.10.16 \u786e\u5b9e\u975e\u5e38\u65e7&#xff08;\u90a3\u662f 2020 \u5e74\u7684\u5185\u6838&#xff09;\u3002\u867d\u7136 Mirror \u6a21\u5f0f\u4e3b\u8981\u4f9d\u8d56 Windows \u5bbf\u4e3b\u673a\u7684\u7f51\u7edc\u6808&#xff0c;\u4f46\u8f83\u65b0\u7684\u5185\u6838\u5bf9 Docker\u3001GPU \u76f4\u901a\u548c\u6587\u4ef6\u7cfb\u7edf\u7684\u6027\u80fd\u6709\u5de8\u5927\u63d0\u5347\u3002<\/p>\n<li>\u624b\u52a8\u66f4\u65b0 WSL2 \u5185\u6838&#xff1a; \u5728 PowerShell (\u7ba1\u7406\u5458) \u4e2d\u8fd0\u884c&#xff1a;<\/li>\n<p>wsl <span class=\"token operator\">&#8212;<\/span>update<\/p>\n<p>\u5982\u679c\u8fd9\u6b65\u4f9d\u7136\u62a5\u9519\u6216\u5361\u4f4f&#xff0c;\u8bf4\u660e\u4f60\u7684 Windows \u66f4\u65b0\u7b56\u7565\u9650\u5236\u4e86\u5b83\u3002\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u53bb\u5fae\u8f6f\u5b98\u7f51\u4e0b\u8f7d\u6700\u65b0\u7684 WSL2 Linux Kernel Update Package (MSI) \u624b\u52a8\u5b89\u88c5\u3002<\/p>\n<ul>\n<li>\u4e0b\u8f7d\u5730\u5740&#xff1a;https:\/\/learn.microsoft.com\/en-us\/windows\/wsl\/install-manual#step-4\u2014download-the-linux-kernel-update-package<\/li>\n<li>\u4e0b\u8f7d\u540e\u53cc\u51fb\u5b89\u88c5\u5373\u53ef\u3002<\/li>\n<\/ul>\n<li>\u5b89\u88c5\u5b8c\u6210\u540e&#xff0c;<\/li>\n<p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u5185\u6838\u7248\u672c:<\/p>\n<p>wsl &#8211;shutdown<br \/>\n<span class=\"token comment\"># \u91cd\u65b0\u8fdb\u5165 Ubuntu<\/span><br \/>\nwsl -d Ubuntu-24.04<br \/>\n<span class=\"token comment\"># \u68c0\u67e5\u5185\u6838\u7248\u672c<\/span><br \/>\n<span class=\"token function\">uname<\/span> -r<\/p>\n<p>\u8f93\u51fa<\/p>\n<p>6.6.87.2-microsoft-standard-WSL2<\/p>\n<h2>\u5c06ubuntu\u5bfc\u51fa\u5230D\u76d8<\/h2>\n<p>WSL2 \u7684\u53d1\u884c\u7248\u672c\u8d28\u4e0a\u662f\u4e00\u4e2a .vhdx \u865a\u62df\u78c1\u76d8\u6587\u4ef6\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7 \u201c\u5bfc\u51fa (Export) -&gt; \u6ce8\u9500 (Unregister) -&gt; \u5bfc\u5165 (Import)\u201d \u7684\u4e09\u6b65\u6cd5&#xff0c;\u8f7b\u677e\u628a\u5b83&#034;\u642c\u5bb6&#034;\u5230 D \u76d8\u3002<\/p>\n<p>\u5047\u8bbe\u4f60\u60f3\u628a Ubuntu \u79fb\u52a8\u5230 D:\\\\WSL\\\\Ubuntu-24.04 \u76ee\u5f55\u4e0b\u3002<\/p>\n<p>\u7b2c\u4e00\u6b65&#xff1a;\u5b8c\u5168\u5173\u95ed WSL \u5728\u64cd\u4f5c\u524d&#xff0c;\u5fc5\u987b\u786e\u4fdd Ubuntu \u5df2\u7ecf\u505c\u6b62\u8fd0\u884c&#xff0c;\u5426\u5219\u6587\u4ef6\u4f1a\u88ab\u9501\u5b9a\u3002 \u6253\u5f00 PowerShell (\u7ba1\u7406\u5458)&#xff0c;\u6267\u884c&#xff1a;<\/p>\n<p>wsl &#8211;shutdown<\/p>\n<p>\u7b2c\u4e8c\u6b65&#xff1a;\u5bfc\u51fa Ubuntu \u4e3a\u5907\u4efd\u6587\u4ef6<\/p>\n<p>wsl &#8211;export Ubuntu-24.04 D:<span class=\"token punctuation\">\\\\<\/span>ubuntu-backup.tar<\/p>\n<p>\u7b2c\u4e09\u6b65&#xff1a;\u6ce8\u9500&#xff08;\u5220\u9664&#xff09;\u539f C \u76d8\u7684 Ubuntu<\/p>\n<p>\u26a0\ufe0f \u8b66\u544a&#xff1a;\u8fd9\u4e00\u6b65\u4f1a\u5f7b\u5e95\u5220\u9664\u5f53\u524d\u5b89\u88c5\u5728 C \u76d8\u7684 Ubuntu \u53ca\u5176\u6240\u6709\u6570\u636e\u3002\u8bf7\u786e\u4fdd\u7b2c\u4e8c\u6b65\u7684 .tar \u6587\u4ef6\u5df2\u7ecf\u751f\u6210\u6210\u529f\u4e14\u5927\u5c0f\u6b63\u5e38&#xff08;\u901a\u5e38\u51e0 GB&#xff09;\u3002<\/p>\n<p><span class=\"token comment\"># \u8bed\u6cd5&#xff1a;wsl &#8211;unregister &lt;\u53d1\u884c\u7248\u540d\u79f0&gt;<\/span><br \/>\nwsl &#8211;unregister Ubuntu-24.04<\/p>\n<p>\u6267\u884c\u5b8c\u540e&#xff0c;\u4f60\u5728 wsl -l -v \u4e2d\u5c06\u770b\u4e0d\u5230 Ubuntu-24.04 \u4e86\u3002<\/p>\n<p>\u7b2c\u56db\u6b65&#xff1a;\u5bfc\u5165\u5230 D \u76d8<\/p>\n<p><span class=\"token function\">mkdir<\/span> D:<span class=\"token punctuation\">\\\\<\/span>WSL<span class=\"token punctuation\">\\\\<\/span>Ubuntu-24.04<br \/>\n<span class=\"token comment\"># \u8bed\u6cd5&#xff1a;wsl &#8211;import &lt;\u65b0\u540d\u79f0&gt; &lt;\u5b89\u88c5\u76ee\u5f55&gt; &lt;\u5907\u4efd\u6587\u4ef6\u8def\u5f84&gt; &#8211;version 2<\/span><br \/>\nwsl &#8211;import Ubuntu-24.04 D:<span class=\"token punctuation\">\\\\<\/span>WSL<span class=\"token punctuation\">\\\\<\/span>Ubuntu-24.04 D:<span class=\"token punctuation\">\\\\<\/span>ubuntu-backup.tar &#8211;version <span class=\"token number\">2<\/span><\/p>\n<p>\u7b2c\u4e94\u6b65&#xff1a;\u6062\u590d\u9ed8\u8ba4\u7528\u6237&#xff08;\u91cd\u8981&#xff01;&#xff09; \u901a\u8fc7 &#8211;import \u65b9\u5f0f\u5b89\u88c5\u7684 WSL&#xff0c;\u9ed8\u8ba4\u4f1a\u4ee5 root \u7528\u6237\u767b\u5f55&#xff0c;\u800c\u4e0d\u662f\u4f60\u4e4b\u524d\u521b\u5efa\u7684\u666e\u901a\u7528\u6237\u3002\u6211\u4eec\u9700\u8981\u628a\u5b83\u6539\u56de\u6765\u3002<\/p>\n<p><span class=\"token comment\"># \u542f\u52a8 Ubuntu&#xff1a;<\/span><br \/>\nwsl -d Ubuntu-24.04<\/p>\n<p><span class=\"token comment\"># \u4fee\u6539\u9ed8\u8ba4\u7528\u6237\u914d\u7f6e&#xff1a;<\/span><br \/>\n<span class=\"token comment\"># # \u521b\u5efa\/\u7f16\u8f91 wsl.conf<\/span><br \/>\n<span class=\"token function\">nano<\/span> \/etc\/wsl.conf<\/p>\n<p>\u5728\u6587\u4ef6\u4e2d\u52a0\u5165\u4ee5\u4e0b\u5185\u5bb9&#xff08;\u628a myuser \u6362\u6210\u4f60\u771f\u5b9e\u7684\u7528\u6237\u540d&#xff09;&#xff1a;<\/p>\n<p>[user]<br \/>\ndefault&#061;myuser<\/p>\n<p>\u6309 Ctrl&#043;O \u4fdd\u5b58&#xff0c;Enter \u786e\u8ba4&#xff0c;Ctrl&#043;X \u9000\u51fa\u3002<\/p>\n<p>\u91cd\u542f WSL \u751f\u6548&#xff1a;<\/p>\n<p>wsl &#8211;shutdown<br \/>\nwsl -d Ubuntu-24.04<\/p>\n<p>\u7b2c\u516d\u6b65&#xff1a;\u6e05\u7406\u4e34\u65f6\u6587\u4ef6 \u786e\u8ba4 D \u76d8\u7684 Ubuntu \u8fd0\u884c\u6b63\u5e38&#xff0c;\u6570\u636e\u90fd\u5728&#xff0c;\u5c31\u53ef\u4ee5\u5220\u9664\u90a3\u4e2a\u5de8\u5927\u7684\u4e34\u65f6\u5907\u4efd\u5305\u4e86&#xff1a;<\/p>\n<p>del D:<span class=\"token punctuation\">\\\\<\/span>ubuntu-backup.tar<\/p>\n<p>\u6700\u540e\u4f9d\u65e7\u68c0\u67e5<\/p>\n<p>wsl -l -v<\/p>\n<h2>\u5b89\u88c5Docker Desktop<\/h2>\n<p>\u63a8\u8350\u65b9\u6848&#xff1a;\u5b89\u88c5 Docker Desktop \u867d\u7136\u7eaf\u547d\u4ee4\u884c\u515a\u53ef\u80fd\u66f4\u559c\u6b22\u76f4\u63a5\u88c5 docker.io&#xff0c;\u4f46\u5728 WSL2 &#043; GPU \u8fd9\u4e2a\u7279\u5b9a\u573a\u666f\u4e0b&#xff0c;Docker Desktop \u662f\u76ee\u524d\u552f\u4e00\u80fd&#034;\u5f00\u7bb1\u5373\u7528&#034;\u4e14&#034;\u7701\u5fc3&#034;\u7684\u65b9\u6848\u3002 \u4e3a\u4ec0\u4e48\u9009 Docker Desktop&#xff1f;<\/p>\n<li>GPU \u76f4\u901a\u81ea\u52a8\u5316&#xff1a;\n<ul>\n<li>Docker Desktop&#xff1a;\u5b89\u88c5\u65f6\u52fe\u9009 \u201cUse WSL 2 based engine\u201d&#xff0c;\u5b83\u4f1a\u81ea\u52a8\u914d\u7f6e\u597d NVIDIA Container Toolkit\u3002\u4f60\u53ea\u9700\u8981\u5728 docker-compose.yml \u91cc\u5199 deploy.resources\u2026&#xff0c;\u5b83\u5c31\u80fd\u81ea\u52a8\u8c03\u7528\u4f60\u7684 4070 \u663e\u5361\u8dd1 Qwen\u3002<\/li>\n<li>\u624b\u52a8\u5b89\u88c5 (docker.io)&#xff1a;\u4f60\u9700\u8981\u624b\u52a8\u5b89\u88c5 NVIDIA Driver (WSL\u7248)\u3001\u624b\u52a8\u5b89\u88c5 nvidia-container-toolkit\u3001\u624b\u52a8\u4fee\u6539 \/etc\/docker\/daemon.json\u3001\u624b\u52a8\u91cd\u542f docker \u670d\u52a1\u3002\u4e00\u65e6 WSL \u5185\u6838\u66f4\u65b0&#xff0c;\u8fd8\u53ef\u80fd\u5931\u6548&#xff0c;\u6392\u67e5\u8d77\u6765\u975e\u5e38\u5934\u75bc\u3002<\/li>\n<\/ul>\n<\/li>\n<li>WSL \u96c6\u6210\u7ba1\u7406&#xff1a;\n<ul>\n<li>Docker Desktop \u6709\u4e00\u4e2a\u6f02\u4eae\u7684 GUI&#xff0c;\u53ef\u4ee5\u76f4\u89c2\u5730\u770b\u5230\u54ea\u4e2a WSL \u53d1\u884c\u7248&#xff08;Ubuntu-24.04&#xff09;\u88ab\u6fc0\u6d3b\u4e86&#xff0c;\u8d44\u6e90\u5360\u7528\u591a\u5c11&#xff0c;\u4e00\u952e\u5f00\u5173\u3002<\/li>\n<li>\u5b83\u4f1a\u81ea\u52a8\u5904\u7406 Windows \u548c WSL2 \u4e4b\u95f4\u7684\u7aef\u53e3\u6620\u5c04\u548c\u7f51\u7edc\u6865\u63a5\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u4e0a\u4e0b\u6587\u5207\u6362&#xff1a;\n<ul>\n<li>\u4f5c\u4e3a\u5168\u6808&#xff0c;\u4f60\u53ef\u80fd\u5076\u5c14\u9700\u8981\u5207\u6362\u5230\u5176\u4ed6\u5bb9\u5668\u73af\u5883&#xff0c;Docker Desktop \u7684 Context \u7ba1\u7406\u975e\u5e38\u65b9\u4fbf\u3002<\/li>\n<\/ul>\n<\/li>\n<p>\u4ec0\u4e48\u65f6\u5019\u624d\u9009\u624b\u52a8\u5b89\u88c5 (docker.io)&#xff1f;<\/p>\n<ul>\n<li>\u4f60\u7684\u7535\u8111\u5185\u5b58\u6781\u5c0f&#xff08;&lt;8G&#xff09;&#xff0c;\u65e0\u6cd5\u627f\u53d7 Docker Desktop \u7684\u540e\u53f0\u8fdb\u7a0b&#xff08;\u4f46\u4f60\u7531 64G \u5185\u5b58&#xff0c;\u5b8c\u5168\u4e0d\u7528\u8003\u8651\u8fd9\u4e2a&#xff09;\u3002<\/li>\n<li>\u4f60\u5728\u6784\u5efa\u6781\u5ea6\u7cbe\u7b80\u7684\u751f\u4ea7\u73af\u5883\u955c\u50cf&#xff0c;\u4e0d\u5141\u8bb8\u4efb\u4f55 GUI \u7ec4\u4ef6\u3002<\/li>\n<li>\u4f60\u662f Linux \u5185\u6838\u4e13\u5bb6&#xff0c;\u4eab\u53d7\u624b\u52a8\u914d\u7f6e\u6bcf\u4e00\u4e2a\u53c2\u6570\u7684\u8fc7\u7a0b\u3002<\/li>\n<\/ul>\n<h3>\u5907\u4efd\u539f\u6709mysql\u5e76\u505c\u6b62<\/h3>\n<p>\u56e0\u4e3a\u6211\u662f\u6253\u7b97\u8fc1\u79fb\u5230Docker Desktop&#xff0c;\u6240\u4ee5\u5148\u5907\u4efdmysql<\/p>\n<p><span class=\"token comment\"># windows\u4e0b<\/span><br \/>\nmysqldump -u root -p &#8211;all-databases &#8211;single-transaction &#8211;quick &#8211;lock-tables<span class=\"token operator\">&#061;<\/span>false <span class=\"token operator\">&gt;<\/span> D:<span class=\"token punctuation\">\\\\<\/span>mysql_backup_all.sql<\/p>\n<p><span class=\"token comment\"># \u8fdb\u5165 WSL2 Ubuntu \u7ec8\u7aef<\/span><br \/>\nwsl -d Ubuntu-24.04<\/p>\n<p><span class=\"token comment\"># \u9a8c\u8bc1\u80fd\u5426\u8bbf\u95ee Windows \u6587\u4ef6<\/span><br \/>\n<span class=\"token comment\"># WSL2 \u81ea\u52a8\u5c06 Windows \u78c1\u76d8\u6302\u8f7d\u5728 \/mnt\/ \u4e0b\u3002<\/span><br \/>\n<span class=\"token function\">ls<\/span> -lh \/mnt\/d\/mysql_backup_all.sql<\/p>\n<p>\u5982\u679c\u80fd\u770b\u5230\u6587\u4ef6\u4fe1\u606f&#xff0c;\u8bf4\u660e\u901a\u8def\u6b63\u5e38\u3002<\/p>\n<p>\u505c\u7528 Windows MySQL<\/p>\n<li>\u6309 Win &#043; R&#xff0c;\u8f93\u5165 services.msc&#xff0c;\u56de\u8f66\u3002<\/li>\n<li>\u627e\u5230 MySQL \u670d\u52a1&#xff1a;\u901a\u5e38\u53eb MySQL\u3001MySQL80 \u6216 MariaDB&#xff08;\u6211\u7684\u662fmysql57&#xff09;<\/li>\n<li>\u505c\u6b62\u5e76\u7981\u7528&#xff1a;\n<li>\u53f3\u952e\u70b9\u51fb -&gt; \u505c\u6b62 (Stop)\u3002<\/li>\n<li>\u53cc\u51fb\u8fdb\u5165\u5c5e\u6027 -&gt; \u5c06&#034;\u542f\u52a8\u7c7b\u578b&#034;\u6539\u4e3a \u624b\u52a8 (Manual) \u6216 \u7981\u7528 (Disabled)\u3002<\/li>\n<li>\u5efa\u8bae\u9009&#034;\u624b\u52a8&#034;&#xff1a;\u4e07\u4e00\u54ea\u5929 Docker \u6302\u4e86\u6025\u9700\u4e34\u65f6\u7528\u539f\u751f\u5e93\u6551\u6025&#xff0c;\u8fd8\u80fd\u624b\u52a8\u5f00\u4e00\u4e0b<\/li>\n<\/li>\n<p>\u9a8c\u8bc1\u7aef\u53e3\u91ca\u653e&#xff1a; \u5728 PowerShell \u8fd0\u884c&#xff1a;<\/p>\n<p><span class=\"token function\">netstat<\/span> -ano <span class=\"token operator\">|<\/span> findstr :3306<\/p>\n<p>\u5982\u679c\u6ca1\u6709\u8f93\u51fa&#xff0c;\u8bf4\u660e\u7aef\u53e3\u5df2\u91ca\u653e&#xff0c;\u5b8c\u7f8e&#xff01;(\u5982\u679c\u6709&#xff0c;\u7b49\u4e00\u4f1a\u518d\u770b\u4e00\u4e0b)<\/p>\n<h3>&#x1f680; \u6267\u884c\u6b65\u9aa4&#xff1a;\u5b89\u88c5 Docker Desktop<\/h3>\n<p>\u65e2\u7136\u4f60\u5df2\u7ecf\u5728 D \u76d8\u5b89\u597d\u4e86 Ubuntu&#xff0c;\u6211\u4eec\u6309\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c&#xff1a;<\/p>\n<li>\u4e0b\u8f7d\u4e0e\u5b89\u88c5 (\u5728 Windows \u5bbf\u4e3b\u673a\u64cd\u4f5c)\n<li>\u8bbf\u95ee Docker Desktop \u5b98\u7f51\u3002<\/li>\n<li>\u4e0b\u8f7d Windows \u7248 (\u5b83\u4f1a\u540c\u65f6\u652f\u6301 WSL2)\u3002<\/li>\n<li>\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3002<\/li>\n<li>\u5173\u952e\u914d\u7f6e&#xff1a;\u5728\u5b89\u88c5\u5411\u5bfc\u4e2d&#xff0c;\u786e\u4fdd\u52fe\u9009 \u201cUse WSL 2 instead of Hyper-V\u201d (\u9ed8\u8ba4\u901a\u5e38\u5c31\u662f)\u3002<\/li>\n<li>\u5b89\u88c5\u5b8c\u6210\u540e&#xff0c;\u91cd\u542f\u7535\u8111&#xff08;\u6216\u8005\u6ce8\u9500\u91cd\u65b0\u767b\u5f55&#xff09;\u3002<\/li>\n<\/li>\n<li>\u521d\u59cb\u5316\u914d\u7f6e (\u5728 Windows \u64cd\u4f5c)\n<li>\u542f\u52a8 Docker Desktop\u3002<\/li>\n<li>\u9996\u6b21\u542f\u52a8\u4f1a\u63d0\u793a\u4f60\u540c\u610f\u534f\u8bae\u3002<\/li>\n<li>\u8fdb\u5165 Settings (\u9f7f\u8f6e\u56fe\u6807) -&gt; Resources -&gt; WSL Integration\u3002<\/li>\n<li>\u4f60\u4f1a\u770b\u5230\u4f60\u7684 Ubuntu-24.04 \u51fa\u73b0\u5728\u5217\u8868\u4e2d\u3002\n<ul>\n<li>\u2705 \u5f00\u542f \u201cEnable integration with my default WSL distro\u201d\u3002<\/li>\n<li>\u2705 \u5f00\u542f \u201cUbuntu-24.04\u201d \u7684\u5f00\u5173\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u70b9\u51fb Apply &amp; Restart\u3002<\/li>\n<\/li>\n<li>\u9a8c\u8bc1\u5b89\u88c5 (\u5728 Ubuntu \u7ec8\u7aef\u64cd\u4f5c)<\/li>\n<p>\u6253\u5f00\u4f60\u7684 WSL2 Ubuntu \u7ec8\u7aef&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u8fdb\u5165Ubuntu<\/span><br \/>\nwsl -d Ubuntu-24.04<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5 docker \u547d\u4ee4\u662f\u5426\u53ef\u7528<\/span><br \/>\n<span class=\"token function\">docker<\/span> &#8211;version<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u662f\u5426\u80fd\u8fde\u63a5\u5230\u5b88\u62a4\u8fdb\u7a0b<\/span><br \/>\n<span class=\"token function\">docker<\/span> info<br \/>\n<span class=\"token comment\"># \u5173\u952e\u6d4b\u8bd5&#xff1a;\u68c0\u67e5 GPU \u662f\u5426\u88ab\u8bc6\u522b<\/span><br \/>\n<span class=\"token comment\"># \u8fd0\u884c\u4e00\u4e2a\u5e26\u6709 nvidia-smi \u7684\u4e34\u65f6\u5bb9\u5668<\/span><br \/>\n<span class=\"token function\">docker<\/span> run &#8211;rm &#8211;gpus all nvidia\/cuda:12.1.0-base-ubuntu22.04 nvidia-smi<\/p>\n<p>\u5982\u679c\u6210\u529f&#xff1a;\u4f60\u4f1a\u770b\u5230\u4e00\u4e2a\u8868\u683c&#xff0c;\u663e\u793a\u4f60\u7684 RTX 4070 \u663e\u5361\u4fe1\u606f\u3001\u663e\u5b58\u5360\u7528\u7b49\u3002<\/p>\n<h3>docker\u914d\u7f6e<\/h3>\n<h4>&#x1f680; \u7b2c\u4e00\u6b65&#xff1a;\u521b\u5efa\u9879\u76ee\u7ed3\u6784\u4e0e\u914d\u7f6e\u6587\u4ef6<\/h4>\n<p>\u8bf7\u5728\u4f60\u7684 WSL2 Ubuntu \u7ec8\u7aef \u4e2d\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4&#xff1a;<\/p>\n<p><span class=\"token comment\"># 1. \u521b\u5efa\u9879\u76ee\u6839\u76ee\u5f55<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> -p ~\/ai-stack <span class=\"token operator\">&amp;&amp;<\/span> <span class=\"token builtin class-name\">cd<\/span> ~\/ai-stack<\/p>\n<p><span class=\"token comment\"># 2. \u521b\u5efa\u6570\u636e\u6302\u8f7d\u76ee\u5f55 (\u9632\u6b62\u6743\u9650\u95ee\u9898)<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> -p data\/redis data\/mysql models<\/p>\n<p><span class=\"token comment\"># 3. \u521b\u5efa docker-compose.yml \u6587\u4ef6<\/span><br \/>\n<span class=\"token function\">nano<\/span> docker-compose.yml<\/p>\n<h4>&#x1f4dd; \u7b2c\u4e8c\u6b65&#xff1a;\u586b\u5165\u914d\u7f6e\u5185\u5bb9<\/h4>\n<p>\u5c06\u4ee5\u4e0b\u5185\u5bb9\u5b8c\u6574\u590d\u5236\u5e76\u7c98\u8d34\u5230 nano \u7f16\u8f91\u5668\u4e2d&#xff1a;<\/p>\n<p><span class=\"token key atrule\">services<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">redis<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> redis<span class=\"token punctuation\">:<\/span>7.4<span class=\"token punctuation\">&#8211;<\/span>alpine<br \/>\n    <span class=\"token key atrule\">container_name<\/span><span class=\"token punctuation\">:<\/span> redis<span class=\"token punctuation\">&#8211;<\/span>local<br \/>\n    <span class=\"token key atrule\">ports<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token string\">&#034;6379:6379&#034;<\/span><br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> .\/data\/redis<span class=\"token punctuation\">:<\/span>\/data<br \/>\n    <span class=\"token key atrule\">command<\/span><span class=\"token punctuation\">:<\/span> redis<span class=\"token punctuation\">&#8211;<\/span>server <span class=\"token punctuation\">&#8211;<\/span><span class=\"token punctuation\">&#8211;<\/span>appendonly yes<br \/>\n    <span class=\"token key atrule\">restart<\/span><span class=\"token punctuation\">:<\/span> unless<span class=\"token punctuation\">&#8211;<\/span>stopped<br \/>\n    <span class=\"token key atrule\">networks<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> ai<span class=\"token punctuation\">&#8211;<\/span>net<\/p>\n<p>  <span class=\"token key atrule\">mysql<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> mysql<span class=\"token punctuation\">:<\/span><span class=\"token number\">8.0<\/span><br \/>\n    <span class=\"token key atrule\">container_name<\/span><span class=\"token punctuation\">:<\/span> mysql<span class=\"token punctuation\">&#8211;<\/span>local<br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">MYSQL_ROOT_PASSWORD<\/span><span class=\"token punctuation\">:<\/span> xxxxxxx <span class=\"token comment\"># \u4f60\u7684mysql\u5bc6\u7801<\/span><br \/>\n      <span class=\"token key atrule\">TZ<\/span><span class=\"token punctuation\">:<\/span> Asia\/Shanghai<br \/>\n    <span class=\"token key atrule\">ports<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token string\">&#034;3306:3306&#034;<\/span><br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> .\/data\/mysql<span class=\"token punctuation\">:<\/span>\/var\/lib\/mysql<br \/>\n    <span class=\"token key atrule\">command<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">&#8211;<\/span><span class=\"token punctuation\">&#8211;<\/span>character<span class=\"token punctuation\">&#8211;<\/span>set<span class=\"token punctuation\">&#8211;<\/span>server&#061;utf8mb4 <span class=\"token punctuation\">&#8211;<\/span><span class=\"token punctuation\">&#8211;<\/span>collation<span class=\"token punctuation\">&#8211;<\/span>server&#061;utf8mb4_unicode_ci<br \/>\n    <span class=\"token key atrule\">restart<\/span><span class=\"token punctuation\">:<\/span> unless<span class=\"token punctuation\">&#8211;<\/span>stopped<br \/>\n    <span class=\"token key atrule\">networks<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> ai<span class=\"token punctuation\">&#8211;<\/span>net<\/p>\n<p>  <span class=\"token key atrule\">qwen<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> vllm\/vllm<span class=\"token punctuation\">&#8211;<\/span>openai<span class=\"token punctuation\">:<\/span>latest<br \/>\n    <span class=\"token key atrule\">container_name<\/span><span class=\"token punctuation\">:<\/span> qwen<span class=\"token punctuation\">&#8211;<\/span>local<br \/>\n    <span class=\"token key atrule\">ports<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token string\">&#034;7575:8000&#034;<\/span><br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> \/mnt\/d\/Models\/Qwen3<span class=\"token punctuation\">&#8211;<\/span>4B<span class=\"token punctuation\">:<\/span>\/models<br \/>\n    <span class=\"token key atrule\">deploy<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">resources<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">reservations<\/span><span class=\"token punctuation\">:<\/span><br \/>\n          <span class=\"token key atrule\">devices<\/span><span class=\"token punctuation\">:<\/span><br \/>\n            <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">driver<\/span><span class=\"token punctuation\">:<\/span> nvidia<br \/>\n              <span class=\"token key atrule\">count<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">1<\/span><br \/>\n              <span class=\"token key atrule\">capabilities<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span>gpu<span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token key atrule\">command<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">&gt;<\/span><span class=\"token scalar string\"><br \/>\n      \/models<br \/>\n      &#8211;dtype half<br \/>\n      &#8211;gpu-memory-utilization 0.85<br \/>\n      &#8211;max-model-len 8192<br \/>\n      &#8211;served-model-name qwen-3-4b<\/span><br \/>\n    <span class=\"token key atrule\">restart<\/span><span class=\"token punctuation\">:<\/span> unless<span class=\"token punctuation\">&#8211;<\/span>stopped<br \/>\n    <span class=\"token key atrule\">networks<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> ai<span class=\"token punctuation\">&#8211;<\/span>net<br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> HF_ENDPOINT&#061;https<span class=\"token punctuation\">:<\/span>\/\/hf<span class=\"token punctuation\">&#8211;<\/span>mirror.com<\/p>\n<p><span class=\"token key atrule\">networks<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">ai-net<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">driver<\/span><span class=\"token punctuation\">:<\/span> bridge<\/p>\n<p>&#x1f4a1; \u914d\u7f6e\u4eae\u70b9\u89e3\u6790&#xff1a;<\/p>\n<ul>\n<li>Redis: \u4f7f\u7528\u4e86 alpine \u955c\u50cf&#xff0c;\u4f53\u79ef\u6781\u5c0f&#xff0c;\u542f\u52a8\u6781\u5feb\u3002\u5f00\u542f\u4e86 &#8211;appendonly yes (AOF)&#xff0c;\u4fdd\u8bc1\u6570\u636e\u4e0d\u4e22\u5931\u3002<\/li>\n<li>MySQL: \u8bbe\u7f6e\u4e86 utf8mb4 \u5b57\u7b26\u96c6&#xff0c;\u907f\u514d\u4e2d\u6587\u4e71\u7801\u3002\u589e\u52a0\u4e86\u65f6\u533a\u8bbe\u7f6e\u3002<\/li>\n<li>Qwen:\n<ul>\n<li>\u2013gpu-memory-utilization 0.85: \u9884\u7559 15% \u663e\u5b58\u7ed9\u7cfb\u7edf\u548c\u5176\u4ed6\u4efb\u52a1&#xff0c;\u9632\u6b62 OOM\u3002<\/li>\n<li>\u2013served-model-name: \u7ed9\u6a21\u578b\u8d77\u4e2a\u522b\u540d&#xff0c;\u65b9\u4fbf\u4ee3\u7801\u91cc\u8c03\u7528\u3002<\/li>\n<li>networks: \u6240\u6709\u5bb9\u5668\u52a0\u5165\u540c\u4e00\u4e2a ai-net \u7f51\u7edc\u3002\u4ee5\u540e\u4f60\u7684 Agent \u4ee3\u7801\u5982\u679c\u5728\u53e6\u4e00\u4e2a\u5bb9\u5668\u91cc&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u7528 redis:\/\/redis:6379 \u8fde\u63a5&#xff0c;\u65e0\u9700\u77e5\u9053 IP\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>&#x1f6e0;\ufe0f \u7b2c\u4e09\u6b65&#xff1a;\u542f\u52a8\u670d\u52a1<\/h4>\n<p>\u4fdd\u5b58\u6587\u4ef6 (Ctrl&#043;O, Enter) \u5e76\u9000\u51fa (Ctrl&#043;X)&#xff0c;\u7136\u540e\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token comment\"># 1. \u62c9\u53d6\u955c\u50cf\u5e76\u542f\u52a8\u6240\u6709\u670d\u52a1 (-d \u8868\u793a\u540e\u53f0\u8fd0\u884c)<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose up -d<\/p>\n<p><span class=\"token comment\"># 2. \u5b9e\u65f6\u67e5\u770b\u65e5\u5fd7 (\u89c2\u5bdf Qwen \u52a0\u8f7d\u6a21\u578b\u7684\u8fc7\u7a0b&#xff0c;\u8fd9\u53ef\u80fd\u9700\u8981\u51e0\u5206\u949f)<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose logs -f qwen<\/p>\n<p><span class=\"token comment\"># 3. \u5c06\u5907\u4efd\u7684sql\u6570\u636e\u6062\u590d\u5230mysql\u4e2d prootpassword \u4e3a\u4f60\u7684mysql\u5bc6\u7801 \u76f4\u63a5\u7ba1\u9053\u5bfc\u5165&#xff08;\u63a8\u8350&#xff09; -f \u5f3a\u5236\u5bfc\u5165 \u5ffd\u7565\u6743\u9650\u9519\u8bef<\/span><br \/>\n<span class=\"token function\">cat<\/span> \/mnt\/d\/mysql_backup_all.sql <span class=\"token operator\">|<\/span> <span class=\"token function\">docker<\/span> <span class=\"token builtin class-name\">exec<\/span> -i mysql-local mysql -uroot -prootpassword -f<\/p>\n<p><span class=\"token comment\"># \u2705 \u9a8c\u8bc1\u5bfc\u5165\u7ed3\u679c<\/span><br \/>\n<span class=\"token comment\"># \u8fdb\u5165\u5bb9\u5668\u5185\u90e8&#xff1a;<\/span><br \/>\n<span class=\"token function\">docker<\/span> <span class=\"token builtin class-name\">exec<\/span> -it mysql-local mysql -uroot -pxxx<br \/>\nshow databases<span class=\"token punctuation\">;<\/span><br \/>\nUSE blog_project<span class=\"token punctuation\">;<\/span><br \/>\nshow tables<span class=\"token punctuation\">;<\/span><br \/>\nEXIT<span class=\"token punctuation\">;<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227105116-69a1772493cd5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h5>\u7f51\u7edc\u8bbe\u7f6e<\/h5>\n<p>\u5982\u679c\u51fa\u73b0\u4e86\u7f51\u7edc\u8fde\u63a5\u8d85\u65f6\u6216\u4e2d\u65ad\u95ee\u9898<\/p>\n<p>Error response from daemon: failed to resolve reference &#034;docker.io\/library\/mysql:8.0&#034;: failed to do request: Head &#034;https:\/\/registry-1.docker.io\/v2\/library\/mysql\/manifests\/8.0&#034;: EOF<\/p>\n<p>\u53ef\u4ee5\u914d\u7f6e Docker Desktop \u4f7f\u7528proxy&#xff08;\u6700\u63a8\u8350&#xff0c;\u56fe\u5f62\u5316&#xff09;<\/p>\n<li>\u6253\u5f00 Docker Desktop \u754c\u9762\u3002<\/li>\n<li>\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684 \u9f7f\u8f6e\u56fe\u6807 (Settings)\u3002<\/li>\n<li>\u9009\u62e9\u5de6\u4fa7\u7684 Resources -&gt; Proxies\u3002<\/li>\n<li>\u9009\u62e9 Manual proxy configuration\u3002<\/li>\n<li>\u586b\u5199\u4f60\u7684proxy\u4fe1\u606f&#xff1a;\n<ul>\n<li>HTTP Proxy: http:\/\/host.docker.internal:7897\n<p>\u6ce8\u610f&#xff1a;\u5728 Docker Desktop \u8bbe\u7f6e\u91cc&#xff0c;\u901a\u5e38\u7528 host.docker.internal \u4ee3\u8868\u5bbf\u4e3b\u673a Windows\u3002\u5982\u679c\u4e0d\u884c&#xff0c;\u8bd5\u4e00\u4e0b http:\/\/192.168.x.x:7897 (\u4f60\u7684 Windows \u5c40\u57df\u7f51 IP)\u3002<\/p>\n<\/li>\n<li>HTTPS Proxy: http:\/\/host.docker.internal:7897<\/li>\n<li>No Proxy: localhost,127.0.0.1,.local,.internal<\/li>\n<\/ul>\n<\/li>\n<li>\u70b9\u51fb Apply &amp; Restart\u3002<\/li>\n<p>\u91cd\u542f\u5b8c\u6210\u540e&#xff0c;\u518d\u6b21\u5c1d\u8bd5\u8fd0\u884c docker compose up -d\u3002<\/p>\n<ul>\n<li>\u6ce8\u610f&#xff1a;\u8bb0\u5f97\u5728\u8bbe\u7f6e\u91cc\u5f00\u542f&#034;\u5c40\u57df\u7f51\u8fde\u63a5&#034;&#xff0c;\u5e76\u4e14\u68c0\u67e5proxy\u8282\u70b9<\/li>\n<\/ul>\n<h5>\u7f51\u7edc\u6ce2\u52a8\u5bfc\u81f4\u5931\u8d25<\/h5>\n<p>\u4e0b\u8f7d\u5927\u6a21\u578b&#xff08;\u5c24\u5176\u662f\u50cf Qwen \u8fd9\u79cd\u51e0\u5341 GB \u7684\u6a21\u578b&#xff09;\u65f6&#xff0c;\u7f51\u7edc\u6ce2\u52a8\u5bfc\u81f4\u5931\u8d25\u662f\u975e\u5e38\u4ee4\u4eba\u5d29\u6e83\u7684\u3002\u56e0\u4e3a vLLM \u6216 HuggingFace \u9ed8\u8ba4\u662f\u6d41\u5f0f\u4e0b\u8f7d&#xff0c;\u4e00\u65e6\u4e2d\u65ad&#xff0c;\u5f80\u5f80\u9700\u8981\u4ece\u5934\u5f00\u59cb\u6216\u8005\u5f88\u96be\u65ad\u70b9\u7eed\u4f20\u3002<\/p>\n<p>&#x1f3c6; \u65b9\u6848\u4e00&#xff1a;\u5728 Windows \u4e0b\u7528&#034;\u4e0b\u8f7d\u5668&#034;\u4e0b\u8f7d&#xff0c;\u518d\u6620\u5c04\u8fdb WSL2&#xff08;\u6700\u7a33\u3001\u6700\u5feb&#xff09;<\/p>\n<p>\u4f7f\u7528 Git LFS \u6216 huggingface-cli \u4e0b\u8f7d (\u63a8\u8350)&#xff1a; \u5728 Windows PowerShell \u4e2d\u8fd0\u884c&#xff08;\u8bb0\u5f97\u5f00\u542f&#034;\u5141\u8bb8\u5c40\u57df\u7f51&#034;\u4e14\u914d\u7f6e\u4e86\u73af\u5883\u53d8\u91cf&#xff09;&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6eproxy (\u4e34\u65f6\u751f\u6548)<\/span><br \/>\n<span class=\"token variable\">$env<\/span>:HF_ENDPOINT<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;https:\/\/hf-mirror.com&#034;<\/span> <span class=\"token comment\"># \u4f7f\u7528\u56fd\u5185\u955c\u50cf\u6e90\u52a0\u901f<\/span><br \/>\n<span class=\"token variable\">$env<\/span>:HTTP_PROXY<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;http:\/\/127.0.0.1:7897&#034;<\/span><br \/>\n<span class=\"token variable\">$env<\/span>:HTTPS_PROXY<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;http:\/\/127.0.0.1:7897&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u5b89\u88c5 huggingface hub (\u5982\u679c\u6ca1\u88c5)<\/span><br \/>\npip <span class=\"token function\">install<\/span> huggingface_hub<\/p>\n<p><span class=\"token comment\"># \u4e0b\u8f7d\u6a21\u578b\u5230 Windows \u672c\u5730\u76ee\u5f55 (\u4f8b\u5982 D:\\\\Models\\\\Qwen3-4B)<\/span><br \/>\nhuggingface-cli download &#8211;resume-download Qwen\/Qwen3-4B &#8211;local-dir <span class=\"token string\">&#034;D:\\\\Models\\\\Qwen3-4B&#034;<\/span><\/p>\n<p>&#8211;resume-download&#xff1a;\u5173\u952e\u53c2\u6570&#xff01;\u652f\u6301\u65ad\u70b9\u7eed\u4f20\u3002\u5982\u679c\u65ad\u4e86&#xff0c;\u91cd\u65b0\u8fd0\u884c\u547d\u4ee4\u5b83\u4f1a\u63a5\u7740\u4e0b\u3002<\/p>\n<p>\u518d\u4e0d\u884c \u5c31\u76f4\u63a5\u53bbhuggingface.co\u4e0b\u8f7d https:\/\/huggingface.co\/Qwen\/Qwen3-4B\/tree\/main?show_file_info&#061;model-00002-of-00003.safetensors<\/p>\n<p>\u6620\u5c04\u5230 WSL2&#xff1a;<\/p>\n<ul>\n<li>\u4e0b\u8f7d\u5b8c\u6210\u540e&#xff0c;\u6587\u4ef6\u5728 D:\\\\Models\\\\Qwen3-4B\u3002<\/li>\n<li>\u5728 WSL2 \u4e2d&#xff0c;\u8fd9\u4e2a\u8def\u5f84\u81ea\u52a8\u6302\u8f7d\u4e3a \/mnt\/d\/Models\/Qwen3-4B\u3002<\/li>\n<\/ul>\n<p>\u4fee\u6539 Docker Compose&#xff1a;<\/p>\n<ul>\n<li>\u7f16\u8f91 ~\/ai-stack\/docker-compose.yml&#xff0c;\u5c06\u5377\u6302\u8f7d\u8def\u5f84\u6307\u5411\u8fd9\u91cc&#xff1a;<\/li>\n<\/ul>\n<p><span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token comment\"># \u539f\u6765&#xff1a;- .\/models:\/models<\/span><br \/>\n  <span class=\"token comment\"># \u73b0\u5728&#xff1a;\u76f4\u63a5\u6302\u8f7d Windows \u4e0b\u8f7d\u597d\u7684\u76ee\u5f55 (\u53ea\u8bfb\u6a21\u5f0f ro \u53ef\u9009&#xff0c;\u9632\u6b62\u8bef\u5220)<\/span><br \/>\n  <span class=\"token punctuation\">&#8211;<\/span> \/mnt\/d\/Models\/Qwen3<span class=\"token punctuation\">&#8211;<\/span>4B<span class=\"token punctuation\">:<\/span>\/models<span class=\"token punctuation\">:<\/span>ro<\/p>\n<p>\u542f\u52a8\u670d\u52a1&#xff1a;<\/p>\n<p><span class=\"token function\">docker<\/span> compose up -d<\/p>\n<h3>\u73b0\u4ee3\u4e91\u539f\u751f\u5f00\u53d1\u7684\u6838\u5fc3\u7406\u5ff5<\/h3>\n<p>\u95ee\u9898:\u8fd9\u662f\u4e13\u95e8\u4e3a\u6211\u7684ai agent\u5f00\u53d1\u51c6\u5907\u7684\u73af\u5883\u5417&#xff1f; \u8fd8\u662f\u8bf4\u8fd9\u662f\u7edf\u4e00\u914d\u7f6e\u7684\u73af\u5883&#xff0c;\u6211\u5e0c\u671bmysql\u548credis\u80fd\u4f5c\u4e3a\u72ec\u7acb\u670d\u52a1\u8fdb\u884c\u90e8\u7f72<\/p>\n<ul>\n<li>\u7b80\u77ed\u7684\u56de\u7b54\u662f&#xff1a;\u8fd9\u662f\u4e00\u4e2a&#034;\u7edf\u4e00\u914d\u7f6e\u7684\u5f00\u53d1\u73af\u5883&#034;&#xff0c;\u4f46\u5176\u4e2d\u7684 MySQL \u548c Redis \u786e\u5b9e\u662f\u4f5c\u4e3a&#034;\u72ec\u7acb\u670d\u52a1&#034;\u8fd0\u884c\u7684\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u79cd\u67b6\u6784\u65e2\u4e0d\u662f&#034;\u4e3a\u4e86 AI \u786c\u51d1\u7684\u4e34\u65f6\u65b9\u6848&#034;&#xff0c;\u4e5f\u4e0d\u662f&#034;\u628a\u6240\u6709\u4e1c\u897f\u585e\u8fdb\u4e00\u4e2a\u9ed1\u76d2&#034;\u3002\u5b83\u662f\u76ee\u524d\u4e1a\u754c&#xff08;\u5305\u62ec\u963f\u91cc\u3001\u5b57\u8282\u3001Google \u7b49&#xff09;\u6700\u6807\u51c6\u7684\u5fae\u670d\u52a1\u5316\u5f00\u53d1\u6a21\u5f0f\u3002<\/p>\n<p>\u8ba9\u6211\u4e3a\u4f60\u8be6\u7ec6\u62c6\u89e3\u4e00\u4e0b\u8fd9\u4e2a\u8bbe\u8ba1\u7684\u7cbe\u5999\u4e4b\u5904&#xff1a;<\/p>\n<li>\u6838\u5fc3\u6982\u5ff5&#xff1a;\u5bb9\u5668\u5316 &#061; \u72ec\u7acb\u670d\u52a1 \u5728 docker-compose.yml \u4e2d&#xff0c;redis\u3001mysql\u3001qwen \u5206\u522b\u5b9a\u4e49\u5728\u4e09\u4e2a\u72ec\u7acb\u7684 services \u5757\u91cc\u3002\n<ul>\n<li>\u72ec\u7acb\u6027&#xff1a;\u5b83\u4eec\u8fd0\u884c\u5728\u4e09\u4e2a\u5b8c\u5168\u9694\u79bb\u7684\u5bb9\u5668\u4e2d\u3002\n<ul>\n<li>Redis \u6302\u4e86&#xff0c;MySQL \u548c Qwen \u4e0d\u53d7\u5f71\u54cd\u3002<\/li>\n<li>\u4f60\u53ef\u4ee5\u5355\u72ec\u91cd\u542f MySQL (docker restart mysql-local)&#xff0c;\u800c\u4e0d\u9700\u8981\u52a8 Qwen\u3002<\/li>\n<li>\u5b83\u4eec\u6709\u72ec\u7acb\u7684\u8fdb\u7a0b\u3001\u72ec\u7acb\u7684\u6587\u4ef6\u7cfb\u7edf\u3001\u72ec\u7acb\u7684\u5185\u5b58\u7a7a\u95f4\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u670d\u52a1\u5316&#xff1a;\u5b83\u4eec\u901a\u8fc7\u7f51\u7edc\u7aef\u53e3\u8fdb\u884c\u901a\u4fe1&#xff0c;\u5c31\u50cf\u90e8\u7f72\u5728\u4e09\u53f0\u4e0d\u540c\u7684\u670d\u52a1\u5668\u4e0a\u4e00\u6837\u3002\n<ul>\n<li>\u4f60\u7684 Python \u4ee3\u7801\u8fde\u63a5 Redis \u662f\u901a\u8fc7 localhost:6379 (\u7f51\u7edc\u8bf7\u6c42)\u3002<\/li>\n<li>\u4f60\u7684 Python \u4ee3\u7801\u8fde\u63a5 MySQL \u662f\u901a\u8fc7 localhost:3306 (\u7f51\u7edc\u8bf7\u6c42)\u3002<\/li>\n<li>\u4f60\u7684 Python \u4ee3\u7801\u8c03\u7528 Qwen \u662f\u901a\u8fc7 localhost:7575 (HTTP API \u8bf7\u6c42)\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<p>\u7ed3\u8bba&#xff1a;\u662f\u7684&#xff0c;\u5b83\u4eec\u5c31\u662f\u72ec\u7acb\u7684\u6807\u51c6\u5316\u670d\u52a1\u3002\u4f60\u5e76\u6ca1\u6709\u628a\u5b83\u4eec&#034;\u5199\u6b7b&#034;\u5728 AI \u4ee3\u7801\u91cc&#xff0c;\u800c\u662f\u8ba9\u5b83\u4eec\u4f5c\u4e3a\u57fa\u7840\u8bbe\u65bd\u5b58\u5728\u3002 2. \u4e3a\u4ec0\u4e48\u8981\u628a\u5b83\u4eec\u653e\u5728\u4e00\u8d77 (docker-compose)&#xff1f; \u65e2\u7136\u662f\u72ec\u7acb\u670d\u52a1&#xff0c;\u4e3a\u4ec0\u4e48\u4e0d\u5206\u5f00\u542f\u52a8&#xff08;\u6bd4\u5982\u624b\u52a8 docker run \u4e09\u6b21&#xff09;&#xff1f;<\/p>\n<ul>\n<li>\u4e00\u952e\u7f16\u6392 (Orchestration)&#xff1a; docker-compose up -d \u7684\u4f5c\u7528\u662f\u540c\u65f6\u542f\u52a8\u8fd9\u4e00\u7ec4\u76f8\u4e92\u4f9d\u8d56\u7684\u670d\u52a1&#xff0c;\u5e76\u81ea\u52a8\u6784\u5efa\u5b83\u4eec\u4e4b\u95f4\u7684\u7f51\u7edc\u3002\n<ul>\n<li>\u5982\u679c\u4f60\u4ee5\u540e\u8981\u628a\u8fd9\u4e2a\u9879\u76ee\u53d1\u7ed9\u540c\u4e8b&#xff0c;\u4ed6\u53ea\u9700\u8981\u62ff\u5230\u8fd9\u4e2a docker-compose.yml \u6587\u4ef6&#xff0c;\u8fd0\u884c\u4e00\u884c\u547d\u4ee4&#xff0c;\u5c31\u80fd\u83b7\u5f97\u548c\u4f60\u4e00\u6a21\u4e00\u6837\u7684\u73af\u5883&#xff08;\u76f8\u540c\u7684\u7248\u672c\u3001\u76f8\u540c\u7684\u914d\u7f6e\u3001\u76f8\u540c\u7684\u7aef\u53e3&#xff09;\u3002<\/li>\n<li>\u8fd9\u5c31\u662f&#034;\u73af\u5883\u5373\u4ee3\u7801&#034; (Infrastructure as Code)\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u8d44\u6e90\u7ba1\u7406&#xff1a; \u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d&#xff0c;\u6211\u4eec\u53ef\u4ee5\u7edf\u4e00\u89c4\u5212\u8d44\u6e90\u3002\u6bd4\u5982\u9650\u5236 Qwen \u53ea\u80fd\u7528 90% \u663e\u5b58&#xff0c;\u9632\u6b62\u5b83\u628a\u663e\u5361\u5360\u6ee1\u5bfc\u81f4\u5176\u4ed6\u4efb\u52a1\u65e0\u6cd5\u8fd0\u884c\u3002<\/li>\n<\/ul>\n<li>\n<p>\u8fd9\u662f\u4e13\u95e8\u4e3a AI Agent \u51c6\u5907\u7684\u5417&#xff1f; \u65e2\u662f&#xff0c;\u4e5f\u4e0d\u662f\u3002<\/p>\n<ul>\n<li>&#034;\u4e0d\u662f&#034;\u7684\u4e00\u9762&#xff08;\u901a\u7528\u6027&#xff09;&#xff1a;\n<ul>\n<li>Redis&#xff1a;\u8fd9\u662f\u901a\u7528\u7684\u7f13\u5b58\u548c\u6d88\u606f\u961f\u5217\u3002\u65e0\u8bba\u4f60\u505a Web \u540e\u7aef\u3001\u6e38\u620f\u670d\u52a1\u5668\u3001\u8fd8\u662f\u9ad8\u9891\u4ea4\u6613&#xff0c;\u90fd\u4f1a\u7528\u5230\u5b83\u3002\u8fd9\u91cc\u7684\u914d\u7f6e&#xff08;\u5f00\u542f AOF \u6301\u4e45\u5316&#xff09;\u662f\u751f\u4ea7\u7ea7\u6807\u51c6\u914d\u7f6e\u3002<\/li>\n<li>MySQL&#xff1a;\u8fd9\u662f\u901a\u7528\u7684\u5173\u7cfb\u578b\u6570\u636e\u5e93\u3002\u5b58\u50a8\u7528\u6237\u4fe1\u606f\u3001\u8ba2\u5355\u3001\u65e5\u5fd7&#xff0c;\u4ec0\u4e48\u90fd\u53ef\u4ee5\u3002\u8fd9\u91cc\u7684\u914d\u7f6e\u4e5f\u662f\u6807\u51c6\u7684\u3002<\/li>\n<li>\u5373\u4f7f\u4f60\u4e0d\u505a AI&#xff0c;\u8fd9\u4e2a docker-compose.yml \u53bb\u6389 Qwen \u90e8\u5206&#xff0c;\u5c31\u662f\u4e00\u4e2a\u5b8c\u7f8e\u7684\u5168\u6808 Web \u540e\u7aef\u57fa\u7840\u73af\u5883\u3002<\/li>\n<\/ul>\n<\/li>\n<li>&#034;\u662f&#034;\u7684\u4e00\u9762&#xff08;\u9488\u5bf9\u6027&#xff09;&#xff1a;\n<ul>\n<li>Qwen (vLLM)&#xff1a;\u8fd9\u90e8\u5206\u786e\u5b9e\u662f\u4e13\u95e8\u4e3a AI Agent \u51c6\u5907\u7684\u3002\u5b83\u52a0\u8f7d\u4e86\u5927\u6a21\u578b&#xff0c;\u63d0\u4f9b\u4e86 LLM \u80fd\u529b\u3002<\/li>\n<li>\u7ec4\u5408\u6548\u5e94&#xff1a;AI Agent \u7684\u6838\u5fc3\u516c\u5f0f\u662f LLM &#043; Memory (Redis\/MySQL) &#043; Tools\u3002\n<ul>\n<li>Redis \u5728\u8fd9\u91cc\u901a\u5e38\u5145\u5f53 \u77ed\u671f\u8bb0\u5fc6 (Short-term Memory) \u6216 \u6d88\u606f\u603b\u7ebf&#xff08;Agent \u5185\u90e8\u6a21\u5757\u901a\u4fe1&#xff09;\u3002<\/li>\n<li>MySQL \u5728\u8fd9\u91cc\u901a\u5e38\u5145\u5f53 \u957f\u671f\u8bb0\u5fc6 (Long-term Memory) \u6216 \u77e5\u8bc6\u5e93\u5143\u6570\u636e&#xff08;\u5b58\u50a8\u5411\u91cf\u7d22\u5f15\u3001\u7528\u6237\u753b\u50cf\u3001\u5386\u53f2\u5bf9\u8bdd\u8bb0\u5f55&#xff09;\u3002<\/li>\n<li>Qwen \u662f \u5927\u8111\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u5c06&#034;\u5927\u8111&#034;\u548c&#034;\u8bb0\u5fc6\u7cfb\u7edf&#034;\u9884\u7ec4\u88c5\u5728\u4e86\u4e00\u8d77&#xff0c;\u8ba9\u4f60\u80fd\u7acb\u523b\u5f00\u59cb\u7f16\u5199 Agent \u7684\u4e1a\u52a1\u903b\u8f91&#xff0c;\u800c\u4e0d\u7528\u82b1\u51e0\u5929\u65f6\u95f4\u53bb\u8c03\u8bd5\u6570\u636e\u5e93\u8fde\u63a5\u548c\u6a21\u578b\u90e8\u7f72\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u672a\u6765\u7684\u6269\u5c55\u6027&#xff08;\u89e3\u8026&#xff09; \u5982\u679c\u4f60\u5c06\u6765\u4e1a\u52a1\u505a\u5927\u4e86&#xff0c;\u8fd9\u4e2a\u67b6\u6784\u53ef\u4ee5\u8f7b\u677e\u62c6\u5206&#xff1a;<\/p>\n<li>\u573a\u666f A&#xff1a;\u6570\u636e\u5e93\u4e0a\u4e91\n<ul>\n<li>\u4f60\u89c9\u5f97\u672c\u5730 MySQL \u6027\u80fd\u4e0d\u591f\u4e86&#xff0c;\u4e70\u4e86\u963f\u91cc\u4e91 RDS\u3002<\/li>\n<li>\u64cd\u4f5c&#xff1a;\u53ea\u9700\u4fee\u6539 docker-compose.yml&#xff0c;\u5220\u6389 mysql \u670d\u52a1&#xff0c;\u7136\u540e\u628a\u4f60\u7684 Python \u4ee3\u7801\u91cc\u7684\u6570\u636e\u5e93\u8fde\u63a5\u5730\u5740\u6539\u6210\u963f\u91cc\u4e91\u7684 IP\u3002<\/li>\n<li>\u7ed3\u679c&#xff1a;Redis \u548c Qwen \u4f9d\u7136\u5728\u672c\u5730\u8dd1&#xff0c;\u6570\u636e\u5e93\u5728\u4e91\u7aef\u3002\u5b8c\u5168\u89e3\u8026\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u573a\u666f B&#xff1a;\u591a Agent \u96c6\u7fa4\n<ul>\n<li>\u4f60\u9700\u8981\u8dd1 10 \u4e2a\u4e0d\u540c\u7684 Agent\u3002<\/li>\n<li>\u64cd\u4f5c&#xff1a;\u4fdd\u7559 Redis \u548c MySQL \u4f5c\u4e3a\u5171\u4eab\u670d\u52a1\u3002\u590d\u5236 qwen \u670d\u52a1\u5757&#xff0c;\u542f\u52a8 qwen-agent-1, qwen-agent-2\u2026 \u6216\u8005\u628a Qwen \u90e8\u7f72\u5230\u4e13\u95e8\u7684 GPU \u670d\u52a1\u5668\u4e0a\u3002<\/li>\n<li>\u7ed3\u679c&#xff1a;\u57fa\u7840\u8bbe\u65bd&#xff08;DB\/Cache&#xff09;\u4e0e\u8ba1\u7b97\u8282\u70b9&#xff08;Agent&#xff09;\u5206\u79bb\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u573a\u666f C&#xff1a;\u7eaf\u540e\u7aef\u9879\u76ee\n<ul>\n<li>\u4f60\u7a81\u7136\u60f3\u505a\u4e00\u4e2a\u4e0d\u5e26 AI \u7684\u7535\u5546\u7f51\u7ad9\u3002<\/li>\n<li>\u64cd\u4f5c&#xff1a;\u76f4\u63a5\u590d\u7528\u8fd9\u4e2a docker-compose.yml&#xff0c;\u6ce8\u91ca\u6389 qwen \u90e8\u5206\u3002<\/li>\n<li>\u7ed3\u679c&#xff1a;\u4f60\u77ac\u95f4\u62e5\u6709\u4e86\u4e00\u4e2a\u9ad8\u53ef\u7528\u7684\u7535\u5546\u540e\u7aef\u57fa\u7840\u73af\u5883\u3002<\/li>\n<\/ul>\n<\/li>\n<\/li>\n<p>&#x1f4dd; \u603b\u7ed3 \u8fd9\u4e2a\u914d\u7f6e\u65b9\u6848\u662f&#034;\u4ee5 AI Agent \u5f00\u53d1\u4e3a\u573a\u666f\u5207\u5165\u70b9&#034;\u6784\u5efa\u7684&#034;\u6807\u51c6\u5316\u4e91\u539f\u751f\u5f00\u53d1\u73af\u5883&#034;\u3002<\/p>\n<ul>\n<li>MySQL \u548c Redis&#xff1a;\u662f\u72ec\u7acb\u3001\u901a\u7528\u3001\u6807\u51c6\u7684\u57fa\u7840\u8bbe\u65bd\u670d\u52a1\u3002\u5b83\u4eec\u4e0d\u4f9d\u8d56 AI \u5b58\u5728&#xff0c;AI \u4e5f\u4e0d\u4f9d\u8d56\u5b83\u4eec\u7684\u7279\u5b9a\u5b9e\u73b0&#xff08;\u53ea\u8981\u534f\u8bae\u5bf9\u5c31\u884c&#xff09;\u3002<\/li>\n<li>Docker Compose&#xff1a;\u53ea\u662f\u4e00\u4e2a\u542f\u52a8\u5668&#xff0c;\u65b9\u4fbf\u4f60\u4e00\u952e\u62c9\u8d77\u8fd9\u5957&#034;\u5168\u5bb6\u6876&#034;\u3002<\/li>\n<li>\u4f60\u7684\u6536\u76ca&#xff1a;\u4f60\u4e0d\u9700\u8981\u5206\u522b\u53bb\u5b89\u88c5 MySQL \u5b89\u88c5\u5305\u3001\u914d\u7f6e Redis conf \u6587\u4ef6\u3001\u6298\u817e vLLM \u73af\u5883\u3002\u4f60\u62e5\u6709\u4e86\u4e00\u5957\u53ef\u79fb\u690d\u3001\u53ef\u590d\u73b0\u3001\u6613\u7ef4\u62a4\u7684\u5f00\u53d1\u5e95\u5ea7\u3002<\/li>\n<\/ul>\n<h4>\u590d\u7528docker-compose.yml&#xff0c;\u8fd8\u4f1a\u518d\u62c9\u53d6\u4e00\u904dmysql\u955c\u50cf\u518d\u542f\u52a8\u4e00\u4e2a\u5b9e\u4f8b\u5417&#xff1f;<\/h4>\n<p>\u7b54\u6848\u662f&#xff1a;\u4e0d\u4f1a\u91cd\u65b0\u4e0b\u8f7d\u955c\u50cf&#xff0c;\u4e5f\u4e0d\u4f1a\u4ea7\u751f\u51b2\u7a81&#xff0c;\u4f46\u4f1a\u542f\u52a8\u4e00\u4e2a\u65b0\u7684\u5bb9\u5668\u5b9e\u4f8b&#xff08;\u9664\u975e\u4f60\u590d\u7528\u65e7\u7684\u6570\u636e\u5377&#xff09;\u3002<\/p>\n<li>\u5173\u4e8e&#034;\u518d\u62c9\u53d6\u4e00\u904d\u955c\u50cf&#034; \u7ed3\u8bba&#xff1a;\u4e0d\u4f1a\u91cd\u65b0\u4e0b\u8f7d\u3002\n<ul>\n<li>\u673a\u5236&#xff1a;Docker \u955c\u50cf\u662f\u5168\u5c40\u5171\u4eab\u7684\u3002\n<ul>\n<li>\u5f53\u4f60\u7b2c\u4e00\u6b21\u8fd0\u884c docker compose up -d (AI \u573a\u666f) \u65f6&#xff0c;Docker \u5df2\u7ecf\u4e0b\u8f7d\u4e86 mysql:8.0 \u548c redis:7.4 \u955c\u50cf\u5b58\u5728\u672c\u5730\u3002<\/li>\n<li>\u5f53\u4f60\u505a&#034;\u573a\u666f C&#034;\u65f6&#xff0c;\u4fee\u6539\u4e86 docker-compose.yml&#xff08;\u6ce8\u91ca\u6389 qwen&#xff09;&#xff0c;\u518d\u6b21\u8fd0\u884c docker compose up -d\u3002<\/li>\n<li>Docker \u4f1a\u68c0\u67e5\u672c\u5730\u662f\u5426\u6709 mysql:8.0\u3002\u53d1\u73b0\u6709&#xff01;\u5b83\u4f1a\u76f4\u63a5\u590d\u7528\u672c\u5730\u955c\u50cf&#xff0c;\u8df3\u8fc7\u4e0b\u8f7d\u6b65\u9aa4&#xff0c;\u79d2\u7ea7\u542f\u52a8\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u4f8b\u5916&#xff1a;\u9664\u975e\u4f60\u624b\u52a8\u6267\u884c\u4e86 docker rmi mysql:8.0 \u5220\u9664\u4e86\u955c\u50cf&#xff0c;\u6216\u8005\u8fc7\u4e86\u5f88\u4e45\u955c\u50cf\u7248\u672c\u66f4\u65b0\u4e86\u4e14\u4f60\u914d\u7f6e\u4e86\u81ea\u52a8\u62c9\u53d6&#xff0c;\u5426\u5219\u7edd\u4e0d\u4f1a\u91cd\u590d\u4e0b\u8f7d\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u5173\u4e8e&#034;\u518d\u542f\u52a8\u4e00\u4e2a\u5b9e\u4f8b&#034; \u7ed3\u8bba&#xff1a;\u8fd9\u53d6\u51b3\u4e8e\u4f60\u5982\u4f55\u64cd\u4f5c\u76ee\u5f55\u548c\u6570\u636e\u5377\u3002 \u8fd9\u91cc\u6709\u4e24\u79cd\u60c5\u51b5&#xff1a;<\/li>\n<ul>\n<li>\u60c5\u51b5 A&#xff1a;\u4f60\u5728\u540c\u4e00\u4e2a\u76ee\u5f55 (~\/ai-stack) \u64cd\u4f5c&#xff08;\u63a8\u8350&#xff09;\n<li>\u5982\u679c\u4f60\u53ea\u662f\u4fee\u6539\u4e86\u5f53\u524d\u7684 docker-compose.yml&#xff0c;\u628a qwen \u90e8\u5206\u6ce8\u91ca\u6389&#xff0c;\u7136\u540e\u8fd0\u884c docker compose up -d&#xff1a;<\/li>\n<li>Qwen \u5bb9\u5668&#xff1a;Docker \u53d1\u73b0\u914d\u7f6e\u6587\u4ef6\u91cc\u6ca1\u4e86 qwen \u670d\u52a1&#xff0c;\u5b83\u4f1a\u505c\u6b62\u5e76\u79fb\u9664 qwen-local \u5bb9\u5668&#xff08;\u91ca\u653e\u663e\u5b58&#xff09;\u3002<\/li>\n<li>MySQL\/Redis \u5bb9\u5668&#xff1a;Docker \u53d1\u73b0\u914d\u7f6e\u91cc\u8fd8\u6709\u5b83\u4eec&#xff0c;\u4e14\u955c\u50cf\u6ca1\u53d8\u3002\n<ul>\n<li>\u5982\u679c\u5bb9\u5668\u5df2\u7ecf\u5728\u8fd0\u884c&#xff1a;\u5b83\u68c0\u6d4b\u5230\u914d\u7f6e\u65e0\u53d8\u5316&#xff0c;\u4ec0\u4e48\u90fd\u4e0d\u505a&#xff08;\u4fdd\u6301\u8fd0\u884c&#xff0c;\u6570\u636e\u4fdd\u7559&#xff09;\u3002<\/li>\n<li>\u5982\u679c\u5bb9\u5668\u505c\u6b62\u4e86&#xff1a;\u5b83\u4f1a\u91cd\u542f\u539f\u6709\u7684\u5bb9\u5668\u3002<\/li>\n<li>\u5173\u952e\u70b9&#xff1a;\u56e0\u4e3a\u5b83\u590d\u7528\u4e86\u4e4b\u524d\u7684 .\/data\/mysql \u6302\u8f7d\u5377&#xff0c;\u4f60\u7684\u6570\u636e&#xff08;\u7528\u6237\u8868\u3001\u8ba2\u5355\u8868&#xff09;\u90fd\u5728&#xff01; \u4f60\u4e0d\u9700\u8981\u91cd\u65b0\u521d\u59cb\u5316\u6570\u636e\u5e93\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u7ed3\u679c&#xff1a;\u4f60\u5f97\u5230\u4e86\u4e00\u4e2a\u5e72\u51c0\u7684\u3001\u53bb\u9664\u4e86 AI \u529f\u80fd\u7684\u3001\u6570\u636e\u5b8c\u6574\u7684\u7535\u5546\u540e\u7aef\u73af\u5883\u3002\u8fd9\u662f\u6700\u4e1d\u6ed1\u7684\u4f53\u9a8c\u3002<\/li>\n<\/li>\n<li>\u60c5\u51b5 B&#xff1a;\u4f60\u590d\u5236\u4e86\u4e00\u4efd\u6587\u4ef6\u5230\u65b0\u76ee\u5f55 (~\/ecommerce-project)\n<li>\u5982\u679c\u4f60\u628a docker-compose.yml \u590d\u5236\u5230\u4e86\u65b0\u6587\u4ef6\u5939&#xff0c;\u5e76\u6ce8\u91ca\u6389 qwen&#xff0c;\u7136\u540e\u8fd0\u884c&#xff1a;<\/li>\n<li>\u955c\u50cf&#xff1a;\u4f9d\u7136\u4e0d\u4f1a\u91cd\u65b0\u4e0b\u8f7d&#xff0c;\u590d\u7528\u672c\u5730\u7f13\u5b58\u3002<\/li>\n<li>\u5bb9\u5668&#xff1a;Docker \u4f1a\u521b\u5efa\u5168\u65b0\u7684 mysql \u548c redis \u5bb9\u5668&#xff08;\u56e0\u4e3a\u9879\u76ee\u76ee\u5f55\u53d8\u4e86&#xff0c;\u9ed8\u8ba4\u7684\u5377\u8def\u5f84\u4e5f\u53d8\u4e86&#xff0c;\u6216\u8005\u540d\u5b57\u51b2\u7a81\u5904\u7406\u673a\u5236\u4e0d\u540c&#xff09;\u3002<\/li>\n<li>\u6570\u636e&#xff1a;\u65b0\u5bb9\u5668\u7684\u6570\u636e\u5e93\u662f\u7a7a\u7684&#xff08;\u56e0\u4e3a\u6ca1\u6709\u6302\u8f7d\u5230\u65e7\u7684 .\/data\/mysql&#xff09;\u3002<\/li>\n<li>\u7ed3\u679c&#xff1a;\u4f60\u5f97\u5230\u4e86\u4e00\u4e2a\u5168\u65b0\u7684\u3001\u7a7a\u767d\u7684\u7535\u5546\u73af\u5883\u3002\u4f60\u9700\u8981\u91cd\u65b0\u5bfc\u5165\u6570\u636e\u6216\u8fd0\u884c\u8fc1\u79fb\u811a\u672c\u3002<\/li>\n<\/li>\n<\/ul>\n<h5>&#x1f4a1; \u6700\u4f73\u5b9e\u8df5\u5efa\u8bae<\/h5>\n<p>\u4e3a\u4e86\u5b9e\u73b0\u4f60\u63cf\u8ff0\u7684&#034;\u77ac\u95f4\u62e5\u6709\u9ad8\u53ef\u7528\u7535\u5546\u540e\u7aef&#034;&#xff0c;\u6211\u5efa\u8bae\u91c7\u7528 \u60c5\u51b5 A \u7684\u53d8\u4f53&#xff0c;\u6216\u8005\u4f7f\u7528 Profile \u529f\u80fd&#xff08;Docker Compose \u7684\u9ad8\u7ea7\u7279\u6027&#xff09;\u3002<\/p>\n<p>\u65b9\u6cd5\u4e00&#xff1a;\u4f7f\u7528 Docker Compose Profiles&#xff08;\u6700\u4f18\u96c5&#xff09; \u4f60\u4e0d\u9700\u8981\u6ce8\u91ca\u4ee3\u7801&#xff01;\u6211\u4eec\u53ef\u4ee5\u7ed9\u670d\u52a1\u6253\u6807\u7b7e\u3002 \u4fee\u6539\u4f60\u7684 docker-compose.yml&#xff1a;<\/p>\n<p><span class=\"token key atrule\">services<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">redis<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token comment\"># &#8230; \u914d\u7f6e\u4e0d\u53d8 &#8230;<\/span><br \/>\n    <span class=\"token key atrule\">profiles<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;common&#034;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token comment\"># \u6807\u8bb0\u4e3a\u901a\u7528\u670d\u52a1<\/span><\/p>\n<p>  <span class=\"token key atrule\">mysql<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token comment\"># &#8230; \u914d\u7f6e\u4e0d\u53d8 &#8230;<\/span><br \/>\n    <span class=\"token key atrule\">profiles<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;common&#034;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token comment\"># \u6807\u8bb0\u4e3a\u901a\u7528\u670d\u52a1<\/span><\/p>\n<p>  <span class=\"token key atrule\">qwen<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token comment\"># &#8230; \u914d\u7f6e\u4e0d\u53d8 &#8230;<\/span><br \/>\n    <span class=\"token key atrule\">profiles<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;ai&#034;<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token comment\"># \u6807\u8bb0\u4e3a AI \u4e13\u5c5e\u670d\u52a1<\/span><\/p>\n<p>\u4f7f\u7528\u65b9\u5f0f&#xff1a; \u5f00\u53d1 AI Agent \u65f6&#xff1a;<\/p>\n<p><span class=\"token function\">docker<\/span> compose &#8211;profile common &#8211;profile ai up -d<br \/>\n<span class=\"token comment\"># \u6216\u8005\u9ed8\u8ba4\u542f\u52a8\u6240\u6709&#xff08;\u5982\u679c\u4e0d\u6307\u5b9a profile&#xff09;<\/span><br \/>\n<span class=\"token function\">docker<\/span> compose up -d <\/p>\n<p>\u5f00\u53d1\u7eaf\u540e\u7aef\u7535\u5546\u65f6&#xff1a;<\/p>\n<p><span class=\"token function\">docker<\/span> compose &#8211;profile common up -d<br \/>\n<span class=\"token comment\"># \u8fd9\u6837 Qwen \u6839\u672c\u4e0d\u4f1a\u542f\u52a8&#xff0c;\u8282\u7701\u663e\u5b58&#xff0c;\u4f46 MySQL\/Redis \u7167\u5e38\u8fd0\u884c\u4e14\u6570\u636e\u4fdd\u7559<\/span><\/p>\n<h2>\u5176\u4ed6\u64cd\u4f5c<\/h2>\n<h3>\u505c\u6b62\u5bb9\u5668<\/h3>\n<p><span class=\"token builtin class-name\">cd<\/span> ~\/ai-stack<br \/>\n<span class=\"token function\">docker<\/span> compose down<\/p>\n<h3>\u6e05\u7406mysql\u6570\u636e\u96c6<\/h3>\n<p><span class=\"token comment\"># \u5220\u9664\u4e4b\u524d\u6302\u8f7d\u7684 MySQL \u6570\u636e\u76ee\u5f55<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">rm<\/span> -rf .\/data<br \/>\n<span class=\"token comment\"># \u91cd\u65b0\u521b\u5efa\u7a7a\u76ee\u5f55<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> -p .\/data\/redis .\/data\/mysql .\/models<br \/>\n<span class=\"token comment\"># \u518d\u6b21\u786e\u8ba4 mysql \u76ee\u5f55\u662f\u7a7a\u7684<\/span><br \/>\n<span class=\"token function\">ls<\/span> -la .\/data\/mysql<\/p>\n<h3>\u4fee\u6539\u7aef\u53e3\u6620\u5c04<\/h3>\n<p>nano docker<span class=\"token punctuation\">&#8211;<\/span>compose.yml<br \/>\n<span class=\"token comment\"># \u4ee5\u4fee\u6539mysql\u7aef\u53e3\u4e3a\u4f8b<\/span><br \/>\n<span class=\"token punctuation\">&#8211;<\/span> <span class=\"token string\">&#034;3306:3306&#034;<\/span><br \/>\n<span class=\"token comment\"># \u4fee\u6539\u4e3a (\u5bbf\u4e3b\u673a 3307 -&gt; \u5bb9\u5668 3306)<\/span><br \/>\n<span class=\"token punctuation\">&#8211;<\/span> <span class=\"token string\">&#034;3307:3306&#034;<\/span><\/p>\n<h3>\u5168\u9762\u6d4b\u8bd5<\/h3>\n<p>&#x1f680; \u7b2c\u4e00\u6b65&#xff1a;\u68c0\u67e5\u5bb9\u5668\u72b6\u6001\u4e0e\u65e5\u5fd7<\/p>\n<p><span class=\"token function\">docker<\/span> <span class=\"token function\">ps<\/span><br \/>\n<span class=\"token function\">nano<\/span> ~\/ai-stack\/docker-compose.yml<br \/>\n<span class=\"token function\">docker-compose<\/span> up -d<br \/>\n<span class=\"token function\">docker-compose<\/span> down<br \/>\n<span class=\"token function\">docker<\/span> logs -f qwen-local<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227105116-69a17724ade92.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<ul>\n<li>mysql\u6d4b\u8bd5<\/li>\n<\/ul>\n<p>\u8fde\u4e0amysql<\/p>\n<p><span class=\"token comment\">&#8212; \u7528vs code\u63d2\u4ef6\u8fde\u4e5f\u884c <\/span><br \/>\n<span class=\"token comment\">&#8212; \u8fdb\u5165mysql\u5bb9\u5668\u4e5f\u884c<\/span><br \/>\n<span class=\"token comment\">&#8212; docker exec -it mysql-local mysql -uroot -pxxx<\/span><br \/>\n<span class=\"token keyword\">show<\/span> <span class=\"token keyword\">databases<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<ul>\n<li>redis\u6d4b\u8bd5<\/li>\n<\/ul>\n<p>\u8fde\u4e0aredis<\/p>\n<p><span class=\"token function\">ping<\/span><\/p>\n<ul>\n<li>qwen\u6d4b\u8bd5<\/li>\n<\/ul>\n<p><span class=\"token comment\"># \u67e5\u770b\u542f\u52a8\u65e5\u5fd7<\/span><br \/>\n<span class=\"token function\">docker<\/span> logs -f qwen-local<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227105116-69a17724cc393.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u76f4\u63a5\u5728\u6d4f\u89c8\u5668\u8bbf\u95ee http:\/\/localhost:7575\/docs<\/p>\n<p>qwen\u542f\u52a8\u65e5\u5fd7\u62a5\u9519\u5e38\u89c1\u95ee\u9898&#xff1a;<\/p>\n<li>max-model-len \u8bbe\u7f6e\u7684\u592a\u957f\u4e86 \u6a21\u62df\u7684\u65f6\u5019\u663e\u5b58\u9884\u4f30\u4e0d\u591f<\/li>\n<li>command \u53c2\u6570\u5728\u65b0\u7248 vLLM \u63a8\u8350\u76f4\u63a5\u628a\u6a21\u578b\u8def\u5f84\u4f5c\u4e3a\u7b2c\u4e00\u4e2a\u53c2\u6570&#xff0c;\u800c\u4e0d\u662f\u7528 &#8211;model\u3002<\/li>\n<h3>\u5185\u5b58\u5360\u7528\u95ee\u9898<\/h3>\n<p>\u73b0\u8c61\u89e3\u91ca&#xff1a; \u4f60\u770b\u5230\u7684&#034;\u9ad8\u5185\u5b58\u5360\u7528&#034;\u5176\u5b9e\u662f Docker &#043; WSL2 &#043; GPU \u6a21\u578b\u52a0\u8f7d\u673a\u5236 \u7684\u6b63\u5e38\u8868\u73b0&#xff0c;\u4f46\u8fd9\u5176\u4e2d\u53ef\u80fd\u5305\u542b\u4e86\u4e00\u4e9b\u53ef\u4ee5\u4f18\u5316\u7684\u6d6a\u8d39\u3002 \u6211\u4eec\u9700\u8981\u533a\u5206\u4e24\u79cd\u60c5\u51b5&#xff1a;<\/p>\n<li>\u663e\u5b58 (VRAM) \u5360\u7528\u9ad8&#xff1a;\u8fd9\u662f\u6b63\u5e38\u4e14\u5fc5\u987b\u7684\u3002<\/li>\n<li>\u7cfb\u7edf\u5185\u5b58 (RAM\/WSL2 \u5185\u5b58) \u5360\u7528\u9ad8&#xff1a;\u8fd9\u53ef\u80fd\u662f\u914d\u7f6e\u4e0d\u5f53\u5bfc\u81f4\u7684&#xff0c;\u53ef\u4ee5\u4f18\u5316\u3002<\/li>\n<p>\u5982\u679c\u4f60\u662f\u6307 Windows \u7684\u4efb\u52a1\u7ba1\u7406\u5668\u4e2d \u201c\u5185\u5b58\u201d (64GB RAM) \u5360\u7528\u5f88\u9ad8&#xff0c;\u6216\u8005 WSL2 \u8fdb\u7a0b (vmmem \u6216 vmmemWSL) \u5360\u7528\u4e86\u5927\u91cf\u5185\u5b58&#xff08;\u6bd4\u5982 10GB&#043;&#xff09;&#xff0c;\u5373\u4f7f\u670d\u52a1\u7a7a\u95f2&#xff1a; \u539f\u56e0\u5206\u6790&#xff1a;<\/p>\n<li>WSL2 \u7684&#034;\u53ea\u589e\u4e0d\u51cf&#034;\u673a\u5236&#xff1a;WSL2 \u9ed8\u8ba4\u4f1a\u52a8\u6001\u4f7f\u7528 Windows \u5185\u5b58&#xff0c;\u4f46\u4e0d\u4f1a\u81ea\u52a8\u91ca\u653e\u3002\u4e00\u65e6 Docker \u6216\u6a21\u578b\u52a0\u8f7d\u7528\u6389\u4e86 10GB&#xff0c;\u5373\u4f7f\u4f60\u505c\u6b62\u4e86\u5bb9\u5668&#xff0c;WSL2 \u8fdb\u7a0b\u5f80\u5f80\u8fd8\u4f1a\u62b1\u7740\u8fd9 10GB \u4e0d\u653e&#xff0c;\u76f4\u5230\u4f60\u91cd\u542f WSL\u3002<\/li>\n<li>Docker \u684c\u9762\u540e\u53f0\u8fdb\u7a0b&#xff1a;Docker Desktop \u672c\u8eab\u53ca\u5176\u8f85\u52a9\u8fdb\u7a0b\u4e5f\u4f1a\u5360\u7528\u51e0\u767e MB \u5230 1GB \u7684\u5185\u5b58\u3002<\/li>\n<li>\u6a21\u578b\u6743\u91cd\u52a0\u8f7d\u7b56\u7565&#xff1a;\u867d\u7136 vLLM \u4e3b\u8981\u628a\u6a21\u578b\u653e\u5728\u663e\u5b58\u91cc&#xff0c;\u4f46\u5728\u521d\u59cb\u5316\u9636\u6bb5\u6216\u90e8\u5206\u7b97\u5b50\u8ba1\u7b97\u65f6&#xff0c;\u53ef\u80fd\u4f1a\u5728\u7cfb\u7edf\u5185\u5b58\u4e2d\u4fdd\u7559\u4e00\u4efd\u526f\u672c\u6216\u4e34\u65f6\u7f13\u51b2\u533a\u3002<\/li>\n<p>\u91cd\u542fwsl<\/p>\n<p>wsl &#8211;shutdown<br \/>\nwsl -d Ubuntu-24.04<br \/>\n<span class=\"token builtin class-name\">cd<\/span> ~\/ai-stack<br \/>\n<span class=\"token function\">docker-compose<\/span> up -d<\/p>\n<p>\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\u52a8&#xff1a; \u53ea\u81ea\u542f\u52a8redis\u548cmysql<\/p>\n<p>&#x1f680; \u65b9\u6848&#xff1a;\u4f7f\u7528 Windows \u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f \u7b2c\u4e00\u6b65&#xff1a;\u521b\u5efa\u542f\u52a8\u811a\u672c<\/p>\n<li>\u5728 Windows \u4e0a\u521b\u5efa\u4e00\u4e2a\u65b0\u6587\u4ef6&#xff0c;\u6bd4\u5982 D:\\\\Scripts\\\\start-dev-env.bat (\u5982\u679c\u6ca1\u6709 Scripts \u6587\u4ef6\u5939\u5c31\u65b0\u5efa\u4e00\u4e2a)\u3002<\/li>\n<li>\u53f3\u952e\u70b9\u51fb\u8be5\u6587\u4ef6 -&gt; \u7f16\u8f91 (\u6216\u7528\u8bb0\u4e8b\u672c\u6253\u5f00)\u3002<\/li>\n<li>\u7c98\u8d34\u4ee5\u4e0b\u4ee3\u7801&#xff1a;<\/li>\n<p>&#064;echo off<br \/>\nREM \u7b49\u5f85\u7f51\u7edc\u5b8c\u5168\u5c31\u7eea (\u53ef\u9009&#xff0c;\u9632\u6b62\u7f51\u7edc\u9a71\u52a8\u6ca1\u52a0\u8f7d\u5b8c)<br \/>\ntimeout \/t 5 \/nobreak &gt;nul<\/p>\n<p>REM 1. \u542f\u52a8 WSL2 (\u9ed8\u8ba4\u53d1\u884c\u7248)<br \/>\nREM \u8fd9\u6b65\u4f1a\u5524\u9192 WSL&#xff0c;\u4f46\u4e0d\u4f1a\u81ea\u52a8\u542f\u52a8\u4efb\u4f55 Docker \u5bb9\u5668<br \/>\nwsl &#8211;exec echo &#034;WSL2 Started&#034;<\/p>\n<p>REM 2. \u8fdb\u5165\u4f60\u7684\u9879\u76ee\u76ee\u5f55\u5e76\u542f\u52a8\u6307\u5b9a\u670d\u52a1<br \/>\nREM \u6ce8\u610f&#xff1a;\u8fd9\u91cc\u6211\u4eec\u663e\u5f0f\u6307\u5b9a\u53ea\u542f\u52a8 redis \u548c mysql&#xff0c;\u4e0d\u542f\u52a8 qwen<br \/>\nwsl -d Ubuntu-24.04 -e bash -c &#034;cd ~\/ai-stack &amp;&amp; docker compose up -d redis mysql&#034;<\/p>\n<p>REM \u7ed3\u675f<br \/>\nexit<\/p>\n<li>\u4fdd\u5b58\u5e76\u5173\u95ed\u6587\u4ef6\u3002<\/li>\n<p>&#x1f4a1; \u539f\u7406&#xff1a;<\/p>\n<ul>\n<li>wsl &#8211;exec \u2026&#xff1a;\u5148\u8f7b\u8f7b\u5524\u9192 WSL \u5185\u6838\u3002<\/li>\n<li>wsl -d Ubuntu-24.04 -e bash -c \u201c\u2026\u201d&#xff1a;\u4ee5\u975e\u4ea4\u4e92\u6a21\u5f0f\u6267\u884c\u547d\u4ee4\u3002<\/li>\n<li>docker compose up -d redis mysql&#xff1a;\u5173\u952e\u70b9\u3002Docker Compose \u5141\u8bb8\u4f60\u6307\u5b9a\u53ea\u542f\u52a8\u67d0\u4e9b\u670d\u52a1\u3002\u56e0\u4e3a qwen \u4e0d\u5728\u5217\u8868\u4e2d&#xff0c;\u5b83\u7edd\u4e0d\u4f1a\u542f\u52a8&#xff0c;\u663e\u5b58\u5b8c\u5168\u7a7a\u95f2\u3002<\/li>\n<\/ul>\n<p>\u7b2c\u4e8c\u6b65&#xff1a;\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f (\u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f)<\/p>\n<li>\u6253\u5f00\u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f&#xff1a;\n<ul>\n<li>\u6309 Win &#043; S&#xff0c;\u641c\u7d22 \u201c\u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f\u201d (Task Scheduler)&#xff0c;\u6253\u5f00\u5b83\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u521b\u5efa\u57fa\u672c\u4efb\u52a1&#xff1a;\n<ul>\n<li>\u70b9\u51fb\u53f3\u4fa7\u7684 \u201c\u521b\u5efa\u57fa\u672c\u4efb\u52a1\u2026\u201d\u3002<\/li>\n<li>\u540d\u79f0&#xff1a;\u8f93\u5165 Start Dev Services (\u6216\u8005\u4f60\u559c\u6b22\u7684\u540d\u5b57)\u3002<\/li>\n<li>\u63cf\u8ff0&#xff1a;\u53ef\u9009&#xff0c;\u6bd4\u5982&#034;\u5f00\u673a\u81ea\u52a8\u542f\u52a8 Redis \u548c MySQL&#034;\u3002<\/li>\n<li>\u70b9\u51fb \u4e0b\u4e00\u6b65\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u8bbe\u7f6e\u89e6\u53d1\u5668&#xff1a;\n<ul>\n<li>\u9009\u62e9 \u201c\u8ba1\u7b97\u673a\u542f\u52a8\u65f6\u201d (When the computer starts)\u3002<\/li>\n<li>\u70b9\u51fb \u4e0b\u4e00\u6b65\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u8bbe\u7f6e\u64cd\u4f5c&#xff1a;\n<ul>\n<li>\u9009\u62e9 \u201c\u542f\u52a8\u7a0b\u5e8f\u201d (Start a program)\u3002<\/li>\n<li>\u70b9\u51fb \u4e0b\u4e00\u6b65\u3002<\/li>\n<li>\u7a0b\u5e8f\u6216\u811a\u672c&#xff1a;\u6d4f\u89c8\u5e76\u9009\u62e9\u4f60\u521a\u624d\u521b\u5efa\u7684 D:\\\\Scripts\\\\start-dev-env.bat\u3002<\/li>\n<li>\u8d77\u59cb\u4e8e (\u53ef\u9009)&#xff1a;\u586b\u5199\u811a\u672c\u6240\u5728\u7684\u6587\u4ef6\u5939\u8def\u5f84&#xff0c;\u4f8b\u5982 D:\\\\Scripts (\u8fd9\u5f88\u91cd\u8981&#xff0c;\u9632\u6b62\u76f8\u5bf9\u8def\u5f84\u9519\u8bef)\u3002<\/li>\n<li>\u70b9\u51fb \u4e0b\u4e00\u6b65\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u5b8c\u6210\u914d\u7f6e&#xff1a;\n<ul>\n<li>\u52fe\u9009 \u201c\u5f53\u5355\u51fb\u2019\u5b8c\u6210\u2019\u65f6&#xff0c;\u6253\u5f00\u6b64\u4efb\u52a1\u5c5e\u6027\u7684\u5bf9\u8bdd\u6846\u201d\u3002<\/li>\n<li>\u70b9\u51fb \u5b8c\u6210\u3002<\/li>\n<\/ul>\n<\/li>\n<p>\u7b2c\u4e09\u6b65&#xff1a;\u5173\u952e\u6743\u9650\u8bbe\u7f6e (\u5fc5\u987b\u505a&#xff01;) \u4e3a\u4e86\u8ba9\u5b83\u5728\u540e\u53f0\u9759\u9ed8\u8fd0\u884c\u4e14\u4e0d\u5f39\u7a97&#xff0c;\u9700\u8981\u4fee\u6539\u521a\u624d\u6253\u5f00\u7684\u5c5e\u6027\u7a97\u53e3&#xff1a;<\/p>\n<li>\u5e38\u89c4 (General) \u9009\u9879\u5361&#xff1a;\n<ul>\n<li>\u2705 \u52fe\u9009 \u201c\u4e0d\u7ba1\u7528\u6237\u662f\u5426\u767b\u5f55\u90fd\u8981\u8fd0\u884c\u201d (Run whether user is logged on or not)\u3002<\/li>\n<li>\u6ce8\u610f&#xff1a;\u9009\u4e86\u8fd9\u9879\u540e&#xff0c;\u811a\u672c\u4f1a\u5728\u540e\u53f0\u8fd0\u884c&#xff0c;\u4f60\u770b\u4e0d\u5230\u9ed1\u6846\u6846&#xff0c;\u8fd9\u662f\u6b63\u5e38\u7684\u3002<\/li>\n<li>\u2705 \u52fe\u9009 \u201c\u4f7f\u7528\u6700\u9ad8\u6743\u9650\u8fd0\u884c\u201d (Run with highest privileges)\u3002<\/li>\n<li>\u914d\u7f6e (Configure for)&#xff1a;\u9009\u62e9\u4f60\u7684 Windows \u7248\u672c (\u5982 Windows 10\/11)\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u6761\u4ef6 (Conditions) \u9009\u9879\u5361&#xff1a;\n<ul>\n<li>\u274c \u53d6\u6d88\u52fe\u9009 \u201c\u53ea\u6709\u5728\u8ba1\u7b97\u673a\u4f7f\u7528\u4ea4\u6d41\u7535\u6e90\u65f6\u624d\u542f\u52a8\u6b64\u4efb\u52a1\u201d (\u5982\u679c\u4f60\u662f\u7528\u7b14\u8bb0\u672c&#xff0c;\u4e14\u5e0c\u671b\u62d4\u7535\u6e90\u4e5f\u80fd\u542f\u52a8&#xff0c;\u5c31\u53d6\u6d88&#xff1b;\u5982\u679c\u662f\u53f0\u5f0f\u673a&#xff0c;\u53ef\u4ee5\u4fdd\u7559)\u3002<\/li>\n<li>\u274c \u53d6\u6d88\u52fe\u9009 \u201c\u53ea\u6709\u5728\u4ee5\u4e0b\u7f51\u7edc\u8fde\u63a5\u53ef\u7528\u65f6\u624d\u542f\u52a8\u201d (\u9632\u6b62\u56e0\u7f51\u7edc\u5224\u65ad\u5ef6\u8fdf\u5bfc\u81f4\u542f\u52a8\u5931\u8d25)\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u8bbe\u7f6e (Settings) \u9009\u9879\u5361&#xff1a;\n<ul>\n<li>\u2705 \u52fe\u9009 \u201c\u5982\u679c\u4efb\u52a1\u8fd0\u884c\u65f6\u95f4\u8d85\u8fc7\u2026 \u505c\u6b62\u4efb\u52a1\u201d \u53ef\u4ee5\u53d6\u6d88\u52fe\u9009&#xff0c;\u6216\u8005\u8bbe\u957f\u4e00\u70b9 (\u867d\u7136\u8fd9\u4e2a\u811a\u672c\u5f88\u5feb\u5c31\u8dd1\u5b8c\u4e86)\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u70b9\u51fb \u786e\u5b9a\u3002\n<ul>\n<li>\u7cfb\u7edf\u4f1a\u63d0\u793a\u4f60\u8f93\u5165 Windows \u767b\u5f55\u5bc6\u7801 \u4ee5\u4fdd\u5b58\u51ed\u636e\u3002\u8f93\u5165\u540e\u786e\u8ba4\u3002<\/li>\n<\/ul>\n<\/li>\n<p>\u7b2c\u56db\u6b65&#xff1a;\u6d4b\u8bd5\u4e0e\u9a8c\u8bc1 \u4e0d\u8981\u91cd\u542f\u7535\u8111&#xff0c;\u5148\u624b\u52a8\u6d4b\u8bd5\u4e00\u4e0b&#xff1a;<\/p>\n<li>\u505c\u6b62\u6240\u6709\u670d\u52a1&#xff1a;<\/li>\n<p>wsl -d Ubuntu-24.04 -e <span class=\"token function\">bash<\/span> -c <span class=\"token string\">&#034;cd ~\/ai-stack &amp;&amp; docker compose down&#034;<\/span><\/p>\n<li>\u5728\u4efb\u52a1\u8ba1\u5212\u7a0b\u5e8f\u4e2d\u6d4b\u8bd5&#xff1a;\n<ul>\n<li>\u627e\u5230\u521a\u624d\u521b\u5efa\u7684 Start Dev Services \u4efb\u52a1\u3002<\/li>\n<li>\u53f3\u952e\u70b9\u51fb -&gt; \u8fd0\u884c (Run)\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u9a8c\u8bc1\u7ed3\u679c&#xff1a;\n<ul>\n<li>\u6253\u5f00 WSL2 \u7ec8\u7aef&#xff0c;\u8fd0\u884c docker ps\u3002<\/li>\n<li>\u4f60\u5e94\u8be5\u770b\u5230 redis-local \u548c mysql-local \u662f Up \u72b6\u6001\u3002<\/li>\n<li>Qwen (qwen-local) \u5e94\u8be5\u4e0d\u5728\u5217\u8868\u4e2d\u3002<\/li>\n<li>\u6253\u5f00\u4efb\u52a1\u7ba1\u7406\u5668&#xff0c;\u786e\u8ba4\u663e\u5b58 (GPU Memory) \u6ca1\u6709\u88ab\u5360\u7528&#xff0c;\u4f46 Vmmem \u5185\u5b58\u6709\u5c11\u91cf\u589e\u52a0 (Redis\/MySQL \u7684\u5f00\u9500)\u3002<\/li>\n<\/ul>\n<\/li>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227105117-69a1772526931.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u4ee5\u540e\u60f3\u542f\u52a8 Qwen \u600e\u4e48\u529e&#xff1f;<\/p>\n<p>wsl -d Ubuntu-24.04<br \/>\n<span class=\"token builtin class-name\">cd<\/span> ~\/ai-stack<br \/>\n<span class=\"token function\">docker-compose<\/span> up -d qwen<\/p>\n<p>&#x1f680; \u65b9\u6848B&#xff1a;\u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/p>\n<li>\u5148\u8bbe\u7f6edocker desktop\u5f00\u673a\u81ea\u542f\u52a8<\/li>\n<li>\u7136\u540e\u4fee\u6539qwen\u7684\u914d\u7f6e<\/li>\n<p><span class=\"token function\">nano<\/span> ~\/ai-stack\/docker-compose.yml<br \/>\nqwen:<br \/>\n    image: vllm\/vllm-openai:latest<br \/>\n    container_name: qwen-local<br \/>\n    <span class=\"token comment\"># &#8230; \u5176\u4ed6\u914d\u7f6e &#8230;<\/span><br \/>\n    restart: <span class=\"token string\">&#034;no&#034;<\/span>  <span class=\"token comment\"># &lt;&#8212; \u4fee\u6539\u8fd9\u91cc&#xff01;\u7981\u6b62\u81ea\u52a8\u91cd\u542f<\/span><\/p>\n<h3>\u4fee\u6539\u7ec8\u7aef\u6837\u5f0f<\/h3>\n<p>&#x1f3c6; \u65b9\u6848\u4e00&#xff1a;\u76f4\u63a5\u4f7f\u7528 Windows Terminal (\u6700\u63a8\u8350&#xff0c;\u5fae\u8f6f\u5b98\u65b9\u51fa\u54c1) \u8fd9\u662f\u76ee\u524d Windows \u4e0a\u6700\u597d\u7684\u7ec8\u7aef\u5de5\u5177&#xff0c;\u5b83\u539f\u751f\u652f\u6301 WSL2\u3002\u5f53\u4f60\u6253\u5f00\u5b83\u65f6&#xff0c;\u4f60\u53ef\u4ee5\u76f4\u63a5\u9009\u62e9 \u201cUbuntu-24.04\u201d \u6807\u7b7e\u9875&#xff0c;\u672c\u8d28\u4e0a\u4f60\u5c31\u662f\u5728\u8fd0\u884c Ubuntu \u7684 Bash&#xff0c;\u6240\u4ee5\u5b83\u7684\u6837\u5f0f\u3001\u989c\u8272\u3001\u63d0\u793a\u7b26\u548c\u4f60\u4e4b\u524d\u5728 WSL \u91cc\u770b\u5230\u7684\u4e00\u6a21\u4e00\u6837&#xff01;<\/p>\n<li>\u5b89\u88c5\n<ul>\n<li>\u6253\u5f00 Microsoft Store (\u5fae\u8f6f\u5e94\u7528\u5546\u5e97)\u3002<\/li>\n<li>\u641c\u7d22 \u201cWindows Terminal\u201d (\u6216\u8005\u76f4\u63a5\u641c \u201cTerminal\u201d)\u3002<\/li>\n<li>\u70b9\u51fb \u83b7\u53d6\/\u5b89\u88c5\u3002\n<ul>\n<li>(\u6ce8&#xff1a;Windows 11 \u9ed8\u8ba4\u5df2\u9884\u88c5&#xff0c;\u76f4\u63a5\u5728\u5f00\u59cb\u83dc\u5355\u641c \u201cTerminal\u201d \u6216 \u201cwt\u201d \u5373\u53ef)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u914d\u7f6e\u4e3a\u9ed8\u8ba4\u7ec8\u7aef (\u5173\u952e\u6b65\u9aa4) \u4e3a\u4e86\u8ba9\u5b83\u63a5\u7ba1\u6240\u6709\u7684\u547d\u4ee4\u884c\u64cd\u4f5c&#xff1a;\n<li>\u6253\u5f00 Windows Terminal\u3002<\/li>\n<li>\u70b9\u51fb\u6807\u9898\u680f\u7684\u4e0b\u62c9\u7bad\u5934 -&gt; \u8bbe\u7f6e (Settings) (\u6216\u6309 Ctrl &#043; ,)\u3002<\/li>\n<li>\u5728\u5de6\u4fa7\u9009\u62e9 \u201c\u542f\u52a8\u201d (Startup)\u3002<\/li>\n<li>\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6 (Default profile)&#xff1a;\u9009\u62e9 Ubuntu-24.04\u3002<\/li>\n<li>\u9ed8\u8ba4\u7ec8\u7aef\u7a0b\u5e8f\u9009\u62e9\u521a\u624d\u4e0b\u8f7d\u7684\u90a3\u4e2awindows\u7ec8\u7aef<\/li>\n<li>(\u53ef\u9009) \u52fe\u9009 \u201c\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u201d (\u5982\u679c\u4f60\u7ecf\u5e38\u9700\u8981 sudo)\u3002<\/li>\n<li>\u70b9\u51fb \u4fdd\u5b58\u3002<\/li>\n<\/li>\n","protected":false},"excerpt":{"rendered":"<p>WSL2  Ubuntu 24.04  Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883 \u6587\u7ae0\u76ee\u5f55WSL2  Ubuntu 24.04  Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883WSL2  Ubuntu 24.04  Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883\u4f7f\u7528WSL\u81ea\u52a8\u5b89\u88c5\u624b\u52a8\u5b89\u88c5\u26a0\ufe0f \u5173\u4e8e\u5185\u6838\u7248\u672c\u8fc7\u65e7 (5.10.16) \u7684\u91cd\u8981\u63d0\u793a\u5c06ubuntu\u5bfc\u51fa\u5230D\u76d8\u5b89\u88c5Docker Desktop\u5907\u4efd\u539f\u6709mysql\u5e76\u505c\u6b62&#x1f680; \u6267\u884c\u6b65\u9aa4&#xff1a;\u5b89\u88c5 Dock<\/p>\n","protected":false},"author":2,"featured_media":78500,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[27,103,50],"topic":[],"class_list":["post-78504","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-docker","tag-ubuntu","tag-50"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WSL2 + Ubuntu 24.04 + Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883 - \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\/78504.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WSL2 + Ubuntu 24.04 + Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"WSL2 Ubuntu 24.04 Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883 \u6587\u7ae0\u76ee\u5f55WSL2 Ubuntu 24.04 Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883WSL2 Ubuntu 24.04 Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883\u4f7f\u7528WSL\u81ea\u52a8\u5b89\u88c5\u624b\u52a8\u5b89\u88c5\u26a0\ufe0f \u5173\u4e8e\u5185\u6838\u7248\u672c\u8fc7\u65e7 (5.10.16) \u7684\u91cd\u8981\u63d0\u793a\u5c06ubuntu\u5bfc\u51fa\u5230D\u76d8\u5b89\u88c5Docker Desktop\u5907\u4efd\u539f\u6709mysql\u5e76\u505c\u6b62&#x1f680; \u6267\u884c\u6b65\u9aa4&#xff1a;\u5b89\u88c5 Dock\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/78504.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-27T10:51:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227105116-69a1772493cd5.png\" \/>\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=\"11 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/78504.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/78504.html\",\"name\":\"WSL2 + Ubuntu 24.04 + Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-27T10:51:18+00:00\",\"dateModified\":\"2026-02-27T10:51:18+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/78504.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/78504.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/78504.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WSL2 + Ubuntu 24.04 + Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883\"}]},{\"@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":"WSL2 + Ubuntu 24.04 + Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883 - \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\/78504.html","og_locale":"zh_CN","og_type":"article","og_title":"WSL2 + Ubuntu 24.04 + Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"WSL2 Ubuntu 24.04 Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883 \u6587\u7ae0\u76ee\u5f55WSL2 Ubuntu 24.04 Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883WSL2 Ubuntu 24.04 Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883\u4f7f\u7528WSL\u81ea\u52a8\u5b89\u88c5\u624b\u52a8\u5b89\u88c5\u26a0\ufe0f \u5173\u4e8e\u5185\u6838\u7248\u672c\u8fc7\u65e7 (5.10.16) \u7684\u91cd\u8981\u63d0\u793a\u5c06ubuntu\u5bfc\u51fa\u5230D\u76d8\u5b89\u88c5Docker Desktop\u5907\u4efd\u539f\u6709mysql\u5e76\u505c\u6b62&#x1f680; \u6267\u884c\u6b65\u9aa4&#xff1a;\u5b89\u88c5 Dock","og_url":"https:\/\/www.wsisp.com\/helps\/78504.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-27T10:51:18+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227105116-69a1772493cd5.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"11 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/78504.html","url":"https:\/\/www.wsisp.com\/helps\/78504.html","name":"WSL2 + Ubuntu 24.04 + Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-27T10:51:18+00:00","dateModified":"2026-02-27T10:51:18+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/78504.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/78504.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/78504.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"WSL2 + Ubuntu 24.04 + Docker Desktop \u914d\u7f6e\u53cc\u5185\u6838\u73af\u5883"}]},{"@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\/78504","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=78504"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/78504\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/78500"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=78504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=78504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=78504"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=78504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}