-
Notifications
You must be signed in to change notification settings - Fork 30
122 lines (91 loc) · 3.36 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: "Build"
on:
workflow_dispatch:
push:
branches:
- "main"
paths-ignore:
- "**.md"
- "proto/**"
pull_request:
branches:
- "main"
paths-ignore:
- "**.md"
- "proto/**"
defaults:
run:
shell: bash
env:
CI: true
DOCKER_BUILDKIT: 1
SERVER_IMAGE_NAME: "text-gen-server:0"
jobs:
build:
runs-on: ubuntu-latest
env:
BUILDKIT_INLINE_CACHE: 1
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Free up disk space"
uses: ./.github/actions/free-up-disk-space
- name: "Set up QEMU"
uses: docker/setup-qemu-action@v3
- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v3
- name: "Generate job steps to build stages sequentially"
run: |
build_targets=$(grep -iE "^FROM .+ as .*$" Dockerfile | grep -E -o "[^ ]+$")
for t in $build_targets; do
echo
echo " - name: \"Docker build ${t}\""
echo " run: docker build --target=$t -t $t ."
done
- name: "Docker build base"
run: docker build --target=base -t base .
- name: "Docker build cuda-base"
run: docker build --target=cuda-base -t cuda-base .
- name: "Docker build cuda-devel"
run: docker build --target=cuda-devel -t cuda-devel .
- name: "Docker build python-builder"
run: docker build --target=python-builder -t python-builder .
- name: "Docker build flash-att-v2-builder"
run: docker build --target=flash-att-v2-builder -t flash-att-v2-builder .
- name: "Docker build flash-att-builder"
run: docker build --target=flash-att-builder -t flash-att-builder .
- name: "Docker build flash-att-cache"
run: docker build --target=flash-att-cache -t flash-att-cache .
- name: "Docker build flash-att-v2-cache"
run: docker build --target=flash-att-v2-cache -t flash-att-v2-cache .
- name: "Docker build auto-gptq-installer"
run: docker build --target=auto-gptq-installer -t auto-gptq-installer .
- name: "Docker build auto-gptq-cache"
run: docker build --target=auto-gptq-cache -t auto-gptq-cache .
- name: "Docker build cuda-runtime"
run: docker build --target=cuda-runtime -t cuda-runtime .
- name: "Docker build rust-builder"
run: docker build --target=rust-builder -t rust-builder .
- name: "Docker build router-builder"
run: docker build --target=router-builder -t router-builder .
- name: "Docker build launcher-builder"
run: docker build --target=launcher-builder -t launcher-builder .
- name: "Docker build test-base"
run: docker build --target=test-base -t test-base .
- name: "Docker build cpu-tests"
run: docker build --target=cpu-tests -t cpu-tests .
- name: "Docker build build"
run: docker build --target=build -t build .
- name: "Docker build exllama-kernels-builder"
run: docker build --target=exllama-kernels-builder -t exllama-kernels-builder .
- name: "Docker build exllamav2-kernels-builder"
run: docker build --target=exllamav2-kernels-builder -t exllamav2-kernels-builder .
- name: "Docker build server-release"
run: docker build --target=server-release -t server-release .
- name: "List docker images"
run: docker images
- name: "Check disk usage"
shell: bash
run: |
docker system df
df -h