-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from qjing666/master
add k8s deployment
- Loading branch information
Showing
3 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# PaddleFL deployment example with Kubernetes | ||
|
||
## compile time | ||
|
||
#### Master | ||
|
||
```sh | ||
|
||
#Define distributed training config for trainer and server | ||
python fl_master.py --trainer_num 2 | ||
tar -zcvf fl_job_config.tar.gz fl_job_config | ||
|
||
#Start HTTP server and wait download request from trainer and server | ||
python -m SimpleHTTPServer 8000 | ||
|
||
``` | ||
|
||
## Run time | ||
|
||
#### Scheduler | ||
```sh | ||
|
||
#Start a Scheduler | ||
python fl_scheduler.py --trainer_num 2 | ||
|
||
``` | ||
|
||
#### Server | ||
```sh | ||
|
||
#Download job config file from master | ||
wget ${FL_MASTER_SERVICE_HOST}:${FL_MASTER_SERVICE_PORT_FL_MASTER}/fl_job_config.tar.gz | ||
tar -xf fl_job_config.tar.gz | ||
|
||
#Start a Server | ||
python -u fl_server.py > server.log 2>&1 | ||
|
||
``` | ||
|
||
###Trainer | ||
```sh | ||
|
||
#Download job config file from master | ||
wget ${FL_MASTER_SERVICE_HOST}:${FL_MASTER_SERVICE_PORT_FL_MASTER}/fl_job_config.tar.gz | ||
tar -xf fl_job_config.tar.gz | ||
|
||
#Start the ith trainer | ||
python -u fl_trainer.py i | ||
|
||
``` |