forked from browsermt/bergamot-translator-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (29 loc) · 946 Bytes
/
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
THREADS=16
GIT_MOSES_SCRIPTS=http://github.com/marian-nmt/moses-scripts.git
GIT_SUBWORD_NMT=http://github.com/rsennrich/subword-nmt.git
GIT_CPU_FEATURES=https://github.com/google/cpu_features.git
# Empty value means that all data and models will be downloaded
TARBALLS=
.PHONY: install pip tools models data run
.SECONDARY:
#####################################################################
run: install
bash ./run_brt.sh
install: tools models data
tools: pip
mkdir -p $@
git -C $@/moses-scripts pull || git clone $(GIT_MOSES_SCRIPTS) $@/moses-scripts
git -C $@/subword-nmt pull || git clone $(GIT_SUBWORD_NMT) $@/subword-nmt
pip: requirements.txt
python3 -m pip install --user -r $<
models:
mkdir -p $@
cd $@ && bash ./download-models.sh # $(TARBALLS)
data:
mkdir -p $@
cd $@ && bash ./download-data.sh # $(TARBALLS)
clean:
git clean -x -d -f tests
rm -f data/*.tar.gz models/*.tar.gz
clean-all:
git clean -x -d -f