Skip to content

Commit

Permalink
Merge pull request #3470 from FederatedAI/develop-1.7
Browse files Browse the repository at this point in the history
Improve build and standalone deploy docs
  • Loading branch information
dylan-fan authored Nov 24, 2021
2 parents 1af3f67 + 5700497 commit 12c2595
Show file tree
Hide file tree
Showing 15 changed files with 263 additions and 243 deletions.
53 changes: 53 additions & 0 deletions build/common/get_source_code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Get the source code

## 1. Setting Temporary Environment Variables

Set temporary environment variables (note that the environment variables set in the following way are only valid for the current terminal session, if you open a new terminal session, such as a new login or a new window, please set them again)

```bash
export branch={branch name, or using v and version number if you are using a release branch, e.g. v1.7.0}
export version={FATE version number, e.g. 1.7.0}
export version_tag={FATE version tag, e.g. rc1/rc2/release}
```
Example:
```bash
export branch=v1.7.0
export version=1.7.0
export version_tag=release
```
```bash
export branch=develop-1.7
export version=1.7.0
export version_tag=release
```
## 2. Get the code from Github
```bash
git clone https:/FederatedAI/FATE.git -b ${branch} --recurse-submodules --depth=1
```
The **depth** parameter indicates that only the latest committed code is fetched, which can speed up cloning.
## 3. Get code from Gitee (try Gitee when you can't connect to Github to get code)
When you can't connect to Github to get your code, try Gitee.
Please note that with Gitee you can only update code, not push code or post issues, use Github.
```bash
git clone https://gitee.com/FederatedAI/FATE.git -b ${branch} --depth=1;
cd FATE;
bash build/common/update_submodule_from_gitee.sh
```
## 4. Update the code
```bash
cd FATE
git pull
git submodule update --remote
```
53 changes: 53 additions & 0 deletions build/common/get_source_code.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 获取源代码

## 1. 设置临时环境变量

设置临时环境变量(注意, 通过以下方式设置的环境变量仅在当前终端会话有效, 若打开新的终端会话, 如重新登录或者新窗口, 请重新设置)

```bash
export branch={分支名称, 若使用某个发布版本分支, 则为`v版本号`, 如`v1.7.0`}
export version={FATE版本号, 如1.7.0}
export version_tag={FATE版本标签, 如rc1/rc2/release}
```

样例:

```bash
export branch=v1.7.0
export version=1.7.0
export version_tag=release
```

```bash
export branch=develop-1.7
export version=1.7.0
export version_tag=release
```

## 2. 从Github获取代码

```bash
git clone https:/FederatedAI/FATE.git -b ${branch} --recurse-submodules --depth=1
```

**depth**参数表示只获取最新提交的代码,这可以加快克隆的速度。

## 3. 从Gitee获取代码(当你无法连接到Github获取代码时,可以试试Gitee)

当你无法连接到Github获取代码时,可以尝试Gitee。

请注意,使用Gitee只能更新代码,而不能推送代码、发布问题,请使用Github。

```bash
git clone https://gitee.com/FederatedAI/FATE.git -b ${branch} --depth=1;
cd FATE;
bash build/common/update_submodule_from_gitee.sh
```

## 4. 更新代码

```bash
cd FATE
git pull
git submodule update --remote
```
27 changes: 0 additions & 27 deletions build/common/how_to_use_gitee.md

This file was deleted.

27 changes: 0 additions & 27 deletions build/common/how_to_use_gitee.zh.md

This file was deleted.

17 changes: 3 additions & 14 deletions build/package-build/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,12 @@

## 2. Get the source code

### 2.1 Get code from Github

```bash
git clone https:/FederatedAI/FATE.git -b $branch --recurse-submodules --depth=1
```

Please set the **branch** parameter, if you use a release branch, then **branch** is v`version number`, e.g. `v1.7.0`
The **depth** parameter represents the code that only gets the latest commit, which can speed up the clone.

### 2.2 Get code from Gitee(Try Gitee when you can't connect to Github for code)

Please reference [how_to_use_gitee](../common/how_to_use_gitee.md)
Please refer to [get source code](../common/get_source_code.md)

## 3. Build

```bash
cd FATE
cd FATE;
bash build/package-build/build.sh ${version_tag} all
```

Expand All @@ -43,7 +32,7 @@ ls -l FATE_install_${version}_${version_tag}.tar.gz
## 5. Check packages

```bash
tar xzf FATE_install_${version}_${version_tag}.tar.gz
tar xzf FATE_install_${version}_${version_tag}.tar.gz;
ls -lrt FATE_install_${version}_${version_tag}
```

Expand Down
19 changes: 4 additions & 15 deletions build/package-build/build.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,12 @@

## 2. 获取源代码

### 2.1 从Github获取代码

```bash
git clone https:/FederatedAI/FATE.git -b $branch --recurse-submodules --depth=1
```

请设置**branch**参数, 若使用某个发布版本分支, 则**branch**`v版本号`, 如`v1.7.0`
**depth**参数表示只获取最新提交的代码,这可以加快克隆的速度。

