2727 # Image settings
2828 base_image :
2929 project : ubuntu-os-accelerator-images
30- image : ubuntu-accelerator-2204 -amd64-with-nvidia-570-v20260210
30+ image : ubuntu-accelerator-2404 -amd64-with-nvidia-580-v20260522
3131 image_build_machine_type : n2-standard-16
3232 build_slurm_from_git_ref : 6.12.1
3333 # Cluster env settings
3838 local_ssd_mountpoint : /mnt/localssd
3939 instance_image :
4040 project : $(vars.project_id)
41- family : $(vars.deployment_name)-u22
41+ family : $(vars.deployment_name)-u24
4242 disk_size_gb : 100
4343 nccl_gib_version : 1.1.0
4444 libnccl_version : 2.27.5-1+cuda12.9
5151
5252 # Managed Lustre is only supported in specific regions and zones
5353 # Please refer https://cloud.google.com/managed-lustre/docs/locations
54+
5455 # Managed-Lustre instance name. This should be unique for each deployment.
5556 lustre_instance_id : $(vars.deployment_name)-lustre
5657
@@ -125,7 +126,6 @@ deployment_groups:
125126 "install_gcsfuse": true,
126127 "install_lustre": false,
127128 "install_managed_lustre": true,
128- "install_nvidia_repo": true,
129129 "install_ompi": true,
130130 "allow_kernel_upgrades": false,
131131 "monitoring_agent": "cloud-ops",
@@ -150,75 +150,79 @@ deployment_groups:
150150 * - nofile 1048576
151151 * - cpu unlimited
152152 * - rtprio unlimited
153- - type : shell
154- destination : install-cuda-toolkit.sh
155- content : |
156- #!/bin/bash
157- set -e -o pipefail
158- add-nvidia-repositories -y
159- apt install -y \
160- cuda-toolkit-12-8 \
161- datacenter-gpu-manager-4-cuda12=1:4.5.3-1 \
162- datacenter-gpu-manager-4-dev=1:4.5.3-1 \
163- datacenter-gpu-manager-4-core=1:4.5.3-1
164-
165- # 2. Hold ALL components
166- apt-mark hold \
167- datacenter-gpu-manager-4-cuda12 \
168- datacenter-gpu-manager-4-dev \
169- datacenter-gpu-manager-4-core
170153
171154 - type : ansible-local
172- destination : settings_nvidia_dcgm .yml
155+ destination : install_cuda_and_dcgm .yml
173156 content : |
174157 ---
175- - name: Nvidia and DGMA settings
158+ - name: Install and Configure CUDA 13 / DCGM
176159 hosts: all
177160 become: true
161+ vars:
162+ distribution: "{{ ansible_distribution | lower }}{{ ansible_distribution_version | replace('.','') }}"
163+ cuda_repo_url: "https://developer.download.nvidia.com/compute/cuda/repos/{{ distribution }}/x86_64/cuda-keyring_1.1-1_all.deb"
164+ nvidia_packages:
165+ - cuda-toolkit-13-0
166+ - datacenter-gpu-manager-4-cuda13
167+ - datacenter-gpu-manager-4-dev
168+ - datacenter-gpu-manager-4-core
178169 tasks:
179- - name: Reduce NVIDIA repository priority
180- ansible.builtin.copy:
181- dest: /etc/apt/preferences.d/cuda-repository-pin-600
182- mode: 0o0644
183- owner: root
184- group: root
185- content: |
186- Package: *
187- Pin: release l=NVIDIA CUDA
188- Pin-Priority: 400
189- - name: Create nvidia-persistenced override directory
190- ansible.builtin.file:
191- path: /etc/systemd/system/nvidia-persistenced.service.d
192- state: directory
193- owner: root
194- group: root
195- mode: 0o755
196- - name: Configure nvidia-persistenced override
197- ansible.builtin.copy:
198- dest: /etc/systemd/system/nvidia-persistenced.service.d/persistence_mode.conf
199- owner: root
200- group: root
201- mode: 0o644
202- content: |
203- [Service]
204- ExecStart=
205- ExecStart=/usr/bin/nvidia-persistenced --user nvidia-persistenced --verbose
206- notify: Reload SystemD
170+ - name: Install NVIDIA repository keyring
171+ ansible.builtin.apt:
172+ deb: "{{ cuda_repo_url }}"
173+ state: present
174+
175+ - name: Update apt cache
176+ ansible.builtin.apt:
177+ update_cache: yes
178+
179+ - name: Install NVIDIA packages
180+ ansible.builtin.apt:
181+ name: "{{ item }}"
182+ state: present
183+ allow_downgrade: yes
184+ loop: "{{ nvidia_packages }}"
185+
186+ - name: Freeze NVIDIA packages
187+ ansible.builtin.dpkg_selections:
188+ name: "{{ item }}"
189+ selection: hold
190+ loop: "{{ nvidia_packages }}"
191+
192+ - name: Create nvidia-persistenced override directory
193+ ansible.builtin.file:
194+ path: /etc/systemd/system/nvidia-persistenced.service.d
195+ state: directory
196+ owner: root
197+ group: root
198+ mode: 0o755
199+
200+ - name: Configure nvidia-persistenced override
201+ ansible.builtin.copy:
202+ dest: /etc/systemd/system/nvidia-persistenced.service.d/persistence_mode.conf
203+ owner: root
204+ group: root
205+ mode: 0o644
206+ content: |
207+ [Service]
208+ ExecStart=
209+ ExecStart=/usr/bin/nvidia-persistenced --user nvidia-persistenced --verbose
210+ notify: Reload SystemD
211+
207212 handlers:
208213 - name: Reload SystemD
209214 ansible.builtin.systemd:
210215 daemon_reload: true
216+
211217 post_tasks:
212- - name: Disable NVIDIA DCGM by default (enable during boot on GPU nodes)
213- ansible.builtin.service:
214- name: nvidia-dcgm.service
215- state: stopped
216- enabled: false
217- - name: Disable nvidia-persistenced SystemD unit (enable during boot on GPU nodes)
218- ansible.builtin.service:
219- name: nvidia-persistenced.service
220- state: stopped
221- enabled: false
218+ - name: Disable NVIDIA services by default (Slurm starts them on boot)
219+ ansible.builtin.service:
220+ name: "{{ item }}"
221+ state: stopped
222+ enabled: false
223+ loop:
224+ - nvidia-dcgm.service
225+ - nvidia-persistenced.service
222226
223227 - type : ansible-local
224228 destination : install_ibverbs_utils.yml
@@ -263,6 +267,7 @@ deployment_groups:
263267 metadata :
264268 user-data : |
265269 #cloud-config
270+ create_hostname_file: true
266271 write_files:
267272 - path: /etc/apt/apt.conf.d/20auto-upgrades
268273 permissions: '0644'
@@ -453,6 +458,21 @@ deployment_groups:
453458 ENROOT_CACHE_PATH $(vars.local_ssd_mountpoint)/${UID}/enroot/cache
454459 ENROOT_DATA_PATH $(vars.local_ssd_mountpoint)/${UID}/enroot/data
455460 ENROOT_TEMP_PATH $(vars.local_ssd_mountpoint)/${UID}/enroot
461+ - type : shell
462+ destination : fix_enroot_env.sh
463+ content : |
464+ #!/bin/bash
465+ # 1. Disable Ubuntu 24.04 restriction on unprivileged user namespaces
466+ # Required for enroot/pyxis to work
467+ if [ -f /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]; then
468+ sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
469+ echo "kernel.apparmor_restrict_unprivileged_userns = 0" > /etc/sysctl.d/90-enroot-namespaces.conf
470+ fi
471+
472+ # 2. Ensure /etc/hostname exists (needed by enroot/pyxis)
473+ if [ ! -f /etc/hostname ]; then
474+ hostname > /etc/hostname
475+ fi
456476 # Install NCCL
457477 - type : ansible-local
458478 destination : install_nccl.yml
@@ -618,7 +638,18 @@ deployment_groups:
618638 ThreadsPerCore : 2
619639 additional_networks :
620640 $(concat(
621- a3ultra-slurm-net-1.instance_additional_networks,
641+ [{
642+ network=null,
643+ subnetwork=a3ultra-slurm-net-1.subnetwork_self_link,
644+ subnetwork_project=vars.project_id,
645+ nic_type="GVNIC",
646+ queue_count=null,
647+ network_ip="",
648+ stack_type=null,
649+ access_config=[],
650+ ipv6_access_config=[],
651+ alias_ip_range=[]
652+ }],
622653 a3ultra-slurm-rdma-net.subnetwork_interfaces
623654 ))
624655
0 commit comments