Skip to content

Commit 72069c4

Browse files
authored
Merge pull request #2785 from devitocodes/JDBetteridge/more_nvidia_docker_images
Add separate images for CUDA 12
2 parents 77c6edc + 8862607 commit 72069c4

File tree

3 files changed

+50
-14
lines changed

3 files changed

+50
-14
lines changed

.github/workflows/docker-bases.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ jobs:
190190
strategy:
191191
matrix:
192192
arch: [amd64, arm64]
193+
cuda: ['12', '13']
193194
include:
194195
- arch: amd64
195196
platform: linux/amd64
@@ -199,6 +200,12 @@ jobs:
199200
- arch: arm64
200201
platform: linux/arm64
201202
runner: ubuntu-24.04-arm
203+
- cuda: '12'
204+
nvhpc_version: 'nvhpc-25-7'
205+
extra_tag: '12'
206+
- cuda: '13'
207+
nvhpc_version: 'nvhpc'
208+
extra_tag: ''
202209

203210
steps:
204211
- name: Checkout devito
@@ -229,10 +236,10 @@ jobs:
229236
platforms: ${{ matrix.platform }}
230237
build-args: |
231238
arch=nvc
232-
ver=nvhpc-25-7
239+
ver=${{ matrix.nvhpc_version }}
233240
# Label (not tag) with runner name for traceability without changing image tags
234241
labels: builder-runner=${{ runner.name }}
235-
tags: "devitocodes/bases:nvidia-nvc-${{ matrix.arch }}"
242+
tags: "devitocodes/bases:nvidia-nvc${{ matrix.extra_tag }}-${{ matrix.arch }}"
236243

237244
- name: NVCC image
238245
uses: docker/build-push-action@v6
@@ -244,9 +251,9 @@ jobs:
244251
platforms: ${{ matrix.platform }}
245252
build-args: |
246253
arch=nvcc
247-
ver=nvhpc-25-7
254+
ver=${{ matrix.nvhpc_version }}
248255
labels: builder-runner=${{ runner.name }}
249-
tags: "devitocodes/bases:nvidia-nvcc-${{ matrix.arch }}"
256+
tags: "devitocodes/bases:nvidia-nvcc${{ matrix.extra_tag }}-${{ matrix.arch }}"
250257

251258
- name: NVC host image
252259
uses: docker/build-push-action@v6
@@ -258,9 +265,9 @@ jobs:
258265
platforms: ${{ matrix.platform }}
259266
build-args: |
260267
arch=nvc-host
261-
ver=nvhpc-25-7
268+
ver=${{ matrix.nvhpc_version }}
262269
labels: builder-runner=${{ runner.name }}
263-
tags: "devitocodes/bases:cpu-nvc-${{ matrix.arch }}"
270+
tags: "devitocodes/bases:cpu-nvc${{ matrix.extra_tag }}-${{ matrix.arch }}"
264271

265272
deploy-nvidia-bases-manifest:
266273
if: inputs.nvidia
@@ -272,7 +279,7 @@ jobs:
272279

273280
strategy:
274281
matrix:
275-
final_tag: [nvidia-nvc, nvidia-nvcc, cpu-nvc]
282+
final_tag: [nvidia-nvc, nvidia-nvcc, cpu-nvc, nvidia-nvc12, nvidia-nvcc12, cpu-nvc12]
276283

277284
steps:
278285
- name: Set up Docker Buildx

.github/workflows/docker-devito.yml

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,28 @@ jobs:
4444
test: ''
4545
runner: ubuntu-24.04-arm
4646

