-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompile.sh
83 lines (75 loc) · 5.39 KB
/
compile.sh
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
#!/bin/sh
find . -name "*.pyc" -type f -delete
echo "compile_ae"
/nz/export/ae/utilities/bin/compile_ae --db $1 --language python \
--version 3 --template deploy "./put_ht.py"
echo "copy whole current project"
export AE_PATH="/nz/export/ae/applications/$1/admin"
if [ ! -d $AE_PATH ]; then
echo "DB doesn't exists"
exit
fi
rm -rf . $AE_PATH
echo $AE_PATH
yes | cp -rf . $AE_PATH
echo "register_ae"
# każda rejestracja ustawia zmienną środowiskową PUT_FUNC_NAME, która reprezentuje odpowiednią funkcję w klasie PutHT
#predykcja
/nz/export/ae/utilities/bin/register_ae --db $1 --language python --version 3 \
--template hudtf --exe "./put_ht.py" --sig "PUT_HT_PREDICT_SEQ(VARARGS)" \
--return "TABLE(predicted_class VARCHAR(1024))" \
--level 2 \
--noparallel \
--environment "'NZAE_LOG_DIR'='/nz/export/ae/log'" \
--environment "'PUT_FUNC_NAME'='PUT_HT_PREDICT_SEQ'" \
--environment "'NZAE_REGISTER_NZAE_HOST_ONLY_NZAE_PREPEND_LD_LIBRARY_PATH'='/nz/export/ae/applications/mypython/shared:/nz/export/ae/sysroot/spu/generic/x86_64-generic-linux-gnu/lib/:/nz/export/ae/languages/python/2.6/host/lib'" \
--environment "'NZAE_REGISTER_NZAE_SPU_ONLY_NZAE_PREPEND_LD_LIBRARY_PATH'='/nz/export/ae/applications/mypython/shared:/nz/export/ae/sysroot/spu/generic/x86_64-generic-linux-gnu/lib/:/nz/export/ae/languages/python/2.6/spu/lib'"
#predykcja równoległa
/nz/export/ae/utilities/bin/register_ae --db $1 --language python --version 3 \
--template udf --exe "./put_ht.py" --sig "PUT_HT_PREDICT_S(VARARGS)" \
--return "VARCHAR(1024)" \
--level 2 \
--environment "'NZAE_LOG_DIR'='/nz/export/ae/log'" \
--environment "'PUT_FUNC_NAME'='PUT_HT_PREDICT'" \
--environment "'NZAE_REGISTER_NZAE_HOST_ONLY_NZAE_PREPEND_LD_LIBRARY_PATH'='/nz/export/ae/applications/mypython/shared:/nz/export/ae/sysroot/spu/generic/x86_64-generic-linux-gnu/lib/:/nz/export/ae/languages/python/2.6/host/lib'" \
--environment "'NZAE_REGISTER_NZAE_SPU_ONLY_NZAE_PREPEND_LD_LIBRARY_PATH'='/nz/export/ae/applications/mypython/shared:/nz/export/ae/sysroot/spu/generic/x86_64-generic-linux-gnu/lib/:/nz/export/ae/languages/python/2.6/spu/lib'"
#predykcja równoległa
/nz/export/ae/utilities/bin/register_ae --db $1 --language python --version 3 \
--template hudtf --exe "./put_ht.py" --sig "PUT_HT_PREDICT(VARARGS)" \
--return "TABLE(predicted_class VARCHAR(1024))" \
--level 2 \
--environment "'NZAE_LOG_DIR'='/nz/export/ae/log'" \
--environment "'PUT_FUNC_NAME'='PUT_HT_PREDICT'" \
--environment "'NZAE_REGISTER_NZAE_HOST_ONLY_NZAE_PREPEND_LD_LIBRARY_PATH'='/nz/export/ae/applications/mypython/shared:/nz/export/ae/sysroot/spu/generic/x86_64-generic-linux-gnu/lib/:/nz/export/ae/languages/python/2.6/host/lib'" \
--environment "'NZAE_REGISTER_NZAE_SPU_ONLY_NZAE_PREPEND_LD_LIBRARY_PATH'='/nz/export/ae/applications/mypython/shared:/nz/export/ae/sysroot/spu/generic/x86_64-generic-linux-gnu/lib/:/nz/export/ae/languages/python/2.6/spu/lib'"
#próbkowanie
/nz/export/ae/utilities/bin/register_ae --db $1 --language python --version 3 \
--template hudtf --exe "./put_ht.py" --sig "PUT_HT_CREATE_AND_PROBE(VARARGS)" \
--return "TABLE(debug VARCHAR(1024))" \
--level 2 \
--noparallel \
--environment "'NZAE_LOG_DIR'='/nz/export/ae/log'" \
--environment "'PUT_FUNC_NAME'='PUT_HT_CREATE_AND_PROBE'" \
--environment "'NZAE_REGISTER_NZAE_HOST_ONLY_NZAE_PREPEND_LD_LIBRARY_PATH'='/nz/export/ae/applications/mypython/shared:/nz/export/ae/sysroot/spu/generic/x86_64-generic-linux-gnu/lib/:/nz/export/ae/languages/python/2.6/host/lib'" \
--environment "'NZAE_REGISTER_NZAE_SPU_ONLY_NZAE_PREPEND_LD_LIBRARY_PATH'='/nz/export/ae/applications/mypython/shared:/nz/export/ae/sysroot/spu/generic/x86_64-generic-linux-gnu/lib/:/nz/export/ae/languages/python/2.6/spu/lib'"
#trenowanie
/nz/export/ae/utilities/bin/register_ae --db $1 --language python --version 3 \
--template hudtf --exe "./put_ht.py" --sig "PUT_HT_TRAIN(VARARGS)" \
--return "TABLE(debug VARCHAR(1024))" \
--level 2 \
--noparallel \
--environment "'NZAE_LOG_DIR'='/nz/export/ae/log'" \
--environment "'PUT_FUNC_NAME'='PUT_HT_TRAIN'" \
--environment "'NZAE_REGISTER_NZAE_HOST_ONLY_NZAE_PREPEND_LD_LIBRARY_PATH'='/nz/export/ae/applications/mypython/shared:/nz/export/ae/sysroot/spu/generic/x86_64-generic-linux-gnu/lib/:/nz/export/ae/languages/python/2.6/host/lib'" \
--environment "'NZAE_REGISTER_NZAE_SPU_ONLY_NZAE_PREPEND_LD_LIBRARY_PATH'='/nz/export/ae/applications/mypython/shared:/nz/export/ae/sysroot/spu/generic/x86_64-generic-linux-gnu/lib/:/nz/export/ae/languages/python/2.6/spu/lib'"
#czyszczenie klasyfikatora
/nz/export/ae/utilities/bin/register_ae --db $1 --language python --version 3 \
--template hudtf --exe "./put_ht.py" --sig "PUT_HT_CLEAN(BOOL)" \
--return "TABLE(state VARCHAR(1024))" \
--level 2 \
--noparallel \
--environment "'NZAE_LOG_DIR'='/nz/export/ae/log'" \
--environment "'PUT_FUNC_NAME'='PUT_HT_CLEAN'" \
--environment "'NZAE_REGISTER_NZAE_HOST_ONLY_NZAE_PREPEND_LD_LIBRARY_PATH'='/nz/export/ae/applications/mypython/shared:/nz/export/ae/sysroot/spu/generic/x86_64-generic-linux-gnu/lib/:/nz/export/ae/languages/python/2.6/host/lib'" \
--environment "'NZAE_REGISTER_NZAE_SPU_ONLY_NZAE_PREPEND_LD_LIBRARY_PATH'='/nz/export/ae/applications/mypython/shared:/nz/export/ae/sysroot/spu/generic/x86_64-generic-linux-gnu/lib/:/nz/export/ae/languages/python/2.6/spu/lib'"
echo "end"