Skip to content

Commit 958f2fb

Browse files
author
Your Name
committed
adds submodule for speaches build to enable cuda on dgx
1 parent c57761d commit 958f2fb

4 files changed

Lines changed: 130 additions & 1 deletion

File tree

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: speeches
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- 'v*'
10+
paths:
11+
- 'speeches/**'
12+
pull_request:
13+
branches:
14+
- main
15+
paths:
16+
- 'speeches/**'
17+
release:
18+
types: [published, created, edited, prereleased]
19+
env:
20+
# Docker Hub
21+
DOCKERHUB_REPO: chaoscorp/speeches
22+
# GitHub Container Registry
23+
GHCR_REPO: ghcr.io/${{ github.repository_owner }}/speeches
24+
25+
jobs:
26+
build:
27+
name: Build and Push nvtitop-exporter Docker Image
28+
runs-on: ubuntu-latest
29+
permissions:
30+
contents: read
31+
packages: write
32+
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
36+
with:
37+
submodules: recursive
38+
39+
40+
- name: Set up QEMU
41+
uses: docker/setup-qemu-action@v3
42+
with:
43+
platforms: linux/amd64,linux/arm64
44+
45+
- name: Set up Docker Buildx
46+
uses: docker/setup-buildx-action@v3
47+
with:
48+
platforms: linux/amd64,linux/arm64
49+
50+
# - name: Log in to Docker Hub
51+
# if: github.event_name != 'pull_request'
52+
# uses: docker/login-action@v3
53+
# with:
54+
# username: ${{ secrets.DOCKERHUB_USERNAME }}
55+
# password: ${{ secrets.DOCKERHUB_TOKEN }}
56+
57+
- name: Log in to GitHub Container Registry
58+
if: github.event_name != 'pull_request'
59+
uses: docker/login-action@v3
60+
with:
61+
registry: ghcr.io
62+
username: ${{ github.actor }}
63+
password: ${{ secrets.GITHUB_TOKEN }}
64+
65+
- name: Extract metadata (tags, labels)
66+
id: meta
67+
uses: docker/metadata-action@v5
68+
with:
69+
images: |
70+
${{ env.GHCR_REPO }}
71+
tags: |
72+
# Set latest tag for default branch
73+
type=raw,value=latest,enable={{is_default_branch}}
74+
# Tag with branch name
75+
type=ref,event=branch
76+
# Tag with PR number
77+
type=ref,event=pr
78+
# Tag with git tag (v1.0.0 -> 1.0.0)
79+
type=semver,pattern={{version}}
80+
# Tag with major.minor (v1.0.0 -> 1.0)
81+
type=semver,pattern={{major}}.{{minor}}
82+
# Tag with major (v1.0.0 -> 1)
83+
type=semver,pattern={{major}}
84+
# Tag with short SHA
85+
type=sha,prefix=sha-
86+
87+
- name: Build and push (main/tags - push to registries)
88+
if: github.event_name != 'pull_request'
89+
uses: docker/build-push-action@v5
90+
with:
91+
context: ./speeches/
92+
file: ./speeches/Dockerfile
93+
platforms: linux/amd64,linux/arm64
94+
push: true
95+
tags: ${{ steps.meta.outputs.tags }}
96+
labels: ${{ steps.meta.outputs.labels }}
97+
cache-from: |
98+
type=gha
99+
type=registry,ref=${{ env.GHCR_REPO }}:buildcache
100+
cache-to: type=gha,mode=max
101+
# Build args for cache optimization
102+
build-args: |
103+
BUILDKIT_INLINE_CACHE=1
104+
105+
- name: Generate build summary
106+
run: |
107+
echo "## Docker Build Summary" >> $GITHUB_STEP_SUMMARY
108+
echo "" >> $GITHUB_STEP_SUMMARY
109+
echo "### Platforms" >> $GITHUB_STEP_SUMMARY
110+
echo "- \`linux/amd64\` (x86_64)" >> $GITHUB_STEP_SUMMARY
111+
echo "- \`linux/arm64\` (ARM64/DGX Spark compatible)" >> $GITHUB_STEP_SUMMARY
112+
echo "" >> $GITHUB_STEP_SUMMARY
113+
echo "### Tags" >> $GITHUB_STEP_SUMMARY
114+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
115+
echo "${{ steps.meta.outputs.tags }}" >> $GITHUB_STEP_SUMMARY
116+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
117+
echo "" >> $GITHUB_STEP_SUMMARY
118+
if [ "${{ github.event_name }}" != "pull_request" ]; then
119+
echo "### Registries" >> $GITHUB_STEP_SUMMARY
120+
echo "- Docker Hub: \`${{ env.DOCKERHUB_REPO }}\`" >> $GITHUB_STEP_SUMMARY
121+
echo "- GHCR: \`${{ env.GHCR_REPO }}\`" >> $GITHUB_STEP_SUMMARY
122+
else
123+
echo "### Note" >> $GITHUB_STEP_SUMMARY
124+
echo "PR build - images not pushed to registries" >> $GITHUB_STEP_SUMMARY
125+
fi

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "nvitop"]
55
path = nvitop
66
url = https://github.com/MaxwellDPS/nvitop
7+
[submodule "speaches"]
8+
path = speaches
9+
url = https://github.com/speaches-ai/speaches.git

speaches

Submodule speaches added at fa1e0d5

0 commit comments

Comments
 (0)