47+
- base: 'bases:nvidia-nvc12'
48+
tag: 'nvidia-nvc12'
49+
arch: amd64
50+
platform: linux/amd64
51+
run_tests: false
52+
tag_suffix: '-amd64'
53+
# Respect CUDA_VISIBLE_DEVICES set by the runner and hard-limit docker to that device.
54+
# (--gpus maps only the selected device from CUDA_VISIBLE_DEVICES)
55+
flag: --init --gpus "device=${CUDA_VISIBLE_DEVICES:-all}"
56+
test: 'tests/test_gpu_openacc.py tests/test_gpu_common.py'
57+
runner: ["self-hosted", "nvidiagpu"]
58+
59+
- base: 'bases:nvidia-nvc12'
60+
tag: 'nvidia-nvc12'
61+
arch: arm64
62+
platform: linux/arm64
63+
run_tests: false
64+
tag_suffix: '-arm64'
65+
flag: --init --gpus "device=${CUDA_VISIBLE_DEVICES:-all}"
66+
test: ''
67+
runner: ubuntu-24.04-arm
68+
4769
# Runtime gpu flags from https://hub.docker.com/r/rocm/tensorflow/
4870
- base: 'bases:amd'
4971
tag: 'amd'
@@ -127,9 +149,9 @@ jobs:
127149
type=raw,value=latest,enable=${{ matrix.base == 'bases:cpu-gcc' }},suffix=${{ matrix.tag_suffix }}
128150
type=semver,pattern={{raw}},prefix=${{ matrix.tag }}-,enable=${{ github.event_name == 'release' }},suffix=${{ matrix.tag_suffix }}
129151
# Legacy "gpu" tag
130-
type=raw,value=gpu-dev,enable=${{ matrix.base == 'bases:nvidia-nvc' }},suffix=${{ matrix.tag_suffix }}
131-
type=semver,pattern={{raw}},prefix=gpu-,enable=${{ github.event_name == 'release' && matrix.base == 'bases:nvidia-nvc' }},suffix=${{ matrix.tag_suffix }}
132-
type=semver,pattern={{raw}},value=gpu-latest,enable=${{ github.event_name == 'release' && matrix.base == 'bases:nvidia-nvc' }},suffix=${{ matrix.tag_suffix }}
152+
type=raw,value=gpu-dev,enable=${{ contains(matrix.base, 'bases:nvidia-nvc') }},suffix=${{ matrix.tag_suffix }}
153+
type=semver,pattern={{raw}},prefix=gpu-,enable=${{ github.event_name == 'release' && contains(matrix.base, 'bases:nvidia-nvc') }},suffix=${{ matrix.tag_suffix }}
154+
type=semver,pattern={{raw}},value=gpu-latest,enable=${{ github.event_name == 'release' && contains(matrix.base, 'bases:nvidia-nvc') }},suffix=${{ matrix.tag_suffix }}
133155
# Legacy "cpu" tag
134156
type=raw,value=cpu-dev,enable=${{ matrix.base == 'bases:cpu-gcc' }},suffix=${{ matrix.tag_suffix }}
135157
type=semver,pattern={{raw}},prefix=cpu-,enable=${{ github.event_name == 'release' && matrix.base == 'bases:cpu-gcc' }},suffix=${{ matrix.tag_suffix }}
@@ -170,6 +192,9 @@ jobs:
170192
- tag: 'nvidia-nvc'
171193
base: 'bases:nvidia-nvc'
172194
arches: "amd64 arm64"
195+
- tag: 'nvidia-nvc12'
196+
base: 'bases:nvidia-nvc12'
197+
arches: "amd64 arm64"
173198
- tag: 'gcc'
174199
base: 'bases:cpu-gcc'
175200
arches: "amd64 arm64"
@@ -198,9 +223,9 @@ jobs:
198223
type=raw,value=latest,enable=${{ matrix.base == 'bases:cpu-gcc' }}
199224
type=semver,pattern={{raw}},prefix=${{ matrix.tag }}-,enable=${{ github.event_name == 'release' }}
200225
# Legacy "gpu" tag
201-
type=raw,value=gpu-dev,enable=${{ matrix.base == 'bases:nvidia-nvc' }}
202-
type=semver,pattern={{raw}},prefix=gpu-,enable=${{ github.event_name == 'release' && matrix.base == 'bases:nvidia-nvc' }}
203-
type=semver,pattern={{raw}},value=gpu-latest,enable=${{ github.event_name == 'release' && matrix.base == 'bases:nvidia-nvc' }}
226+
type=raw,value=gpu-dev,enable=${{ contains(matrix.base, 'bases:nvidia-nvc') }}
227+
type=semver,pattern={{raw}},prefix=gpu-,enable=${{ github.event_name == 'release' && contains(matrix.base, 'bases:nvidia-nvc') }}
228+
type=semver,pattern={{raw}},value=gpu-latest,enable=${{ github.event_name == 'release' && contains(matrix.base, 'bases:nvidia-nvc') }}
204229
# Legacy "cpu" tag
205230
type=raw,value=cpu-dev,enable=${{ matrix.base == 'bases:cpu-gcc' }}
206231
type=semver,pattern={{raw}},prefix=cpu-,enable=${{ github.event_name == 'release' && matrix.base == 'bases:cpu-gcc' }}
@@ -239,6 +264,10 @@ jobs:
239264
flag: --init --gpus "device=${CUDA_VISIBLE_DEVICES:-all}"
240265
test: 'tests/test_gpu_openacc.py tests/test_gpu_common.py'
241266
runner: ["self-hosted", "nvidiagpu"]
267+
- tag: 'nvidia-nvc12'
268+
flag: --init --gpus "device=${CUDA_VISIBLE_DEVICES:-all}"
269+
test: 'tests/test_gpu_openacc.py tests/test_gpu_common.py'
270+
runner: ["self-hosted", "nvidiagpu"]
242271
- tag: 'gcc'
243272
flag: '--init -t'
244273
test: 'tests/test_operator.py'

.github/workflows/pytest-gpu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
# -------------------- NVIDIA job --------------------
4848
- name: pytest-gpu-acc-nvidia
4949
test_files: "tests/test_adjoint.py tests/test_gpu_common.py tests/test_gpu_openacc.py tests/test_operator.py::TestEstimateMemory"
50-
base: "devitocodes/bases:nvidia-nvc"
50+
base: "devitocodes/bases:nvidia-nvc12"
5151
runner_label: nvidiagpu
5252
test_drive_cmd: "nvidia-smi"
5353
# Respect CUDA_VISIBLE_DEVICES and also hard-limit Docker to that device.

0 commit comments

Comments
 (0)