--- - name: Install the 'Development tools' package group ansible.builtin.yum: name: - "@Development tools" - libtool state: present - name: Clone AWS EFA OFI git repository ansible.builtin.git: repo: https://github.com/aws/aws-ofi-nccl.git dest: /tmp/aws-ofi-nccl version: aws - name: Build AWS EFA OFI ansible.builtin.shell: | ./autogen.sh args: chdir: /tmp/aws-ofi-nccl - name: Configure AWS EFA OFI ansible.builtin.shell: | ./configure --prefix=/opt/aws-ofi-nccl --with-mpi=/opt/amazon/openmpi --with-libfabric=/opt/amazon/efa --with-nccl=/opt/nccl/build --with-cuda=/usr/local/cuda args: chdir: /tmp/aws-ofi-nccl - name: Build AWS EFA OFI ansible.builtin.shell: | make args: chdir: /tmp/aws-ofi-nccl - name: Build AWS EFA OFI ansible.builtin.shell: | make install args: chdir: /tmp/aws-ofi-nccl - name: Adding the NCCL profile file ansible.builtin.blockinfile: path: /etc/profile.d/aws-ofi-nccl.sh create: yes block: | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/aws-ofi-nccl/lib:/opt/amazon/openmpi/lib64:/opt/amazon/efa/lib64 export PATH=$PATH:/opt/amazon/efa/bin:/opt/amazon/openmpi/bin