From 7babadb6e930e9bfaf214b1013e1fa1cd1755892 Mon Sep 17 00:00:00 2001 From: dingjiahuichina Date: Fri, 13 Jun 2025 16:14:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.=E5=85=B3=E9=97=ADgather=20facts=202.copy?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=94=A8synchronize=E6=9B=BF=E4=BB=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mindspore-deepseek/workspace/install.yml | 6 ++++++ .../workspace/roles/prepare/tasks/main.yml | 20 ++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/script/mindspore-deepseek/workspace/install.yml b/script/mindspore-deepseek/workspace/install.yml index 0fec3d8..f3a7367 100644 --- a/script/mindspore-deepseek/workspace/install.yml +++ b/script/mindspore-deepseek/workspace/install.yml @@ -4,33 +4,39 @@ roles: - prepare any_errors_fatal: true + gather_facts: false - hosts: - masters roles: - start/ray-master any_errors_fatal: true + gather_facts: false - hosts: - workers roles: - start/ray-worker any_errors_fatal: true + gather_facts: false - hosts: - masters roles: - start/deepseek any_errors_fatal: true + gather_facts: false - hosts: - workers roles: - start/deepseek-worker any_errors_fatal: true + gather_facts: false - hosts: - masters roles: - start/check-ds any_errors_fatal: true + gather_facts: false diff --git a/script/mindspore-deepseek/workspace/roles/prepare/tasks/main.yml b/script/mindspore-deepseek/workspace/roles/prepare/tasks/main.yml index f31adb3..9917504 100644 --- a/script/mindspore-deepseek/workspace/roles/prepare/tasks/main.yml +++ b/script/mindspore-deepseek/workspace/roles/prepare/tasks/main.yml @@ -12,17 +12,27 @@ state: directory mode: '0644' -- name: Copy prepare.sh to hosts - copy: +- name: install python3-libselinux + yum: + name: python3-libselinux + state: present + +- name: install rsync + yum: + name: rsync + state: present + +- name: Sync prepare.sh to hosts using rsync + synchronize: src: prepare.sh dest: "{{ dir_path }}" - mode: '0755' + rsync_opts: "--chmod=755" - name: Copy lib to hosts - copy: + synchronize: src: lib dest: "{{ dir_path }}" - mode: '0644' + rsync_opts: "--chmod=644" - name: Copy config.cfg to hosts template: -- Gitee From 6c172a336dabe9ee2cadd89b746745ae4b94bdd7 Mon Sep 17 00:00:00 2001 From: dingjiahuichina Date: Mon, 14 Jul 2025 11:10:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?opt:=20=E5=BC=80=E9=80=9Assh=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E5=A4=8D=E7=94=A8=EF=BC=8C=E9=99=8D=E4=BD=8E=E6=AF=8F?= =?UTF-8?q?=E4=B8=AA=E6=93=8D=E4=BD=9C=E7=9A=84=E6=97=B6=E9=97=B4=E5=BB=B6?= =?UTF-8?q?=E8=BF=9F=EF=BC=8C=E5=9C=A8ssh=E8=BF=9E=E6=8E=A5=E5=BB=B6?= =?UTF-8?q?=E8=BF=9F=E9=AB=98=E7=9A=84=E7=8E=AF=E5=A2=83=E4=B8=AD=E6=80=A7?= =?UTF-8?q?=E8=83=BD=E4=BC=98=E5=8C=96=E6=98=BE=E8=91=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/mindspore-deepseek/config.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/script/mindspore-deepseek/config.yaml b/script/mindspore-deepseek/config.yaml index 3d4ea9c..a8384e7 100644 --- a/script/mindspore-deepseek/config.yaml +++ b/script/mindspore-deepseek/config.yaml @@ -40,3 +40,11 @@ model_type: safetensors # 跳过 ssh 校验(如需禁用此功能,请注释以下配置项) ansible_ssh_common_args: '-o StrictHostKeyChecking=no' + # SSH连接复用参数,ControlMaster=auto启用连接复用,ControlPersist=60s保持连接60秒,ConnectTimeout=30设置连接超时30秒 + ansible_ssh_args: '-o ControlMaster=auto -o ControlPersist=60s -o ConnectTimeout=30' + # 启用Ansible管道加速,减少SSH连接次数 + ansible_pipelining: True + # 启用SSH管道加速,提升文件传输效率 + ansible_ssh_pipelining: True + # 设置并行执行的任务数 + ansible_forks: 10 -- Gitee