blob: 7399a8c29457ade7eea8d0793bbb3d5d16069a8c (
plain)
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
|
# Maintainer: robertfoster
_pkgbase=local-ai
_pkgname=LocalAI
pkgname="${_pkgbase}-hipblas"
pkgver=2.24.2
pkgrel=1
pkgdesc="Free, Open Source OpenAI alternative. Self-hosted, community-driven and local-first ((with AMD ROCm optimizations)"
arch=('x86_64')
url="https://github.com/mudler/LocalAI"
license=('MIT')
backup=("etc/${_pkgbase}/${_pkgbase}.conf")
depends=('rocm-hip-runtime' 'glibc')
conflicts=("${_pkgbase}")
provides=("${_pkgbase}")
options=('!strip')
makedepends=(
'c-ares'
'ccache'
'cmake'
'git'
'go'
'grpc'
'make'
'openssl'
'protoc-gen-go'
'protoc-gen-go-grpc'
're2'
'rocm-hip-sdk'
'upx'
)
source=("${_pkgbase}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
"${_pkgbase}.conf"
"${_pkgbase}.tmpfiles"
"${_pkgbase}.sysusers"
"${_pkgbase}.service"
)
prepare() {
cd "${srcdir}/${_pkgname}-${pkgver}"
make get-sources
}
build() {
GO_TAGS="stablediffusion tts p2p"
cd "${srcdir}/${_pkgname}-${pkgver}"
export CXXFLAGS+="$CXXFLAGS -fcf-protection=none"
BUILD_TYPE=hipblas make build -j"$(nproc)"
}
package() {
cd "${srcdir}/${_pkgname}-${pkgver}"
install -Dm775 "${_pkgbase}" -t "${pkgdir}/usr/bin/"
install -D -m644 "${srcdir}/${_pkgbase}.conf" \
"${pkgdir}/etc/${_pkgbase}/${_pkgbase}.conf"
upx "${pkgdir}/usr/bin/${_pkgbase}"
# systemd
install -D -m644 "${srcdir}/${_pkgbase}.service" \
-t "${pkgdir}/usr/lib/systemd/system"
install -D -m644 "${srcdir}/${_pkgbase}.sysusers" \
"${pkgdir}/usr/lib/sysusers.d/${_pkgbase}.conf"
install -D -m644 "${srcdir}/${_pkgbase}.tmpfiles" \
"${pkgdir}/usr/lib/tmpfiles.d/${_pkgbase}.conf"
}
sha256sums=('6dd03d21c4c903890bd2bdc6c18b4a1191b1a79dc296ccbf817d773cdcdb401a'
'8e530e32d96d02c01192c987e8bffaf0bb67db34bf999fccdfa8d0777789233b'
'90e042d0f5885b63a6aa4db7f87d6b931956f6c9b022407593466f61f6973312'
'97ba21355c50ec658e220bc0558f506227b3dc77cc51f343b6f5657b0d77a19b'
'bd420ec530cbfdb7f29b309e3c0c8cd72de6346b7c8e9882e917a071c65b344c')
|