diff --git a/script/mindspore-deepseek/config.yaml b/script/mindspore-deepseek/config.yaml index 3d4ea9cd9754a3fac050607d60ae32c0039d1431..a8384e778cce1e1fe8786684fa2fec782267d784 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 diff --git a/script/mindspore-deepseek/workspace/install.yml b/script/mindspore-deepseek/workspace/install.yml index 0fec3d8a7d630077d18150534041ade07f7f3f6c..f3a736757732d947f63ce961f03f9a5f423c7988 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 f31adb33a6e9b84e93e463fbe38a653c1c4eabcb..99175046d58d8a5ef70a1da9f0d8ca3ae1d5215b 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: