Skip to content

Commit 435d124

Browse files
authored
fix docker file (#114)
* fix docker file * fix ci * add docker ci * update change log
1 parent af06ae8 commit 435d124

File tree

19 files changed

+382
-91
lines changed

19 files changed

+382
-91
lines changed

.github/workflows/cpp_full_node_workflow.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,25 @@ jobs:
6969
export CXX='g++-10'
7070
sudo bash -x cpp/tools/install_depends.sh -o ubuntu
7171
mkdir -p cpp/build && cd cpp/build && cmake -DBUILD_STATIC=ON -DTESTS=ON -DCOVERAGE=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../
72+
echo "Disk usage before delete files: "`df -lh`
73+
du -sch ${{ env.VCPKG_ROOT }}/buildtrees/*
74+
du -sch ${{ env.VCPKG_ROOT }}/buildtrees/grpc/src/*
75+
rm -rf ${{ env.VCPKG_ROOT }}/buildtrees/grpc/src
76+
rm -rf ${{ env.VCPKG_ROOT }}/buildtrees/grpc/*-dbg
77+
rm -rf ${{ env.VCPKG_ROOT }}/buildtrees/krb5/src
78+
rm -rf ${{ env.VCPKG_ROOT }}/buildtrees/gsasl/src
79+
rm -rf ${{ env.VCPKG_ROOT }}/buildtrees/protobuf/src
80+
rm -rf ${{ env.VCPKG_ROOT }}/buildtrees/wedprcrypto/src
81+
rm -rf ${{ env.VCPKG_ROOT }}buildtrees/openssl/src
82+
rm -rf ${{ env.VCPKG_ROOT }}/buildtrees/*/*-dbg
83+
echo "Disk usage after delete files: "`df -lh`
7284
make -j3
7385
- name: Build for macOS
7486
if: runner.os == 'macOS'
7587
run: |
7688
bash -x cpp/tools/install_depends.sh -o macos
77-
rm -rf /Users/runner/work/WeDPR-Component/WeDPR-Component/vcpkg/buildtrees/gsasl
78-
mkdir -p cpp/build && cd cpp/build && cmake -DBUILD_STATIC=ON -DTESTS=ON -DCOVERAGE=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../
89+
mkdir -p cpp/build && cd cpp/build
90+
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) && cmake -DBUILD_STATIC=ON -DTESTS=ON -DCOVERAGE=ON -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ../
7991
make -j3
8092
- name: Publish Error
8193
if: always()
@@ -108,7 +120,13 @@ jobs:
108120
with:
109121
name: build-x64-linux-dbg-err.log
110122
path: /home/runner/work/WeDPR-Component/WeDPR-Component/vcpkg/buildtrees/gsasl/build-x64-linux-dbg-err.log
111-
123+
- name: Publish Error macos
124+
if: always()
125+
uses: actions/upload-artifact@v4
126+
with:
127+
name: build-x64-osx-dbg-err.log
128+
path: /Users/runner/work/WeDPR-Component/WeDPR-Component/vcpkg/buildtrees/gsasl/build-x64-osx-dbg-err.log
129+
112130

113131
build_centos:
114132
name: build_centos full node
@@ -160,7 +178,7 @@ jobs:
160178
yum update -y
161179
yum install -y epel-release centos-release-scl centos-release-scl-rh
162180
yum install -y https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
163-
yum install -y wget java-11-openjdk-devel git make gcc gcc-c++ glibc-static glibc-devel cmake3 ccache devtoolset-11 libzstd-devel zlib-devel flex bison python-devel python3-devel
181+
yum install -y wget java-11-openjdk-devel git autoconf automake make gcc gcc-c++ glibc-static glibc-devel cmake3 ccache devtoolset-11 libzstd-devel zlib-devel flex bison python-devel python3-devel
164182
- uses: actions-rs/toolchain@v1
165183
with:
166184
toolchain: nightly-2022-07-28
@@ -190,7 +208,7 @@ jobs:
190208
rm -rf python
191209
mkdir -p cpp/build
192210
cd cpp/build
193-
cmake3 -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=Release -DTESTS=ON -DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake ../
211+
cmake3 -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=Release -DTESTS=ON ../
194212
- name: FreeDiskSpace
195213
run: |
196214
df -lh
@@ -223,3 +241,9 @@ jobs:
223241
with:
224242
name: ppc-gateway-service-x64
225243
path: ./cpp/build/bin/ppc-gateway-service
244+
- name: Publish Error macos
245+
if: always()
246+
uses: actions/upload-artifact@v4
247+
with:
248+
name: vcpkg-manifest-install.log
249+
path: /__w/WeDPR-Component/WeDPR-Component/cpp/build/vcpkg-manifest-install.log

