Skip to content

Commit

Permalink
update standalone fate source code deployment doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jarviszeng-zjc committed Nov 19, 2021
1 parent 199cc46 commit 3c7ac3b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,27 @@ Please install or use existing Python version 3.6 or 3.7, preferably 3.6.5, whic
### 4.2 Configuring a virtual environment for FATE

```bash
cd(or create) {root directory for the virtual environment}
virtualenv {name of virtual environment}
source {virtual environment name}/bin/activate
virtualenv --version
```

Call the virtual environment directory `FATE_VENV_BASE`, which is {root directory where the virtual environment is placed}/{virtual environment name}, as used in the following document
If you don't have the `virtualenv` command, please install it yourself, but in most cases you can use a similar command
If the version information is returned normally, then the virtual environment tool is installed, if the command does not exist, please install it yourself, in most cases you can use a similar command to install

```bash
pip install virtualenv
```

```bash
cd(or create) {root directory for the virtual environment}
virtualenv {name of virtual environment}
export FATE_VENV_BASE={root directory for the virtual environment}/{name of virtual environment}
source ${FATE_VENV_BASE}/bin/activate
```

### 4.3 Installing Python dependencies for FATE

```bash
cd ${FATE_PROJECT_BASE}
sh bin/install_os_dependencies.sh
source ${FATE_VENV_BASE}/bin/activate
pip install -r python/requirements.txt
```
Expand All @@ -76,14 +81,8 @@ Edit the `bin/init_env.sh` environment variable file

```bash
cd ${FATE_PROJECT_BASE}
sed -i.bak "s#PYTHONPATH=. *#PYTHONPATH=$PWD/python:$PWD/fateflow/python#g" . /bin/init_env.sh
```

Modify the following environment variables at the same time

```bash
vim bin/init_env.sh
venv=${FATE_VENV_BASE}
sed -i.bak "s#PYTHONPATH=. *#PYTHONPATH=$PWD/python:$PWD/fateflow/python#g" ./bin/init_env.sh
sed -i.bak "s#venv=.*#venv=${FATE_VENV_BASE}#g" ./bin/init_env.sh
```

Check if the `conf/service_conf.yaml` global configuration file has the base engine configured as standalone, if `default_engines` shows the following, then it is standalone
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,27 @@ git clone https://github.com/FederatedAI/FATE.git -b $branch --recurse-submodule
### 4.2 为FATE配置虚拟环境

```bash
cd(or create) {放置虚拟环境的根目录}
virtualenv {虚拟环境名称}
source {虚拟环境名称}/bin/activate
virtualenv --version
```

将虚拟环境目录称之为`FATE_VENV_BASE`, 其为{放置虚拟环境的根目录}/{虚拟环境名称}, 如下文档中将用到
如果没有`virtualenv`命令,请自行安装,大多情况下可以使用类似命令安装
若能正常返回版本信息, 则虚拟环境工具已安装, 若提示命令不存在, 请自行安装,大多情况下可以使用类似命令安装

```bash
pip install virtualenv
```

```bash
cd(or create) {放置虚拟环境的根目录}
virtualenv {虚拟环境名称}
export FATE_VENV_BASE={放置虚拟环境的根目录}/{虚拟环境名称}
source ${FATE_VENV_BASE}/bin/activate
```

### 4.3 安装FATE所需要的Python依赖包

```bash
cd ${FATE_PROJECT_BASE}
sh bin/install_os_dependencies.sh
source ${FATE_VENV_BASE}/bin/activate
pip install -r python/requirements.txt
```
Expand All @@ -79,13 +84,7 @@ pip install -r python/requirements.txt
```bash
cd ${FATE_PROJECT_BASE}
sed -i.bak "s#PYTHONPATH=.*#PYTHONPATH=$PWD/python:$PWD/fateflow/python#g" ./bin/init_env.sh
```

同时修改如下环境变量

```bash
vim bin/init_env.sh
venv=${FATE_VENV_BASE}
sed -i.bak "s#venv=.*#venv=${FATE_VENV_BASE}#g" ./bin/init_env.sh
```

检查`conf/service_conf.yaml`全局配置文件中是否将基础引擎配置为单机版, 若`default_engines`显示如下,则为单机版
Expand Down

0 comments on commit 3c7ac3b

Please sign in to comment.