forked from wylab/llama.cpp
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: Build ROCm Server Image
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
paths:
|
|
- '.devops/rocm.Dockerfile'
|
|
- '.github/workflows/build-rocm.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
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 "${{ secrets.REGISTRY_TOKEN }}" | docker login 192.168.1.50:3000 -u wylab --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 192.168.1.50:3000/wylab/llama.cpp:server-rocm-${{ steps.tag.outputs.build_num }} \
|
|
-t 192.168.1.50:3000/wylab/llama.cpp:server-rocm \
|
|
.
|
|
|
|
- name: Push images
|
|
run: |
|
|
docker push 192.168.1.50:3000/wylab/llama.cpp:server-rocm-${{ steps.tag.outputs.build_num }}
|
|
docker push 192.168.1.50:3000/wylab/llama.cpp:server-rocm
|