Skip to content

Commit b3d5694

Browse files
committed
cuda nightly build
1 parent f3d0b67 commit b3d5694

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.github/workflows/fatimage.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,17 @@ jobs:
7777
cd packer/
7878
packer init .
7979
80+
if [[ "${{ matrix.build }}" == *"cuda"* ]]; then
81+
SOURCE_IMAGE_NAME="rocky-latest-cuda"
82+
else
83+
SOURCE_IMAGE_NAME="rocky-latest"
84+
fi
85+
8086
PACKER_LOG=1 packer build \
8187
-on-error=${{ vars.PACKER_ON_ERROR }} \
8288
-only=${{ matrix.build }} \
8389
-var-file=$PKR_VAR_environment_root/${{ vars.CI_CLOUD }}.pkrvars.hcl \
84-
-var 'source_image_name={"${{ matrix.os_version }}":"rocky-latest-${{ matrix.os_version }}"}' \
90+
-var 'source_image_name={"${{ matrix.os_version }}":"${SOURCE_IMAGE_NAME}-${{ matrix.os_version }}"}' \
8591
openstack.pkr.hcl
8692
env:
8793
PKR_VAR_os_version: ${{ matrix.os_version }}

packer/openstack.pkr.hcl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ variable "volume_size" {
133133
default = {
134134
# fat image builds, GB:
135135
rocky-latest = 15
136+
rocky-latest-cuda = 30
136137
openhpc = 15
137138
openhpc-cuda = 30
138139
}
@@ -154,8 +155,9 @@ variable "groups" {
154155
default = {
155156
# fat image builds:
156157
rocky-latest = ["update", "ofed"]
158+
rocky-latest-cuda = ["update", "ofed", "cuda"]
157159
openhpc = ["control", "compute", "login"]
158-
openhpc-cuda = ["control", "compute", "login", "cuda"]
160+
openhpc-cuda = ["control", "compute", "login"]
159161
}
160162
}
161163

@@ -191,12 +193,18 @@ source "openstack" "openhpc" {
191193

192194
build {
193195

194-
# latest fat image:
196+
# latest nightly image:
195197
source "source.openstack.openhpc" {
196198
name = "rocky-latest"
197199
image_name = "${source.name}-${var.os_version}"
198200
}
199201

202+
# latest nightly cuda image:
203+
source "source.openstack.openhpc" {
204+
name = "rocky-latest-cuda"
205+
image_name = "${source.name}-${var.os_version}"
206+
}
207+
200208
# OFED fat image:
201209
source "source.openstack.openhpc" {
202210
name = "openhpc"
@@ -212,6 +220,7 @@ build {
212220
# Extended site-specific image, built on fat image:
213221
source "source.openstack.openhpc" {
214222
name = "openhpc-extra"
223+
image_name = "${source.name}-${var.os_version}-${local.timestamp}-${substr(local.git_commit, 0, 8)}"
215224
}
216225

217226
provisioner "ansible" {

0 commit comments

Comments
 (0)