{"id":1076,"date":"2025-06-21T12:30:01","date_gmt":"2025-06-21T04:30:01","guid":{"rendered":"https:\/\/h4ckm310n.com\/?p=1076"},"modified":"2025-06-21T22:59:56","modified_gmt":"2025-06-21T14:59:56","slug":"%e8%ae%b0%e5%bd%95%e4%b8%80%e4%b8%8b%e9%83%a8%e7%bd%b2gpu%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%9a%84%e8%bf%87%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/h4ckm310n.com\/?p=1076","title":{"rendered":"\u8bb0\u5f55\u4e00\u4e0b\u90e8\u7f72GPU\u670d\u52a1\u5668\u7684\u8fc7\u7a0b"},"content":{"rendered":"<p><!--more--><\/p>\n<p>\u6700\u8fd1\u7ec4\u4e86\u4e00\u53f04060Ti 16G\u7684\u7535\u8111\uff0c\u6253\u7b97\u7528\u6765\u505aGPU\u670d\u52a1\u5668\uff0c\u8bb0\u5f55\u4e00\u4e0b\u6211\u7684\u914d\u7f6e\u8fc7\u7a0b\u3002<\/p>\n<h4>\u5b89\u88c5nvidia\u9a71\u52a8<\/h4>\n<pre>sudo apt install nvidia-driver-570-server\r\nsudo apt install nvidia-utils-570-server\r\n<\/pre>\n<h4>\u5b89\u88c5docker<\/h4>\n<pre>export DOWNLOAD_URL=\"https:\/\/mirrors.tuna.tsinghua.edu.cn\/docker-ce\"\r\ncurl -fsSL https:\/\/get.docker.com\/ | sh\r\n<\/pre>\n<h4>\u5b89\u88c5nvidia-container-toolkit<\/h4>\n<p>\u53c2\u8003\u8fd9\u4e2a <a href=\"https:\/\/mirrors.ustc.edu.cn\/help\/libnvidia-container.html\" target=\"_blank\" rel=\"noopener\">https:\/\/mirrors.ustc.edu.cn\/help\/libnvidia-container.html<\/a><\/p>\n<pre>curl -fsSL https:\/\/nvidia.github.io\/libnvidia-container\/gpgkey | sudo gpg --dearmor -o \/usr\/share\/keyrings\/nvidia-container-toolkit-keyring.gpg \\\r\n  &amp;&amp; curl -s -L https:\/\/mirrors.ustc.edu.cn\/libnvidia-container\/stable\/deb\/nvidia-container-toolkit.list | \\\r\n    sed 's#deb https:\/\/nvidia.github.io#deb [signed-by=\/usr\/share\/keyrings\/nvidia-container-toolkit-keyring.gpg] https:\/\/mirrors.ustc.edu.cn#g' | \\\r\n    sudo tee \/etc\/apt\/sources.list.d\/nvidia-container-toolkit.list\r\n<\/pre>\n<pre>sudo nvidia-ctk runtime configure --runtime=docker\r\nsudo systemctl restart docker\r\n<\/pre>\n<h4>\u90e8\u7f72comfyui\u73af\u5883<\/h4>\n<p>\u8fd9\u91cc\u6211\u628a\u6a21\u578b\u548c\u4e00\u4e9b\u6570\u636e\u90fd\u653e\u5728\u5bbf\u4e3b\u7cfb\u7edf\uff0c\u7136\u540e\u6620\u5c04\u5230\u5bb9\u5668\u91cc\u3002<\/p>\n<pre>\r\nmkdir comfyui_data\r\nmkdir comfyui_data\/user\r\nmkdir comfyui_data\/input\r\nmkdir comfyui_data\/output\r\nmkdir models\r\nsudo docker create -it --name comfyui_0 -p 8188:8188 -v comfyui_data:\/comfyui_data -v models:\/comfyui_models --gpus all ubuntu:latest\r\n<\/pre>\n<p>\u8fdb\u5165\u5bb9\u5668\uff0c\u4e0b\u9762\u662f\u5728\u5bb9\u5668\u5185\u7684\u64cd\u4f5c\u3002\u5176\u4e2dcomfyui\u7684clone\u6211\u4f7f\u7528\u7684\u662f\u56fd\u5185\u7684\u955c\u50cf\u3002<\/p>\n<pre>\r\npython3 -m venv comfyui_venv\r\n. comfyui_venv\/bin\/activate\r\npip install torch torchvision torchaudio --extra-index-url https:\/\/download.pytorch.org\/whl\/cu128\r\ngit clone https:\/\/jihulab.com\/hanamizuki\/comfyui\r\ncd comfyui\r\ngit checkout v0.3.41\r\npip install -r requirements.txt\r\n<\/pre>\n<p>\u5220\u6389models\u7b49\u76ee\u5f55\uff0c\u7136\u540e\u521b\u5efa\u8f6f\u94fe\u63a5\uff0c\u6307\u5411\u4ece\u5bbf\u4e3b\u6620\u5c04\u8fc7\u6765\u7684\u76ee\u5f55\u3002<\/p>\n<pre>\r\nln -s \/comfyui_models .\/models\r\nln -s \/comfyui_data\/input .\/input\r\nln -s \/comfyui_data\/output .\/output\r\nln -s \/comfyui_data\/user .\/user\r\n<\/pre>\n<p>\u5f00\u59cb\u8fd0\u884c\uff0c\u76ee\u524d\u8fd8\u6ca1\u5c1d\u8bd5\u522b\u7684\u53c2\u6570\u3002<\/p>\n<pre>\r\npython3 .\/main.py --listen\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[25,6],"tags":[],"class_list":["post-1076","post","type-post","status-publish","format-standard","hentry","category-ai","category-6"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"h4ckm310n","author_link":"https:\/\/h4ckm310n.com\/?author=1"},"uagb_comment_info":1,"uagb_excerpt":null,"_links":{"self":[{"href":"https:\/\/h4ckm310n.com\/index.php?rest_route=\/wp\/v2\/posts\/1076","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/h4ckm310n.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/h4ckm310n.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/h4ckm310n.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/h4ckm310n.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1076"}],"version-history":[{"count":5,"href":"https:\/\/h4ckm310n.com\/index.php?rest_route=\/wp\/v2\/posts\/1076\/revisions"}],"predecessor-version":[{"id":1081,"href":"https:\/\/h4ckm310n.com\/index.php?rest_route=\/wp\/v2\/posts\/1076\/revisions\/1081"}],"wp:attachment":[{"href":"https:\/\/h4ckm310n.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/h4ckm310n.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1076"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/h4ckm310n.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}