Skip to content

Commit

Permalink
Try using matrix in rocm workflow instead of env
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Feb 1, 2025
1 parent 1f79c88 commit 66b7175
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/dockerize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ permissions:
jobs:
rocm:
runs-on: ubuntu-22.04
env:
LLAMACPP_VERSION: b4600
strategy:
fail-fast: false
matrix:
version: [b4600]
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -25,28 +25,28 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Free Disk Space (Ubuntu)
uses: ggml-org/[email protected]
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
# - name: Free Disk Space (Ubuntu)
# uses: ggml-org/[email protected]
# with:
# tool-cache: false
# android: true
# dotnet: true
# haskell: true
# large-packages: true
# docker-images: true
# swap-storage: true

- name: Build and push server Docker image (tagged + versioned)
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64
tags: |
ghcr.io/${{ github.repository }}:server-rocm-${{ env.LLAMACPP_VERSION }}
ghcr.io/${{ github.repository }}:server-rocm-${{ matrix.version }}
file: docker/rocm.Dockerfile
target: server
build-args: |
LLAMACPP_VERSION=${{ env.LLAMACPP_VERSION }}
LLAMACPP_VERSION=${{ matrix.version }}
provenance: false
cache-from: type=gha
cache-to: type=gha,mode=max
4 changes: 2 additions & 2 deletions docker/rocm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ ARG UBUNTU_VERSION=24.04

ARG ROCM_VERSION=6.3
ARG AMDGPU_VERSION=6.3
ARG LLAMACPP_VERSION=b4600

ARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete

### Build image
FROM ${BASE_ROCM_DEV_CONTAINER} AS build

ARG ROCM_DOCKER_ARCH='gfx1010,gfx1030,gfx1032,gfx1100,gfx1101,gfx1102'
ARG LLAMACPP_VERSION=master

ENV AMDGPU_TARGETS=${ROCM_DOCKER_ARCH}

Expand All @@ -24,7 +24,7 @@ RUN apt-get update \

WORKDIR /app

RUN git clone https://github.com/ggerganov/llama.cpp --branch=${LLAMACPP_VERSION} --depth=1 .
RUN git clone https://github.com/ggerganov/llama.cpp --branch=$LLAMACPP_VERSION --depth=1 .

RUN HIPCXX="$(hipconfig -l)/clang" HIP_PATH="$(hipconfig -R)" \
cmake -S . -B build -DLLAMA_HIPBLAS=ON -DGGML_HIP=ON -DAMDGPU_TARGETS=$ROCM_DOCKER_ARCH -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=ON \
Expand Down

0 comments on commit 66b7175

Please sign in to comment.