forked from FederatedAI/FATE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_standalone_docker.sh
69 lines (51 loc) · 2.21 KB
/
build_standalone_docker.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
#!/usr/bin/env bash
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -x
wget https://webank-ai-1251170195.cos.ap-guangzhou.myqcloud.com/fate.tar.gz
tar -xf fate.tar.gz
rm -rf init.sh requirments.txt requirements.txt
cp ../requirements.txt ./docker/python
#sed -i "s/'user':.*/'user': 'fate_dev',/g" ./fate_flow/settings.py
#sed -i "s/'passwd':.*/'passwd': 'fate_dev',/g" ./fate_flow/settings.py
#sed -i "s/'host':.*/'host': 'mysql',/g" ./fate_flow/settings.py
tar -cf ./docker/python/fate.tar arch federatedml workflow examples fate_flow research
logPath="/var/lib/fate/log"
if [ ! -d "$logPath" ]; then
mkdir -p "$logPath"
fi
dataPath="/var/lib/fate/data"
if [ ! -d "$dataPath" ]; then
mkdir -p "$dataPath"
fi
cp -r ./fate_flow/* /var/lib/fate/data
sed -i "s#^fateflow.url=.*#fateflow.url=http://python:9380#g" ./fateboard/conf/application.properties
sed -i "s#^spring.datasource.url=.*#spring.datasource.url=jdbc:sqlite:/fate/fate_flow/fate_flow_sqlite.db#g" ./fateboard/conf/application.properties
#sed -i "s/^spring.datasource.username=.*/spring.datasource.username=fate_dev/g" ./fateboard/conf/application.properties
#sed -i "s/^spring.datasource.password=.*/spring.datasource.password=fate_dev/g" ./fateboard/conf/application.properties
cd fateboard
ln -s fateboard-1.0.jar fateboard.jar
cd ..
tar -cf ./docker/fateboard/fateboard.tar fateboard
docker-compose -f ./docker/docker-compose-build.yml up -d
#sleep 15
docker restart fate_python
sleep 5
docker restart fate_fateboard
rm -rf examples workflow arch federatedml fateboard fate_flow research fate.tar.gz data
rm docker/python/fate.tar
rm docker/python/requirements.txt
rm docker/fateboard/fateboard.tar