Skip to content

Commit 74ca829

Browse files
committed
feat(docker): expand device-type matrix to include CPU and ROCm for Docker builds
1 parent 6de4e92 commit 74ca829

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.dockerignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ Thumbs.db
1212
*.swp
1313
*.swo
1414

15-
# Git metadata (not needed in build context)
15+
# Git metadata
1616
.git
1717
.gitmodules
1818
.gitignore
1919

20-
# Rust/Node caches (you already have the important ones)
20+
# Rust/Node caches
2121
**/target
2222
**/node_modules
2323

.github/workflows/docker.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- "v*"
1010
- "!*-dev.*"
1111
- "!vscode@*"
12-
- '!vim@*'
12+
- "!vim@*"
1313

1414
concurrency:
1515
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
@@ -32,11 +32,16 @@ jobs:
3232
id-token: write
3333

3434
strategy:
35+
# Added CPU and ROCm to the device-type matrix
3536
matrix:
36-
device-type: [cuda]
37+
device-type: [cuda, cpu, rocm]
3738
include:
3839
- device-type: cuda
3940
image-suffix: ""
41+
- device-type: cpu
42+
image-suffix: "-cpu"
43+
- device-type: rocm
44+
image-suffix: "-rocm"
4045

4146
steps:
4247
- name: Free Disk Space (Ubuntu)
@@ -106,7 +111,7 @@ jobs:
106111
107112
# Build and push Docker image with Buildx (don't push on PR)
108113
# https://github.com/docker/build-push-action
109-
- name: Build and push Docker image
114+
- name: Build and push Docker image (${{ matrix.device-type }})
110115
id: build-and-push
111116
uses: docker/build-push-action@v5
112117
with:
@@ -139,7 +144,7 @@ jobs:
139144
# Build and push Docker image with Buildx
140145
# Only built on release tags for compatibility with previous versions
141146
- name: Build and push Docker image for CUDA 11
142-
if: startsWith(github.ref, 'refs/tags/v')
147+
if: startsWith(github.ref, 'refs/tags/v') && matrix.device-type == 'cuda'
143148
id: build-and-push-cuda11
144149
uses: docker/build-push-action@v5
145150
with:
@@ -154,7 +159,6 @@ jobs:
154159
RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
155160
CUDA_VERSION=11.7.1
156161
157-
158162
- name: Docker Hub Description
159163
uses: peter-evans/dockerhub-description@v4
160164
with:

0 commit comments

Comments
 (0)