.github/workflows/docker.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: WeDPR-Component docker ci
2+
on:
3+
push:
4+
paths-ignore:
5+
- "docs/**"
6+
- "Changelog.md"
7+
- "README.md"
8+
tags:
9+
- 'v3.*.*'
10+
pull_request:
11+
paths-ignore:
12+
- "docs/**"
13+
- "python/**"
14+
- "Changelog.md"
15+
- "README.md"
16+
release:
17+
types: [prereleased]
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
21+
cancel-in-progress: true
22+
23+
env:
24+
RUST_BACKTRACE: 1
25+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
26+
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16
27+
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
28+
# Use docker.io for Docker Hub if empty
29+
REGISTRY: ghcr.io
30+
31+
jobs:
32+
build-docker:
33+
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v3
38+
- name: Get branch name
39+
uses: nelonoel/[email protected]
40+
- name: Fetch tag
41+
run: |
42+
git fetch --tags --force
43+
- name: Login to Docker Hub
44+
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
45+
with:
46+
registry: ${{ env.REGISTRY }}
47+
username: ${{ secrets.DOCKER_FISCOPR_USER }}
48+
password: ${{ secrets.DOCKER_FISCOPR_TOKEN }}
49+
- name: Get git tag
50+
uses: little-core-labs/[email protected]
51+
id: tag_data
52+
with:
53+
tagRegex: (.*) # Optional. Returns specified group text as tag name. Full tag string is returned if regex is not defined.
54+
tagRegexGroup: 1 # Optional. Default is 1.
55+
# the model image
56+
- name: Build and Push model images
57+
run: |
58+
[[ ${{github.ref}} == */tags/* ]] && MODEL_DOCKER_TAG="${GIT_TAG_NAME}" || MODEL_DOCKER_TAG="${BRANCH_NAME}"
59+
MODEL_DOCKER_TAG="fiscoorg/wedpr-model-service:${MODEL_DOCKER_TAG}"
60+
echo "* Begin to build model docker: ${MODEL_DOCKER_TAG}"
61+
cd docker-files/model/model
62+
docker build --build-arg SOURCE_BRANCH=${BRANCH_NAME} -t ${MODEL_DOCKER_TAG} .
63+
echo "* Build model docker: ${MODEL_DOCKER_TAG} success"
64+
docker push ${MODEL_DOCKER_TAG}
65+
echo "* Push model docker: ${MODEL_DOCKER_TAG} success"
66+
# the wedpr-gateway-service image
67+
- name: Build and Push wedpr-gateway-service images
68+
run: |
69+
[[ ${{github.ref}} == */tags/* ]] && GW_DOCKER_TAG="${GIT_TAG_NAME}" || GW_DOCKER_TAG="${BRANCH_NAME}"
70+
GW_DOCKER_TAG="fiscoorg/wedpr-gateway-service:${GW_DOCKER_TAG}"
71+
echo "* Begin to build wedpr-gateway-service docker: ${GW_DOCKER_TAG}"
72+
cd docker-files/cpp/
73+
docker build --build-arg SOURCE_BRANCH=${BRANCH_NAME} --target wedpr-gateway-service -t ${GW_DOCKER_TAG} .
74+
echo "* Build wedpr-gateway-service docker: ${GW_DOCKER_TAG} success"
75+
docker push ${GW_DOCKER_TAG}
76+
echo "* Push wedpr-gateway-service docker: ${GW_DOCKER_TAG} success"
77+
# the wedpr-pro-node-service image
78+
- name: Build and Push wedpr-pro-node-service images
79+
run: |
80+
[[ ${{github.ref}} == */tags/* ]] && NODE_DOCKER_TAG="${GIT_TAG_NAME}" || NODE_DOCKER_TAG="${BRANCH_NAME}"
81+
NODE_DOCKER_TAG="fiscoorg/wedpr-pro-node-service:${NODE_DOCKER_TAG}"
82+
echo "* Begin to build wedpr-pro-node-service docker: ${NODE_DOCKER_TAG}"
83+
cd docker-files/cpp/
84+
docker build --build-arg SOURCE_BRANCH=${BRANCH_NAME} --target wedpr-pro-node-service -t ${NODE_DOCKER_TAG} .
85+
echo "* Build wedpr-pro-node-service docker: ${NODE_DOCKER_TAG} success"
86+
docker push ${NODE_DOCKER_TAG}
87+
echo "* Push wedpr-pro-node-service docker: ${NODE_DOCKER_TAG} success"
88+
# the wedpr-mpc-service image
89+
- name: Build and Push wedpr-mpc-service images
90+
run: |
91+
[[ ${{github.ref}} == */tags/* ]] && MPC_DOCKER_TAG="${GIT_TAG_NAME}" || MPC_DOCKER_TAG="${BRANCH_NAME}"
92+
MPC_DOCKER_TAG="fiscoorg/wedpr-mpc-service:${MPC_DOCKER_TAG}"
93+
echo "* Begin to build wedpr-mpc-service docker: ${MPC_DOCKER_TAG}"
94+
cd docker-files/cpp/
95+
docker build --build-arg SOURCE_BRANCH=${BRANCH_NAME} --target wedpr-mpc-service -t ${MPC_DOCKER_TAG} .
96+
echo "* Build wedpr-mpc-service docker: ${MPC_DOCKER_TAG} success"
97+
docker push ${MPC_DOCKER_TAG}
98+
echo "* Push wedpr-mpc-service docker: ${MPC_DOCKER_TAG} success"
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Manual trigger wedpr-model-service-base-image docker image build
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
logLevel:
7+
description: 'Log level'
8+
required: true
9+
default: 'warning'
10+
tags:
11+
description: 'the input tag'
12+
13+
jobs:
14+
manual-build-model-base-docker:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
- name: Get branch name
20+
uses: nelonoel/[email protected]
21+
- name: Fetch tag
22+
run: |
23+
git fetch --tags --force
24+
- name: Login to Docker Hub
25+
uses: docker/login-action@v1
26+
with:
27+
username: ${{ secrets.DOCKER_FISCOPR_USER }}
28+
password: ${{ secrets.DOCKER_FISCOPR_TOKEN }}
29+
30+
# the model image
31+
- name: Build and Push wedpr-model-service-base-image images
32+
run: |
33+
echo "* Manual build wedpr-model-service-base-image image, docker version: ${{ github.event.inputs.tags }}"
34+
DOCKER_TAG="fiscoorg/wedpr-model-service-base-image:${{ github.event.inputs.tags }}"
35+
echo "* Begin to build ${DOCKER_TAG}"
36+
cd docker-files/model/base
37+
docker build -t ${DOCKER_TAG} .
38+
echo "* Build ${DOCKER_TAG} success"
39+
docker push ${DOCKER_TAG}
40+
echo "* Push ${DOCKER_TAG} success"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Manual trigger vcpkg-cache docker image build
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
logLevel:
7+
description: 'Log level'
8+
required: true
9+
default: 'warning'
10+
tags:
11+
description: 'the input tag'
12+
13+
jobs:
14+
manual-build-vcpkg-cache-docker:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
- name: Get branch name
20+
uses: nelonoel/[email protected]
21+
- name: Fetch tag
22+
run: |
23+
git fetch --tags --force
24+
- name: Login to Docker Hub
25+
uses: docker/login-action@v1
26+
with:
27+
username: ${{ secrets.DOCKER_FISCOPR_USER }}
28+
password: ${{ secrets.DOCKER_FISCOPR_TOKEN }}
29+
30+
# the model image
31+
- name: Build and Push wedpr-component-vcpkg-cache images
32+
run: |
33+
echo "* Manual build wedpr-component-vcpkg-cache image, docker version: ${{ github.event.inputs.tags }}"
34+
DOCKER_TAG="fiscoorg/wedpr-component-vcpkg-cache:${{ github.event.inputs.tags }}"
35+
echo "* Begin to build ${DOCKER_TAG}"
36+
cd docker-files/cpp/vcpkg
37+
docker build --build-arg SOURCE_BRANCH=${BRANCH_NAME} -t ${DOCKER_TAG} .
38+
echo "* Build ${DOCKER_TAG} success"
39+
docker push ${DOCKER_TAG}
40+
echo "* Push ${DOCKER_TAG} success"
41+
- name: Publish Error
42+
if: always()
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: autoconf-x64-linux-err.log
46+
path: /WeDPR-Component/cpp/vcpkg/buildtrees/gsasl/autoconf-x64-linux-err.log

ChangeLog.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,37 @@
1-
### 1.0.0-rc1
2-
(2024-08-21)
1+
# 3.0.0
2+
(2024-12-9)
33

4-
**新增**
4+
### 新增
55

6-
#### 隐私计算组件
6+
**隐私计算组件**
77

8-
- **PSI**: 实现多种类型隐私求交集算法,包括CM2020, RA2018, ECDH-PSI, ECDH-Multi-PSI等
9-
- **MPC**: 安全多方计算相关组件
10-
- **MPCSQL**: 基于安全多方计算协议,支持联合分析查询任务
11-
- **PIR**: 匿踪查询组件
8+
- PSI: 实现多种类型隐私求交集算法,包括CM2020, RA2018, ECDH-PSI, ECDH-Multi-PSI等
9+
- MPC: 安全多方计算
10+
- PIR: 匿踪查询核心组件
1211

13-
#### 隐私计算互联互通
12+
**联合建模组件**
1413

15-
- ECDH PSI算法与隐语互联互通
14+
- 2+方的多方联合XGB/LR建模组件(训练 + 离线预测)
15+
- 2+方多方特征工程组件(特征分箱,WOE/IV计算等)
16+
- 多方数据预处理组件
1617

17-
#### 隐私建模组件
18+
**统一网关**
19+
20+
- 支持基于最短路径的消息路由转发
21+
- 支持按节点ID、服务名、机构名进行路由寻址
22+
- 支持服务注册和服务发现
23+
24+
**统一网关SDK**
25+
26+
- 提供Java/Python网关SDK,支持接入网关与其他节点、服务或者机构进行通信
27+
- 可向网关注册服务
28+
- 可从网关拉取服务信息
29+
30+
**专家模式SDK**
31+
32+
- `wedpr-ml-toolkit`: 可通过python sdk向WeDPR隐私计算平台发起各类任务,并获取对应的结果,扩展了WeDPR隐私计算系统功能的可扩展性,可在不侵入式修改系统的前提下,实现数据开发人员的各类数据分析需求
33+
34+
**密码学组件**
35+
36+
- 实现了各种同态算法,包括`Paillier`, `IHC`
1837

19-
- 2+方的多方联合XGB组件(训练 + 离线预测)
20-
- 2+方多方特征工程组件(特征分箱,WOE/IV计算等)
21-
- 预处理组件

cpp/cmake/Version.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
set(VERSION "1.0.0")
2-
set(PYTHON_TOOLKIT_VERSION "1.0.0")
1+
set(VERSION "3.0.0")
2+
set(PYTHON_TOOLKIT_VERSION "3.0.0")

cpp/tools/install_depends.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ install_iconv_depend()
125125
install_macos_depends()
126126
{
127127
LOG_INFO "install depends for macos ..."
128-
brew install autoconf nasm lcov
128+
brew install autoconf nasm lcov automake
129129
#install_gsasl_depend "macos"
130130
#install_iconv_depend
131131
LOG_INFO "install depends for macos success ..."

cpp/vcpkg-configuration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"kind": "git",
55
"repository": "https://github.com/FISCO-BCOS/registry",
6-
"baseline": "535c4fc74badd509b94e8a736452fa8a76bff944",
6+
"baseline": "d45a1d99c6b01713252bcb734c03f2c1ac0e44b8",
77
"packages": [
88
"openssl",
99
"bcos-utilities",

cpp/vcpkg.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@
5151
{
5252
"name": "jsoncpp",
5353
"version": "1.9.5"
54+
},
55+
{
56+
"name":"gsasl",
57+
"version": "2.2.1-no-gssapi#0"
58+
},
59+
{
60+
"name": "libxml2",
61+
"version": "2.11.5#1"
5462
}
5563
],
5664
"features": {
@@ -116,10 +124,15 @@
116124
"name": "bcos-boostssl",
117125
"version>=": "3.2.3"
118126
},
127+
{
128+
"name": "libxml2",
129+
"version>=": "2.11.5#1",
130+
"features": ["lzma", "zlib"]
131+
},
119132
"tarscpp",
120133
"tbb",
121-
"libxml2",
122-
"libiconv"
134+
"libiconv",
135+
"gsasl"
123136
]
124137
},
125138
"sdk": {

0 commit comments

Comments
 (0)