forked from wylab/llama.cpp
ebae963047
Build the server-rocm image locally on Gitea Runner instead of pulling from ghcr.io. Narrows GPU arch targets to gfx1100-1102 (Navi 31/32/33) for faster builds and smaller images. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
name: Build ROCm Server Image
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
paths:
|
|
- '.devops/rocm.Dockerfile'
|
|
- '.github/workflows/build-rocm.yml'
|
|
|
|
jobs:
|
|
build-rocm-server:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Determine build tag
|
|
id: tag
|
|
run: |
|
|
# Use short commit hash as build number (matches upstream bXXXX convention)
|
|
BUILD_NUM="b$(git rev-list --count HEAD)"
|
|
echo "build_num=${BUILD_NUM}" >> $GITHUB_OUTPUT
|
|
echo "Build number: ${BUILD_NUM}"
|
|
|
|
- name: Log in to Gitea Container Registry
|
|
run: |
|
|
echo "${{ github.token }}" | docker login git.wylab.me -u ${{ github.actor }} --password-stdin
|
|
|
|
- name: Build server-rocm image
|
|
run: |
|
|
docker build \
|
|
--target server \
|
|
--build-arg ROCM_DOCKER_ARCH='gfx1100;gfx1101;gfx1102' \
|
|
-f .devops/rocm.Dockerfile \
|
|
-t git.wylab.me/wylab/llama.cpp:server-rocm-${{ steps.tag.outputs.build_num }} \
|
|
-t git.wylab.me/wylab/llama.cpp:server-rocm \
|
|
.
|
|
|
|
- name: Push images
|
|
run: |
|
|
docker push git.wylab.me/wylab/llama.cpp:server-rocm-${{ steps.tag.outputs.build_num }}
|
|
docker push git.wylab.me/wylab/llama.cpp:server-rocm
|