Skip to content

Commit 81d35ce

Browse files
authored
Merge pull request lllyasviel#265 from ayan4m1/fix/docker-images
Build Docker images for CUDA 12.4/6/8 and include patch version in specifier
2 parents 8e548c1 + 118d51b commit 81d35ce

4 files changed

Lines changed: 24 additions & 8 deletions

File tree

.github/actions/docker-publish-action/action.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,26 @@ runs:
3434
uses: docker/metadata-action@v5
3535
with:
3636
images: ${{ inputs.image_name }}
37+
- name: Trim Commit SHA
38+
uses: 2428392/gh-truncate-string-action@v1
39+
id: trimCommitSha
40+
with:
41+
stringToTruncate: "${{ inputs.commit_sha }}"
42+
maxLength: 8
43+
- name: Trim CUDA version
44+
uses: 2428392/gh-truncate-string-action@v1
45+
id: trimCudaVersion
46+
with:
47+
stringToTruncate: "${{ inputs.cuda_version }}"
48+
maxLength: 4
3749
- name: Build and push
3850
uses: docker/build-push-action@v5
3951
with:
4052
push: true
4153
file: Dockerfile
4254
tags: |
43-
${{ inputs.image_name }}:cuda${{ inputs.cuda_version }}-latest-${{ inputs.branch }}
44-
${{ inputs.image_name }}:cuda${{ inputs.cuda_version }}-${{ inputs.commit_sha }}
55+
${{ inputs.image_name }}:cuda${{ steps.trimCudaVersion.outputs.string }}-latest${{ inputs.branch == "main" && '' || join('-', inputs.branch) }}
56+
${{ inputs.image_name }}:cuda${{ steps.trimCudaVersion.outputs.string }}-${{ steps.trimCommitSha.outputs.string }}
4557
labels: ${{ steps.meta.outputs.labels }}
4658
build-args: |
4759
CUDA_VERSION=${{ inputs.cuda_version }}

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
packages: write
1414
strategy:
1515
matrix:
16-
cuda-version: ["12.9", "12.8", "12.4"]
16+
cuda-version: ["12.4.1", "12.6.3", "12.8.1"]
1717
steps:
1818
- name: Checkout repository
1919
uses: actions/checkout@v4
@@ -30,5 +30,5 @@ jobs:
3030
commit_sha: ${{ github.sha }}
3131
username: ${{ secrets.DOCKERHUB_USERNAME }}
3232
password: ${{ secrets.DOCKERHUB_PASSWORD }}
33-
image_name: colinurbs439/fp-studio
33+
image_name: colinurbs/fp-studio
3434
cuda_version: ${{ matrix.cuda-version }}

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
ARG CUDA_VERSION=12.4
1+
ARG CUDA_VERSION=12.4.1
22

3-
FROM nvidia/cuda:${CUDA_VERSION}.0-runtime-ubuntu22.04
3+
FROM nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu24.04
44

55
ARG CUDA_VERSION
66

docker-compose.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
services:
22
studio:
3-
build: .
4-
image: colinurbs/fp-studio:cuda12.9-latest-develop
3+
build:
4+
# modify this if you are building the image locally and need a different CUDA version
5+
args:
6+
- CUDA_VERSION=12.4.1
7+
# modify the tag here if you need a different CUDA version or branch
8+
image: colinurbs/fp-studio:cuda12.4-latest-develop
59
restart: unless-stopped
610
ports:
711
- "7860:7860"

0 commit comments

Comments
 (0)