1- name : Koboldcpp Linux ROCm
1+ name : KoboldCpp Linux ROCm
22
33on :
44 workflow_dispatch :
@@ -22,27 +22,16 @@ jobs:
2222 runs-on : ubuntu-22.04
2323 permissions : write-all
2424 steps :
25- - name : Free Disk Space (Ubuntu)
26- uses : jlumbroso/free-disk-space@main
27- with :
28- # this might remove tools that are actually needed,
29- # if set to "true" but frees about 6 GB
30- tool-cache : true
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
3133
32- # all of these default to true, but feel free to set to
33- # "false" if necessary for your workflow
34- android : true
35- dotnet : true
36- haskell : true
37- large-packages : true
38- docker-images : true
39- swap-storage : true
40- container :
41- image : rocm/dev-ubuntu-22.04:7.0-complete
42- options : --privileged
43- steps :
44- - name : Clone
45- id : checkout
34+ - name : Checkout source
4635 uses : actions/checkout@v3
4736 with :
4837 ref : ${{ inputs.commit_hash != '' && inputs.commit_hash || github.head_ref || github.ref_name }}
@@ -51,25 +40,20 @@ jobs:
5140 run : |
5241 echo "Building from ref: ${{ inputs.commit_hash != '' && inputs.commit_hash || github.head_ref || github.ref_name }}"
5342
54- - name : Dependencies
55- id : depends
56- run : |
57- sudo apt update
58- export DEBIAN_FRONTEND=noninteractive
59- sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime
60- echo "tzdata tzdata/Areas select Etc" | sudo debconf-set-selections
61- echo "tzdata tzdata/Zones/Etc select UTC" | sudo debconf-set-selections
62- sudo apt-get -y install git curl bzip2 python3-tk tcl tk
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
43+ - name : Build inside ROCm container
7144 run : |
72- ./koboldcpp.sh dist
45+ docker pull rocm/dev-ubuntu-22.04:7.0-complete
46+ docker run --privileged \
47+ -v "${{ github.workspace }}:/workspace" \
48+ -w /workspace \
49+ rocm/dev-ubuntu-22.04:7.0-complete \
50+ bash -c "
51+ apt update &&
52+ DEBIAN_FRONTEND=noninteractive apt install -y git curl bzip2 python3-tk tcl tk &&
53+ export TCL_LIBRARY=\$(find /usr/lib/ -name 'tcl8*' | head -n 1) &&
54+ export TK_LIBRARY=\$(find /usr/lib/ -name 'tk8*' | head -n 1) &&
55+ ./koboldcpp.sh dist
56+ "
7357
7458 - name : Save artifact
7559 uses : actions/upload-artifact@v4
0 commit comments