-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathbuild_zip.sh
34 lines (34 loc) · 1.05 KB
/
build_zip.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
mkdir temp
cd temp
cp -R ../src src
cp -R ../models models
cp -R ../scripts scripts
cp -R ../thirdparty thirdparty
cp -R ../configs configs
cp -R ../test test
cp -R ../libtorch libtorch
rm -rf thirdparty/fasttext/.git
rm -rf thirdparty/eigen/.git
rm -rf thirdparty/drogon/.git
rm -rf thirdparty/onmt_tokenizer/.git
rm -rf thirdparty/rocksdb/.git
cp ../LICENSE LICENSE
cp ../NOTICE NOTICE
cp ../README.md README.md
cp ../CMakeLists.txt CMakeLists.txt
cp ../download_data.sh download_data.sh
cp ../download_models.sh download_models.sh
cp ../test_canonical.sh test_canonical.sh
cp ../deb-packages.txt deb-packages.txt
cp ../build_zip.sh build_zip.sh
cp ../tgnews.sh tgnews
mkdir build
cd build
Torch_DIR="../libtorch" cmake -DCMAKE_BUILD_TYPE=Release ..
make -j4
cd ..
chmod +x build/tgnews
chmod +x tgnews
zip -r submission.zip src scripts models thirdparty configs test libtorch LICENSE NOTICE README.md CMakeLists.txt deb-packages.txt tgnews build_zip.sh download_data.sh download_models.sh test_canonical.sh build/tgnews
mv submission.zip ../submission.zip && cd ..
rm -rf temp