This repository has been archived by the owner on Aug 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 101
/
Makefile
executable file
·59 lines (43 loc) · 1.83 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
.PHONY: web-dist docker manifest docs-uml g2p check
SHELL := bash
DOCKER_PLATFORMS = linux/amd64,linux/arm64,linux/arm/v7
all: docker
# -----------------------------------------------------------------------------
# Docker
# -----------------------------------------------------------------------------
docker: web-dist
docker buildx build . \
--platform $(DOCKER_PLATFORMS) \
--tag synesthesiam/rhasspy-server:latest \
--push
# -----------------------------------------------------------------------------
# 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
# -----------------------------------------------------------------------------
check:
flake8 --exclude=lexconvert.py app.py test.py rhasspy/*.py
pylint --ignore=lexconvert.py app.py test.py rhasspy/*.py
mypy app.py test.py rhasspy/*.py