From 36e8c9b633d672e9e65cd77bb4624aa8599c6c16 Mon Sep 17 00:00:00 2001 From: henk717 <7526774+henk717@users.noreply.github.com> Date: Fri, 19 Sep 2025 11:36:47 +0200 Subject: [PATCH 01/11] Bump ROCm --- .github/workflows/kcpp-build-release-linux-rocm.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kcpp-build-release-linux-rocm.yaml b/.github/workflows/kcpp-build-release-linux-rocm.yaml index 672f3e295ce..78368909855 100644 --- a/.github/workflows/kcpp-build-release-linux-rocm.yaml +++ b/.github/workflows/kcpp-build-release-linux-rocm.yaml @@ -58,7 +58,7 @@ jobs: echo "tzdata tzdata/Areas select Etc" | sudo debconf-set-selections echo "tzdata tzdata/Zones/Etc select UTC" | sudo debconf-set-selections sudo apt-get -y install git curl bzip2 python3-tk tcl tk - curl -fLO https://repo.radeon.com/rocm/installer/rocm-runfile-installer/rocm-rel-6.4.1/ubuntu/22.04/rocm-installer_1.1.1.60401-30-83~22.04.run && sudo bash rocm-installer_1.1.1.60401-30-83~22.04.run deps=install rocm postrocm target="/opt" + curl -fLO https://repo.radeon.com/rocm/installer/rocm-runfile-installer/rocm-rel-7.0.1/ubuntu/22.04/rocm-installer_1.2.1.70001-36-42~22.04.run && sudo bash rocm-installer_1.2.1.70001-36-42~22.04.run deps=install rocm postrocm target="/opt" sudo rm -rf rocm-install* - name: Set Tcl/Tk Paths From 530d226e30176b38e13df0c206081d0c52d51851 Mon Sep 17 00:00:00 2001 From: henk717 <7526774+henk717@users.noreply.github.com> Date: Mon, 22 Sep 2025 22:17:14 +0200 Subject: [PATCH 02/11] Container experiment --- .../kcpp-build-release-linux-rocm.yaml | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/.github/workflows/kcpp-build-release-linux-rocm.yaml b/.github/workflows/kcpp-build-release-linux-rocm.yaml index 78368909855..e8801ecf242 100644 --- a/.github/workflows/kcpp-build-release-linux-rocm.yaml +++ b/.github/workflows/kcpp-build-release-linux-rocm.yaml @@ -22,23 +22,10 @@ jobs: linux: runs-on: ubuntu-22.04 permissions: write-all + container: + image: rocm/dev-ubuntu-22.04:7.0-complete + options: --privileged steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - # this might remove tools that are actually needed, - # if set to "true" but frees about 6 GB - tool-cache: true - - # all of these default to true, but feel free to set to - # "false" if necessary for your workflow - android: true - dotnet: true - haskell: true - large-packages: true - docker-images: true - swap-storage: true - - name: Clone id: checkout uses: actions/checkout@v3 @@ -58,8 +45,6 @@ jobs: echo "tzdata tzdata/Areas select Etc" | sudo debconf-set-selections echo "tzdata tzdata/Zones/Etc select UTC" | sudo debconf-set-selections sudo apt-get -y install git curl bzip2 python3-tk tcl tk - curl -fLO https://repo.radeon.com/rocm/installer/rocm-runfile-installer/rocm-rel-7.0.1/ubuntu/22.04/rocm-installer_1.2.1.70001-36-42~22.04.run && sudo bash rocm-installer_1.2.1.70001-36-42~22.04.run deps=install rocm postrocm target="/opt" - sudo rm -rf rocm-install* - name: Set Tcl/Tk Paths run: | From e6ee144a9a804b85e2a39838830391b90a6f1852 Mon Sep 17 00:00:00 2001 From: henk717 <7526774+henk717@users.noreply.github.com> Date: Fri, 3 Oct 2025 17:28:20 +0200 Subject: [PATCH 03/11] Can 7.0 compile it on its own? --- .github/workflows/kcpp-build-release-linux-rocm.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kcpp-build-release-linux-rocm.yaml b/.github/workflows/kcpp-build-release-linux-rocm.yaml index e8801ecf242..cd5f33bc391 100644 --- a/.github/workflows/kcpp-build-release-linux-rocm.yaml +++ b/.github/workflows/kcpp-build-release-linux-rocm.yaml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-22.04 permissions: write-all container: - image: rocm/dev-ubuntu-22.04:7.0-complete + image: rocm/dev-ubuntu-22.04:7.0 options: --privileged steps: - name: Clone From 8e6ce5428a0bd08812bbb8dc194ff0952c44aa3b Mon Sep 17 00:00:00 2001 From: henk717 <7526774+henk717@users.noreply.github.com> Date: Fri, 3 Oct 2025 17:39:09 +0200 Subject: [PATCH 04/11] Clean the env before pulling docker --- .../kcpp-build-release-linux-rocm.yaml | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/kcpp-build-release-linux-rocm.yaml b/.github/workflows/kcpp-build-release-linux-rocm.yaml index cd5f33bc391..9a75edb8817 100644 --- a/.github/workflows/kcpp-build-release-linux-rocm.yaml +++ b/.github/workflows/kcpp-build-release-linux-rocm.yaml @@ -19,11 +19,31 @@ env: ARCHES_CU12: 1 jobs: + clean-linux: + runs-on: ubuntu-22.04 + permissions: write-all + steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: true + + # all of these default to true, but feel free to set to + # "false" if necessary for your workflow + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true linux: + needs: clean-linux runs-on: ubuntu-22.04 permissions: write-all container: - image: rocm/dev-ubuntu-22.04:7.0 + image: rocm/dev-ubuntu-22.04:7.0-complete options: --privileged steps: - name: Clone From 0dcc90b21aa0dfbede09fa98de430de0e2bffcab Mon Sep 17 00:00:00 2001 From: henk717 <7526774+henk717@users.noreply.github.com> Date: Fri, 3 Oct 2025 17:56:01 +0200 Subject: [PATCH 05/11] Cleanup attempt 2 --- .github/workflows/kcpp-build-release-linux-rocm.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/kcpp-build-release-linux-rocm.yaml b/.github/workflows/kcpp-build-release-linux-rocm.yaml index 9a75edb8817..78eedf22109 100644 --- a/.github/workflows/kcpp-build-release-linux-rocm.yaml +++ b/.github/workflows/kcpp-build-release-linux-rocm.yaml @@ -19,7 +19,10 @@ env: ARCHES_CU12: 1 jobs: - clean-linux: + linux: + needs: clean-linux + runs-on: ubuntu-22.04 + permissions: write-all runs-on: ubuntu-22.04 permissions: write-all steps: @@ -38,10 +41,6 @@ jobs: large-packages: true docker-images: true swap-storage: true - linux: - needs: clean-linux - runs-on: ubuntu-22.04 - permissions: write-all container: image: rocm/dev-ubuntu-22.04:7.0-complete options: --privileged From 3e77e98e73f2138c4aad69779079b3f337c02bf1 Mon Sep 17 00:00:00 2001 From: henk717 <7526774+henk717@users.noreply.github.com> Date: Fri, 3 Oct 2025 17:56:54 +0200 Subject: [PATCH 06/11] Fix cleanup test 2 --- .github/workflows/kcpp-build-release-linux-rocm.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/kcpp-build-release-linux-rocm.yaml b/.github/workflows/kcpp-build-release-linux-rocm.yaml index 78eedf22109..4b63097e9cc 100644 --- a/.github/workflows/kcpp-build-release-linux-rocm.yaml +++ b/.github/workflows/kcpp-build-release-linux-rocm.yaml @@ -12,7 +12,6 @@ on: required: false default: '' - env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} KCPP_CUDA: rocm @@ -20,9 +19,6 @@ env: jobs: linux: - needs: clean-linux - runs-on: ubuntu-22.04 - permissions: write-all runs-on: ubuntu-22.04 permissions: write-all steps: From cb9dff6ea88283efb92dc884eb25f73eb3f29840 Mon Sep 17 00:00:00 2001 From: henk717 <7526774+henk717@users.noreply.github.com> Date: Fri, 3 Oct 2025 18:00:29 +0200 Subject: [PATCH 07/11] Bing attempts to save ROCm users --- .../kcpp-build-release-linux-rocm.yaml | 62 +++++++------------ 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/.github/workflows/kcpp-build-release-linux-rocm.yaml b/.github/workflows/kcpp-build-release-linux-rocm.yaml index 4b63097e9cc..50f50e65d7b 100644 --- a/.github/workflows/kcpp-build-release-linux-rocm.yaml +++ b/.github/workflows/kcpp-build-release-linux-rocm.yaml @@ -1,4 +1,4 @@ -name: Koboldcpp Linux ROCm +name: KoboldCpp Linux ROCm on: workflow_dispatch: @@ -22,27 +22,16 @@ jobs: runs-on: ubuntu-22.04 permissions: write-all steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - # this might remove tools that are actually needed, - # if set to "true" but frees about 6 GB - tool-cache: true + - name: Free up disk space before container + run: | + echo "Cleaning up runner to make room for ROCm container..." + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf /opt/hostedtoolcache + sudo apt-get clean + df -h - # all of these default to true, but feel free to set to - # "false" if necessary for your workflow - android: true - dotnet: true - haskell: true - large-packages: true - docker-images: true - swap-storage: true - container: - image: rocm/dev-ubuntu-22.04:7.0-complete - options: --privileged - steps: - - name: Clone - id: checkout + - name: Checkout source uses: actions/checkout@v3 with: ref: ${{ inputs.commit_hash != '' && inputs.commit_hash || github.head_ref || github.ref_name }} @@ -51,25 +40,20 @@ jobs: run: | echo "Building from ref: ${{ inputs.commit_hash != '' && inputs.commit_hash || github.head_ref || github.ref_name }}" - - name: Dependencies - id: depends - run: | - sudo apt update - export DEBIAN_FRONTEND=noninteractive - sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime - echo "tzdata tzdata/Areas select Etc" | sudo debconf-set-selections - echo "tzdata tzdata/Zones/Etc select UTC" | sudo debconf-set-selections - sudo apt-get -y install git curl bzip2 python3-tk tcl tk - - - name: Set Tcl/Tk Paths - run: | - echo "TCL_LIBRARY=$(find /usr/lib/ -name 'tcl8*' | head -n 1)" >> $GITHUB_ENV - echo "TK_LIBRARY=$(find /usr/lib/ -name 'tk8*' | head -n 1)" >> $GITHUB_ENV - - - name: Build - id: make_build + - name: Build inside ROCm container run: | - ./koboldcpp.sh dist + docker pull rocm/dev-ubuntu-22.04:7.0-complete + docker run --privileged \ + -v "${{ github.workspace }}:/workspace" \ + -w /workspace \ + rocm/dev-ubuntu-22.04:7.0-complete \ + bash -c " + apt update && + DEBIAN_FRONTEND=noninteractive apt install -y git curl bzip2 python3-tk tcl tk && + export TCL_LIBRARY=\$(find /usr/lib/ -name 'tcl8*' | head -n 1) && + export TK_LIBRARY=\$(find /usr/lib/ -name 'tk8*' | head -n 1) && + ./koboldcpp.sh dist + " - name: Save artifact uses: actions/upload-artifact@v4 From 032eb4d9333c4201d6b40dcb29ea154eed588a10 Mon Sep 17 00:00:00 2001 From: henk717 <7526774+henk717@users.noreply.github.com> Date: Fri, 3 Oct 2025 21:05:10 +0200 Subject: [PATCH 08/11] CI binary location fix attempt --- .github/workflows/kcpp-build-release-linux-rocm.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/kcpp-build-release-linux-rocm.yaml b/.github/workflows/kcpp-build-release-linux-rocm.yaml index 50f50e65d7b..3ba51696280 100644 --- a/.github/workflows/kcpp-build-release-linux-rocm.yaml +++ b/.github/workflows/kcpp-build-release-linux-rocm.yaml @@ -42,7 +42,6 @@ jobs: - name: Build inside ROCm container run: | - docker pull rocm/dev-ubuntu-22.04:7.0-complete docker run --privileged \ -v "${{ github.workspace }}:/workspace" \ -w /workspace \ @@ -59,13 +58,13 @@ jobs: uses: actions/upload-artifact@v4 with: name: kcpp_linux_binary - path: dist/ + path: ${{ github.workspace }}/dist/ - name: Upload to GitHub Release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh release upload rocm-rolling dist/koboldcpp-linux-x64-rocm --clobber + gh release upload rocm-rolling ${{ github.workspace }}/dist/koboldcpp-linux-x64-rocm --clobber - name: Upload version pinned tagged binary if: ${{ inputs.tag_name != '' }} @@ -73,5 +72,5 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAG_NAME: ${{ inputs.tag_name }} run: | - cp dist/koboldcpp-linux-x64-rocm "dist/koboldcpp-linux-x64-rocm-${TAG_NAME}" - gh release upload rocm-rolling "dist/koboldcpp-linux-x64-rocm-${TAG_NAME}" --clobber + cp dist/koboldcpp-linux-x64-rocm "${{ github.workspace }}/dist/koboldcpp-linux-x64-rocm-${TAG_NAME}" + gh release upload rocm-rolling "${{ github.workspace }}/dist/koboldcpp-linux-x64-rocm-${TAG_NAME}" --clobber From 83db48da0dc6d3c43a828fd7f56942cbd21f6d0c Mon Sep 17 00:00:00 2001 From: henk717 <7526774+henk717@users.noreply.github.com> Date: Fri, 3 Oct 2025 21:10:00 +0200 Subject: [PATCH 09/11] Attempt to fix Docker env vars (make it compile rocm again) --- .github/workflows/kcpp-build-release-linux-rocm.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/kcpp-build-release-linux-rocm.yaml b/.github/workflows/kcpp-build-release-linux-rocm.yaml index 3ba51696280..e97b3e9b693 100644 --- a/.github/workflows/kcpp-build-release-linux-rocm.yaml +++ b/.github/workflows/kcpp-build-release-linux-rocm.yaml @@ -46,6 +46,8 @@ jobs: -v "${{ github.workspace }}:/workspace" \ -w /workspace \ rocm/dev-ubuntu-22.04:7.0-complete \ + -e "KCPP_CUDA=ROCm" \ + -e "BRANCH_NAME=${{ github.head_ref || github.ref_name }}" \ bash -c " apt update && DEBIAN_FRONTEND=noninteractive apt install -y git curl bzip2 python3-tk tcl tk && @@ -64,7 +66,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh release upload rocm-rolling ${{ github.workspace }}/dist/koboldcpp-linux-x64-rocm --clobber + gh release upload rocm-rolling dist/koboldcpp-linux-x64-rocm --clobber - name: Upload version pinned tagged binary if: ${{ inputs.tag_name != '' }} @@ -72,5 +74,5 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAG_NAME: ${{ inputs.tag_name }} run: | - cp dist/koboldcpp-linux-x64-rocm "${{ github.workspace }}/dist/koboldcpp-linux-x64-rocm-${TAG_NAME}" - gh release upload rocm-rolling "${{ github.workspace }}/dist/koboldcpp-linux-x64-rocm-${TAG_NAME}" --clobber + cp dist/koboldcpp-linux-x64-rocm "dist/koboldcpp-linux-x64-rocm-${TAG_NAME}" + gh release upload rocm-rolling "dist/koboldcpp-linux-x64-rocm-${TAG_NAME}" --clobber From abf61150183cb258155bd14406c41ada5c68dfa0 Mon Sep 17 00:00:00 2001 From: henk717 <7526774+henk717@users.noreply.github.com> Date: Fri, 3 Oct 2025 21:26:55 +0200 Subject: [PATCH 10/11] Update kcpp-build-release-linux-rocm.yaml --- .github/workflows/kcpp-build-release-linux-rocm.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/kcpp-build-release-linux-rocm.yaml b/.github/workflows/kcpp-build-release-linux-rocm.yaml index e97b3e9b693..de151df6b74 100644 --- a/.github/workflows/kcpp-build-release-linux-rocm.yaml +++ b/.github/workflows/kcpp-build-release-linux-rocm.yaml @@ -45,9 +45,9 @@ jobs: docker run --privileged \ -v "${{ github.workspace }}:/workspace" \ -w /workspace \ + -e KCPP_CUDA="ROCm" \ + -e BRANCH_NAME="${{ github.head_ref || github.ref_name }}" \ rocm/dev-ubuntu-22.04:7.0-complete \ - -e "KCPP_CUDA=ROCm" \ - -e "BRANCH_NAME=${{ github.head_ref || github.ref_name }}" \ bash -c " apt update && DEBIAN_FRONTEND=noninteractive apt install -y git curl bzip2 python3-tk tcl tk && From eb2525bc56a996302cdccc9ce34ac05c5cc83dd2 Mon Sep 17 00:00:00 2001 From: henk717 <7526774+henk717@users.noreply.github.com> Date: Fri, 3 Oct 2025 21:56:46 +0200 Subject: [PATCH 11/11] Less fancy ROCm spelling --- .github/workflows/kcpp-build-release-linux-rocm.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kcpp-build-release-linux-rocm.yaml b/.github/workflows/kcpp-build-release-linux-rocm.yaml index de151df6b74..54bfa9622d0 100644 --- a/.github/workflows/kcpp-build-release-linux-rocm.yaml +++ b/.github/workflows/kcpp-build-release-linux-rocm.yaml @@ -45,7 +45,7 @@ jobs: docker run --privileged \ -v "${{ github.workspace }}:/workspace" \ -w /workspace \ - -e KCPP_CUDA="ROCm" \ + -e KCPP_CUDA="rocm" \ -e BRANCH_NAME="${{ github.head_ref || github.ref_name }}" \ rocm/dev-ubuntu-22.04:7.0-complete \ bash -c "