1- name : KoboldCpp Linux ROCm
1+ name : Koboldcpp Linux ROCm
22
33on :
44 workflow_dispatch :
1212 required : false
1313 default : ' '
1414
15+
1516env :
1617 BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
1718 KCPP_CUDA : rocm
@@ -22,16 +23,24 @@ jobs:
2223 runs-on : ubuntu-22.04
2324 permissions : write-all
2425 steps :
25- - name : Free up disk space before container
26- run : |
27- echo "Cleaning up runner to make room for ROCm container..."
28- sudo rm -rf /usr/share/dotnet
29- sudo rm -rf /opt/ghc
30- sudo rm -rf /opt/hostedtoolcache
31- sudo apt-get clean
32- df -h
26+ - name : Free Disk Space (Ubuntu)
27+ uses : jlumbroso/free-disk-space@main
28+ with :
29+ # this might remove tools that are actually needed,
30+ # if set to "true" but frees about 6 GB
31+ tool-cache : true
32+
33+ # all of these default to true, but feel free to set to
34+ # "false" if necessary for your workflow
35+ android : true
36+ dotnet : true
37+ haskell : true
38+ large-packages : true
39+ docker-images : true
40+ swap-storage : true
3341
34- - name : Checkout source
42+ - name : Clone
43+ id : checkout
3544 uses : actions/checkout@v3
3645 with :
3746 ref : ${{ inputs.commit_hash != '' && inputs.commit_hash || github.head_ref || github.ref_name }}
@@ -40,27 +49,33 @@ jobs:
4049 run : |
4150 echo "Building from ref: ${{ inputs.commit_hash != '' && inputs.commit_hash || github.head_ref || github.ref_name }}"
4251
43- - name : Build inside ROCm container
52+ - name : Dependencies
53+ id : depends
54+ run : |
55+ sudo apt update
56+ export DEBIAN_FRONTEND=noninteractive
57+ sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime
58+ echo "tzdata tzdata/Areas select Etc" | sudo debconf-set-selections
59+ echo "tzdata tzdata/Zones/Etc select UTC" | sudo debconf-set-selections
60+ sudo apt-get -y install git curl bzip2 python3-tk tcl tk
61+ 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"
62+ sudo rm -rf rocm-install*
63+
64+ - name : Set Tcl/Tk Paths
65+ run : |
66+ echo "TCL_LIBRARY=$(find /usr/lib/ -name 'tcl8*' | head -n 1)" >> $GITHUB_ENV
67+ echo "TK_LIBRARY=$(find /usr/lib/ -name 'tk8*' | head -n 1)" >> $GITHUB_ENV
68+
69+ - name : Build
70+ id : make_build
4471 run : |
45- docker run --privileged \
46- -v "${{ github.workspace }}:/workspace" \
47- -w /workspace \
48- -e KCPP_CUDA="rocm" \
49- -e BRANCH_NAME="${{ github.head_ref || github.ref_name }}" \
50- rocm/dev-ubuntu-22.04:7.0-complete \
51- bash -c "
52- apt update &&
53- DEBIAN_FRONTEND=noninteractive apt install -y git curl bzip2 python3-tk tcl tk &&
54- export TCL_LIBRARY=\$(find /usr/lib/ -name 'tcl8*' | head -n 1) &&
55- export TK_LIBRARY=\$(find /usr/lib/ -name 'tk8*' | head -n 1) &&
56- ./koboldcpp.sh dist
57- "
72+ ./koboldcpp.sh dist
5873
5974 - name : Save artifact
6075 uses : actions/upload-artifact@v4
6176 with :
6277 name : kcpp_linux_binary
63- path : ${{ github.workspace }}/ dist/
78+ path : dist/
6479
6580 - name : Upload to GitHub Release
6681 env :
0 commit comments