forked from synesthesiam/rhasspy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·89 lines (69 loc) · 3.16 KB
/
Makefile
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
.PHONY: web-dist docker manifest docs-uml g2p check
SHELL := bash
# -----------------------------------------------------------------------------
# Docker
# -----------------------------------------------------------------------------
docker: web-dist docker-amd64 docker-armhf docker-aarch64 docker-push manifest
docker-amd64:
docker build . -f docker/templates/dockerfiles/Dockerfile.prebuilt.alsa.all \
--build-arg BUILD_ARCH=amd64 \
--build-arg CPU_ARCH=x86_64 \
--build-arg BUILD_FROM=ubuntu:bionic \
-t synesthesiam/rhasspy-server:amd64
docker-armhf:
docker build . -f docker/templates/dockerfiles/Dockerfile.prebuilt.alsa.all \
--build-arg BUILD_ARCH=armhf \
--build-arg CPU_ARCH=armv7l \
--build-arg BUILD_FROM=arm32v7/ubuntu:bionic \
-t synesthesiam/rhasspy-server:armhf
docker-aarch64:
docker build . -f docker/templates/dockerfiles/Dockerfile.prebuilt.alsa.all \
--build-arg BUILD_ARCH=aarch64 \
--build-arg CPU_ARCH=arm64v8 \
--build-arg BUILD_FROM=arm64v8/ubuntu:bionic \
-t synesthesiam/rhasspy-server:aarch64
docker-push:
docker push synesthesiam/rhasspy-server:amd64
docker push synesthesiam/rhasspy-server:armhf
docker push synesthesiam/rhasspy-server:aarch64
manifest:
docker manifest push --purge synesthesiam/rhasspy-server:latest
docker manifest create --amend synesthesiam/rhasspy-server:latest \
synesthesiam/rhasspy-server:amd64 \
synesthesiam/rhasspy-server:armhf \
synesthesiam/rhasspy-server:aarch64
docker manifest annotate synesthesiam/rhasspy-server:latest synesthesiam/rhasspy-server:armhf --os linux --arch arm
docker manifest annotate synesthesiam/rhasspy-server:latest synesthesiam/rhasspy-server:aarch64 --os linux --arch arm64
docker manifest push synesthesiam/rhasspy-server:latest
# -----------------------------------------------------------------------------
# Yarn (Vue)
# -----------------------------------------------------------------------------
web-dist:
yarn build
mkdir -p download
rm -f download/rhasspy-web-dist.tar.gz
tar -czf download/rhasspy-web-dist.tar.gz dist/
# -----------------------------------------------------------------------------
# Documentation
# -----------------------------------------------------------------------------
DOCS_UML_FILES := $(wildcard docs/img/*.uml.txt)
DOCS_PNG_FILES := $(patsubst %.uml.txt,%.png,$(DOCS_UML_FILES))
%.png: %.uml.txt
plantuml -p -tsvg < $< | inkscape --export-dpi=300 --export-png=$@ /dev/stdin
docs-uml: $(DOCS_PNG_FILES)
# -----------------------------------------------------------------------------
# Grapheme-to-Phoneme
# -----------------------------------------------------------------------------
G2P_LANGUAGES := de en es fr it nl ru
G2P_MODELS := $(foreach lang,$(G2P_LANGUAGES),profiles/$(lang)/g2p.fst)
g2p: $(G2P_MODELS)
%/g2p.fst: %/base_dictionary.txt
./make-g2p.sh $< $@
# -----------------------------------------------------------------------------
# Testing
# -----------------------------------------------------------------------------
mypy:
mypy app.py rhasspy
check:
flake8 --exclude=lexconvert.py app.py test.py rhasspy/*.py
pylint --ignore=lexconvert.py app.py test.py rhasspy/*.py