|
39 | 39 | project: $(vars.project_id) |
40 | 40 | family: $(vars.deployment_name)-u22 |
41 | 41 | disk_size_gb: 100 |
42 | | - nccl_plugin_version: v1.1.0 |
| 42 | + nccl_gib_version: 1.1.0 |
43 | 43 | base_network_name: $(vars.deployment_name) |
44 | 44 |
|
45 | 45 | #Provisioning models (set to true or fill in reservation name, pick only one) |
@@ -232,8 +232,7 @@ deployment_groups: |
232 | 232 | - type: data |
233 | 233 | destination: /etc/enroot/enroot.conf |
234 | 234 | content: | |
235 | | - ENROOT_CONFIG_PATH ${HOME}/.enroot |
236 | | -
|
| 235 | + ENROOT_CONFIG_PATH ${HOME}/.enroot |
237 | 236 |
|
238 | 237 | - group: image |
239 | 238 | modules: |
@@ -479,47 +478,74 @@ deployment_groups: |
479 | 478 | ENROOT_CACHE_PATH $(vars.local_ssd_mountpoint)/${UID}/enroot/cache |
480 | 479 | ENROOT_DATA_PATH $(vars.local_ssd_mountpoint)/${UID}/enroot/data |
481 | 480 | ENROOT_TEMP_PATH $(vars.local_ssd_mountpoint)/${UID}/enroot |
| 481 | + # Install NCCL-GIB Plugin |
| 482 | + - type: ansible-local |
| 483 | + destination: install_nccl_gib.yml |
| 484 | + content: | |
| 485 | + --- |
| 486 | + - name: Install Google NCCL-GIB Plugin |
| 487 | + hosts: all |
| 488 | + become: true |
| 489 | + tasks: |
| 490 | + - name: Add artifact registry gpg key |
| 491 | + ansible.builtin.apt_key: |
| 492 | + url: https://us-apt.pkg.dev/doc/repo-signing-key.gpg |
| 493 | + state: present |
| 494 | + - name: Add artifact registry gpg key |
| 495 | + ansible.builtin.apt_key: |
| 496 | + url: https://packages.cloud.google.com/apt/doc/apt-key.gpg |
| 497 | + state: present |
| 498 | + - name: Install Apt Transport AR Apt Repo |
| 499 | + apt_repository: |
| 500 | + repo: 'deb http://packages.cloud.google.com/apt apt-transport-artifact-registry-stable main' |
| 501 | + state: present |
| 502 | + - name: Install AR transport |
| 503 | + ansible.builtin.apt: |
| 504 | + name: "apt-transport-artifact-registry" |
| 505 | + update_cache: true |
| 506 | + - name: Install Google NCCL-GIB Plugin |
| 507 | + apt_repository: |
| 508 | + repo: "deb ar+https://us-apt.pkg.dev/projects/gce-ai-infra gpudirect-gib-apt main" |
| 509 | + state: present |
| 510 | + - name: Install NCCL-GIB Plugin |
| 511 | + ansible.builtin.apt: |
| 512 | + name: "nccl-gib=$(vars.nccl_gib_version)" |
| 513 | + update_cache: true |
| 514 | + - name: Freeze NCCL GIB Plugin |
| 515 | + ansible.builtin.dpkg_selections: |
| 516 | + name: "nccl-gib" |
| 517 | + selection: hold |
| 518 | + # -------------------------------------------------------------------------- |
| 519 | + # Environment Configuration |
| 520 | + # -------------------------------------------------------------------------- |
482 | 521 | - type: ansible-local |
483 | | - destination: nccl_plugin.yml |
| 522 | + destination: configure_nccl_env.yml |
| 523 | + name: Ensure NCCL/gIB environment script is sourced for all users |
484 | 524 | content: | |
485 | 525 | --- |
486 | | - - name: Install NCCL plugin for A3 Ultra series |
| 526 | + - name: Configure NCCL/gIB environment |
487 | 527 | hosts: all |
488 | 528 | become: true |
489 | 529 | tasks: |
490 | | - - name: Add SystemD unit for NCCL plugin installation |
| 530 | + - name: Deploy /etc/profile.d/nccl-gib.sh |
491 | 531 | ansible.builtin.copy: |
492 | | - dest: /etc/systemd/system/nccl-plugin@.service |
493 | | - mode: 0o0644 |
| 532 | + dest: /etc/profile.d/nccl-gib.sh |
494 | 533 | content: | |
495 | | - [Unit] |
496 | | - After=network-online.target docker.service |
497 | | - Before=slurmd.service |
498 | | - Requires=docker.service |
499 | | -
|
500 | | - [Service] |
501 | | - Type=oneshot |
502 | | - ExecStartPre=/usr/bin/rm -rf /usr/local/gib |
503 | | - ExecStartPre=/usr/bin/mkdir -p /usr/local/gib |
504 | | - ExecStartPre=/snap/bin/gcloud auth configure-docker --quiet us-docker.pkg.dev |
505 | | - ExecStart=/usr/bin/docker run --rm --name nccl-gib-installer --volume /usr/local/gib:/var/lib/gib \ |
506 | | - us-docker.pkg.dev/gce-ai-infra/gpudirect-gib/nccl-plugin-gib:%i install --install-nccl |
507 | | - ExecStartPost=/usr/bin/chmod -R a+r /usr/local/gib |
508 | | -
|
509 | | - [Install] |
510 | | - WantedBy=slurmd.service |
511 | | - notify: |
512 | | - - Reload SystemD |
| 534 | + # Load NCCL/gIB environment |
| 535 | + if [ -f "/usr/local/gib/scripts/set_nccl_env.sh" ]; then |
| 536 | + source /usr/local/gib/scripts/set_nccl_env.sh |
| 537 | + fi |
| 538 | +
|
| 539 | + # Ensure /usr/local/gib/lib64 is in LD_LIBRARY_PATH |
| 540 | + if [ -d "/usr/local/gib/lib64" ]; then |
| 541 | + export LD_LIBRARY_PATH="/usr/local/gib/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" |
| 542 | + fi |
| 543 | + mode: '0644' |
513 | 544 | handlers: |
514 | | - - name: Reload SystemD |
515 | | - ansible.builtin.systemd: |
516 | | - daemon_reload: true |
517 | | - post_tasks: |
518 | | - - name: Enable NCCL plugin SystemD unit |
519 | | - ansible.builtin.service: |
520 | | - name: nccl-plugin@$(vars.nccl_plugin_version).service |
521 | | - state: started |
522 | | - enabled: true |
| 545 | + - name: Reload SystemD |
| 546 | + ansible.builtin.systemd: |
| 547 | + daemon_reload: true |
| 548 | +
|
523 | 549 | - type: ansible-local |
524 | 550 | destination: enable_dcgm.yml |
525 | 551 | content: | |
|
0 commit comments