blob: 6939f3de5ec27c61a774a57f5c5eac37cfeb2573 (
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
|
THREADS=16
GIT_MARIAN_DEV=http://github.com/marian-nmt/marian-dev.git
GIT_MARIAN=http://github.com/marian-nmt/marian.git
GIT_MOSES_SCRIPTS=http://github.com/marian-nmt/moses-scripts.git
GIT_SUBWORD_NMT=http://github.com/rsennrich/subword-nmt.git
BRANCH=master
EXTRA_FLAGS=
CMAKE_FLAGS=-DUSE_CUDNN=off -DCOMPILE_EXAMPLES=on -DCMAKE_BUILD_TYPE=Release $(EXTRA_FLAGS)
PIP_PACKAGES=websocket-client pyyaml
.PHONY: marian install tools models data run tools/marian
.SECONDARY:
#####################################################################
run: install marian
bash ./run_mrt.sh
install: tools models data
tools:
git -C $@/moses-scripts pull || git clone $(GIT_MOSES_SCRIPTS) $@/moses-scripts
git -C $@/subword-nmt pull || git clone $(GIT_SUBWORD_NMT) $@/subword-nmt
pip3 install --user $(PIP_PACKAGES)
pip install --user $(PIP_PACKAGES)
models:
mkdir -p $@
cd $@ && bash ./download-wmt16.sh
cd $@ && bash ./download-wmt17.sh
cd $@ && bash ./download-char-s2s.sh
cd $@ && bash ./download-wnmt18.sh
cd $@ && bash ./download-transformer.sh
data:
mkdir -p $@
cd $@ && bash ./download-data.sh
marian: tools/marian
tools/marian:
git -C $@ pull || git clone $(GIT_MARIAN_DEV) -b $(BRANCH) $@
rm -rf $@/build
mkdir -p $@/build && cd $@/build && cmake .. $(CMAKE_FLAGS) && make -j$(THREADS)
clean:
git clean -x -d -f tests
clean-all:
git clean -x -d -f
|