Skip to content

Commit 302f44b

Browse files
committed
Adding new dockerfile and adding nvidia builds to docker
1 parent b07cbca commit 302f44b

4 files changed

Lines changed: 47 additions & 38 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,14 @@ jobs:
6161
push: true
6262
no-cache: true
6363
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8
64-
tags: fyb3roptik/threadfin:latest,fyb3roptik/threadfin:${{ github.ref_name }}
64+
tags: fyb3roptik/threadfin:latest,fyb3roptik/threadfin:${{ github.ref_name }}
65+
66+
- name: Docker Nvidia Build and Push
67+
uses: docker/build-push-action@v4
68+
with:
69+
context: .
70+
build-args: NVIDIA=1
71+
push: true
72+
no-cache: true
73+
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8
74+
tags: fyb3roptik/threadfin:latest-nvidia,fyb3roptik/threadfin:${{ github.ref_name }}-nvidia

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ RUN git pull
1313
RUN go mod tidy && go mod vendor
1414
RUN go build threadfin.go
1515

16-
# Second stage. Creating an image
16+
# Second stage. Creating an image based on NVIDIA support argument
1717
# -----------------------------------------------------------------------------
18-
19-
# Base image is a latest stable debian
20-
FROM alpine:latest
18+
ARG USE_NVIDIA=0
19+
FROM ${USE_NVIDIA:+nvidia/cuda:11.4.1-base-}alpine:latest
2120

2221
ARG BUILD_DATE
2322
ARG VCS_REF

0 commit comments

Comments
 (0)