blob: 70d6ba4381e3634bd6daddb9e346e35060be809b (
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
|
# Maintainer: Scott Cheng <aur@chengscott.io>
# Contributor: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: flovo <flovo-git-commit@f-voegele.de>
pkgname=katago-cuda
_pkgname=katago
pkgver=1.16.0
pkgrel=1
pkgdesc='Baduk engine with no human-provided knowledge'
arch=(x86_64)
provides=($_pkgname)
conflicts=($_pkgname)
url='https://github.com/lightvector/KataGo'
license=(MIT)
depends=(libzip)
makedepends=(cmake cuda cudnn ninja)
source=("${pkgname}-${pkgver}.tar.gz"::"${url}/archive/refs/tags/v${pkgver}.tar.gz"
# Strongest confidently-rated network
"https://media.katagotraining.org/uploaded/networks/models/kata1/kata1-b28c512nbt-s8536703232-d4684449769.bin.gz"
)
b2sums=('68534acacbc794776d52a41608377e1ed8bf22e57bd20e43d6316a572f93d13cb6de037fb362a4c6c8c12c46ddf6fe08154cb4322ab127e839444bc1be7f09d9'
'cfc436324e667c4495a16390d019068bd76cc37ad38e6f5a59d6b96a33d3344e2945531bd25f615a26f8877950006d70139b0072349798650ea66ceece6dfe4d'
)
_model_source=("${source[@]:1}")
_model=("${_model_source[@]##*/}")
noextract=("${_model[@]}")
build() {
cmake \
-S "KataGo-${pkgver}/cpp" \
-B build \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=/usr \
-D USE_BACKEND=CUDA \
-D NO_GIT_REVISION=1 \
-G Ninja
cmake --build build
}
package() {
install -Dm755 build/katago "${pkgdir}/usr/bin/katago"
install -Dm644 "KataGo-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
# install models
for mi in "${_model[@]}"; do
install -Dm644 "${mi}" "${pkgdir}/usr/share/${_pkgname}/${mi}"
done
}
|