Skip to content

Commit be2e0aa

Browse files
committed
Docker files updated
1 parent 302cd52 commit be2e0aa

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

Makefile

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ update:
1111
docker-compose down
1212
docker build -t pytorch_fl .
1313
docker-compose up -d
14-
prepare:
15-
touch logs/client_8003.log
16-
touch logs/client_8004.log
17-
touch logs/main_server.log
18-
touch logs/secure_aggregator.log
14+
15+
del_logs:
16+
tar -czvf logs_bak.tar.gz logs/*.log
17+
rm logs/*.log

docker-compose.yml

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ services:
2222
- PORT=8001
2323
volumes:
2424
- ./logs:/code/logs:rw
25+
- ./data/classification:/code/data/classification:rw
2526
depends_on:
2627
- main_server
2728

@@ -36,6 +37,7 @@ services:
3637
- N_CLIENT=0
3738
volumes:
3839
- ./logs:/code/logs:rw
40+
- ./data/classification:/code/data/classification:rw
3941
depends_on:
4042
- secure_aggregator
4143

@@ -50,6 +52,7 @@ services:
5052
- N_CLIENT=1
5153
volumes:
5254
- ./logs:/code/logs:rw
55+
- ./data/classification:/code/data/classification:rw
5356
depends_on:
5457
- secure_aggregator
5558

docker-entrypoint.sh

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
if [ "$TYPE" = "CLIENT" ]; then
44
echo "Starting client"
5-
echo /code/logs/client_$PORT.log
6-
python client/app.py -p $PORT -n $N_CLIENT &> /code/logs/client_$PORT.log
5+
python client/app.py -p $PORT -n $N_CLIENT
76
elif [[ "$TYPE" = "MAIN_SERVER" ]]; then
87
echo "Starting main server"
9-
python main_server/app.py -p $PORT &> /code/logs/main_server.log
8+
python main_server/app.py -p $PORT
109
elif [[ "$TYPE" = "SECURE_AGGREGATOR" ]]; then
1110
echo "Starting secure aggregator"
12-
python secure_aggregator/app.py -p $PORT &> /code/logs/secure_aggregator.log
11+
python secure_aggregator/app.py -p $PORT
1312
else
1413
echo "Type not recognized"
1514
fi

0 commit comments

Comments
 (0)