提交 c2eb4535 编写于 作者: Q qjing666

add k8s deployment solution

上级 fae361e0
......@@ -60,9 +60,11 @@ Please reference [Quick Start](https://paddlefl.readthedocs.io/en/latest/instruc
## Easy deployment with kubernetes
```sh
kubectl apply -f ./paddle_fl/examples/k8s_deployment/master.yaml
```
Please refer [K8S deployment example](./paddle_fl/examples/k8s_deployment/README.md) for details
## Benchmark task
Gru4Rec [9] introduces recurrent neural network model in session-based recommendation. PaddlePaddle's Gru4Rec implementation is in https://github.com/PaddlePaddle/models/tree/develop/PaddleRec/gru4rec. An example is given in [Gru4Rec in Federated Learning](https://paddlefl.readthedocs.io/en/latest/examples/gru4rec_examples.html)
......
......@@ -55,14 +55,14 @@ PaddleFL是一个基于PaddlePaddle的开源联邦学习框架。研究人员可
请参考[快速开始](https://paddlefl.readthedocs.io/en/latest/instruction.html)
## K8S 一键部署
## Kubernetes简单部署
```sh
kubectl apply -f ./paddle_fl/examples/k8s_deployment/master.yaml
```
请参考[K8S 部署实例](./paddle_fl/examples/k8s_deployment/README.md)
## 性能测试
Gru4Rec [9] 在基于会话的推荐中引入了递归神经网络模型。PaddlePaddle的GRU4RC实现代码在 https://github.com/PaddlePaddle/models/tree/develop/PaddleRec/gru4rec. 一个基于联邦学习训练Gru4Rec模型的示例请参考[Gru4Rec in Federated Learning](https://paddlefl.readthedocs.io/en/latest/examples/gru4rec_examples.html)
......
# 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 0
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册