### 2.2 从Gitee获取代码(当你无法连接到Github获取代码时,可以试试Gitee)

请参考[how_to_use_gitee](../common/how_to_use_gitee.zh.md)
请参考[获取源代码](../common/get_source_code.zh.md)

## 3. 构建

```bash
cd FATE
cd FATE;
bash build/package-build/build.sh ${version_tag} all
```

Expand All @@ -43,8 +32,8 @@ ls -l FATE_install_${version}_${version_tag}.tar.gz
## 5. 检查软件包

```bash
tar xzf FATE_install_${version}_${version_tag}.tar.gz
ls -lrt FATE_install_${version}_${version_tag}
tar xzf FATE_install_${version}_${version_tag}.tar.gz;
ls -lrt FATE_install_${version}_${version_tag}
```

你可以看到下面的软件包。
Expand Down
15 changes: 2 additions & 13 deletions build/standalone-docker-build/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,12 @@

## 2. Get the source code

### 2.1 Get code from Github

```bash
git clone https:/FederatedAI/FATE.git -b $branch --recurse-submodules --depth=1
```

Please set the **branch** parameter, if you use a release branch, then **branch** is v`version number`, e.g. `v1.7.0`
The **depth** parameter represents the code that only gets the latest commit, which can speed up the clone.

### 2.2 Get code from Gitee(Try Gitee when you can't connect to Github for code)

Please reference [how_to_use_gitee](../common/how_to_use_gitee.md)
Please refer to [get source code](../common/get_source_code.md)

## 3. Build

```bash
cd FATE
cd FATE;
bash build/standalone-docker-build/build.sh ${version_tag}
```

Expand Down
15 changes: 2 additions & 13 deletions build/standalone-docker-build/build.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,12 @@

## 2. 获取源代码

### 2.1 从Github获取代码

```bash
git clone https:/FederatedAI/FATE.git -b $branch --recurse-submodules --depth=1
```

请设置**branch**参数, 若使用某个发布版本分支, 则**branch**`v版本号`, 如`v1.7.0`
**depth**参数表示只获取最新提交的代码,这可以加快克隆的速度。

### 2.2 从Gitee获取代码(当你无法连接到Github获取代码时,可以试试Gitee)

请参考[how_to_use_gitee](../common/how_to_use_gitee.zh.md)
请参考[获取源代码](../common/get_source_code.zh.md)

## 3. 构建

```bash
cd FATE
cd FATE;
bash build/standalon-docker-build/build.sh ${version_tag}
```

Expand Down
17 changes: 3 additions & 14 deletions build/standalone-install-build/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,12 @@

## 2. Get the source code

### 2.1 Get code from Github

```bash
git clone https:/FederatedAI/FATE.git -b $branch --recurse-submodules --depth=1
```

Please set the **branch** parameter, if you use a release branch, then **branch** is v`version number`, e.g. `v1.7.0`
The **depth** parameter represents the code that only gets the latest commit, which can speed up the clone.

### 2.2 Get code from Gitee(Try Gitee when you can't connect to Github for code)

Please reference [how_to_use_gitee](../common/how_to_use_gitee.md)
Please refer to [get source code](../common/get_source_code.md)

## 3. Build

```bash
cd FATE
cd FATE;
bash build/package-build/build.sh ${version_tag}
```

Expand All @@ -44,7 +33,7 @@ ls -l standalone_fate_install_${version}_${version_tag}.tar.gz
## 5. Check packages

```bash
tar xzf standalone_fate_install_${version}_${version_tag}.tar.gz
tar xzf standalone_fate_install_${version}_${version_tag}.tar.gz;
ls -lrt standalone_fate_install_${version}_${version_tag}
```

Expand Down
17 changes: 3 additions & 14 deletions build/standalone-install-build/build.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,12 @@

## 2. 获取源代码

### 2.1 从Github获取代码

```bash
git clone https:/FederatedAI/FATE.git -b $branch --recurse-submodules --depth=1
```

请设置**branch**参数, 若使用某个发布版本分支, 则**branch**`v版本号`, 如`v1.7.0`
**depth**参数表示只获取最新提交的代码,这可以加快克隆的速度

### 2.2 从Gitee获取代码(当你无法连接到Github获取代码时,可以试试Gitee)

请参考[how_to_use_gitee](../common/how_to_use_gitee.zh.md)
请参考[获取源代码](../common/get_source_code.zh.md)

## 3. 构建

```bash
cd FATE
cd FATE;
bash build/package-build/build.sh ${version_tag}
```

Expand All @@ -41,7 +30,7 @@ ls -l standalone_fate_install_${version}_${version_tag}.tar.gz
## 5. 检查软件包

```bash
tar xzf standalone_fate_install_${version}_${version_tag}.tar.gz
tar xzf standalone_fate_install_${version}_${version_tag}.tar.gz;
ls -lrt standalone_fate_install_${version}_${version_tag}
```

Expand Down
Loading

0 comments on commit 12c2595

Please sign in to comment.