Skip to content

Commit

Permalink
repo-sync-2024-06-04T20:33:48+0800 (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongtianq authored Jun 4, 2024
1 parent 8ef3e77 commit 95b0d06
Show file tree
Hide file tree
Showing 37 changed files with 101 additions and 93 deletions.
12 changes: 4 additions & 8 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2023 Ant Group Co., Ltd.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -15,7 +15,7 @@
common --experimental_repo_remote_exec
common --experimental_cc_shared_library

build --incompatible_new_actions_api=false
build --incompatible_new_actions_api=false
build --copt=-fdiagnostics-color=always
build --enable_platform_specific_config
build --force_pic
Expand All @@ -40,10 +40,6 @@ build:macos --cxxopt -Wno-deprecated-anon-enum-enum-conversion
build:macos --macos_minimum_os=11.0
build:macos --host_macos_minimum_os=11.0

# static link libstdc++ & libgcc on Linux
build:linux --copt=-fopenmp
build:linux --action_env=BAZEL_LINKOPTS=-static-libstdc++:-static-libgcc
build:linux --action_env=BAZEL_LINKLIBS=-l%:libstdc++.a:-l%:libgcc.a

build:asan --strip=never
build:asan --copt -fno-sanitize-recover=all
Expand Down
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2024 Ant Group Co., Ltd.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
source /root/miniconda3/etc/profile.d/conda.sh
conda create -n build python=<< parameters.python_ver >> -y
conda activate build
pip install -r dev-requirements.txt
# verification package
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/issue_template.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2024 Ant Group Co., Ltd.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
2 changes: 1 addition & 1 deletion REPO_LAYOUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This is a high level overview of how the repository is laid out. Some major folders are listed below:

* [bazel/](bazel/): Configuration for TrustedFlow's use of [Bazel](https://bazel.build/). It includes some remote repositories and rules that we use in our build system.
* [dm_component/](dm_component/): Data management component.
* [dm_component/](dm_component/): Data management component.
* [docker/](docker/): Dockerfiles used to build images for compiling or running TrustedFlow.
* [docs/](docs/): Documents of TrustedFlow.
* [trustedflow/](trustedflow/): Some common libs used by TrustedFlow.
Expand Down
21 changes: 13 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,23 @@ load("//bazel:repositories.bzl", "trustedflow_dependencies")

trustedflow_dependencies()

load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")

grpc_deps()

load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")

grpc_extra_deps()

load("@yacl//bazel:repositories.bzl", "yacl_deps")

yacl_deps()

# need by yacl
load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_repos", "rules_proto_grpc_toolchains")

rules_proto_grpc_toolchains()
Expand All @@ -32,14 +45,6 @@ load("@rules_proto_grpc//cpp:repositories.bzl", rules_proto_grpc_cpp_repos = "cp

rules_proto_grpc_cpp_repos()

load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")

grpc_deps()

load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")

grpc_extra_deps()

load(
"@rules_foreign_cc//foreign_cc:repositories.bzl",
"rules_foreign_cc_dependencies",
Expand Down
6 changes: 3 additions & 3 deletions bazel/patches/grpc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ index 0954ed54d4..0c85e99b01 100644
--- a/bazel/grpc_deps.bzl
+++ b/bazel/grpc_deps.bzl
@@ -57,12 +57,12 @@ def grpc_deps():

native.bind(
name = "libssl",
- actual = "@boringssl//:ssl",
+ actual = "@com_github_openssl_openssl//:openssl",
)

native.bind(
name = "libcrypto",
- actual = "@boringssl//:crypto",
+ actual = "@com_github_openssl_openssl//:openssl",
)

native.bind(
7 changes: 3 additions & 4 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,15 @@ def _com_github_cppcodec():
sha256 = "0edaea2a9d9709d456aa99a1c3e17812ed130f9ef2b5c2d152c230a5cbc5c482",
)

# include openssl deps
def _com_github_yacl():
maybe(
http_archive,
name = "yacl",
urls = [
"https://github.com/secretflow/yacl/archive/ea6e1ea567903804f17525fe04ede706815ece38.tar.gz",
"https://github.com/secretflow/yacl/archive/refs/tags/0.4.5b0.tar.gz",
],
strip_prefix = "yacl-ea6e1ea567903804f17525fe04ede706815ece38",
sha256 = "51c58b3c9704e439101311f74a46d97b0bc3afe2d1c53866e6a80629745cabe1",
strip_prefix = "yacl-0.4.5b0",
sha256 = "68d1dbeb255d404606d3ba9380b915fbbe3886cde575bbe89795657286742bd2",
)

def _local_sgxsdk():
Expand Down
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/bin/bash
#
# Copyright 2024 Ant Group Co., Ltd.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

bazel --output_base=target build //trustedflow/... -c opt --repository_cache=/tmp/bazel_repo_cache --remote_download_minimal
bazel --output_base=target build //trustedflow/... -c opt --repository_cache=/tmp/bazel_repo_cache --remote_download_minimal
2 changes: 2 additions & 0 deletions cargo/trustedflow-attestation-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,5 @@ pub fn generate_attestation_report(params_json_str: &str) -> Result<std::string:

return Ok(std::str::from_utf8(&report_buf[..(report_len as usize)])?.to_string());
}


6 changes: 2 additions & 4 deletions dm_component/componentize/component/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ def clean_text(x: str, no_line_breaks: bool = True) -> str:
return cleantext.clean(x.strip(), lower=False, no_line_breaks=no_line_breaks)


class CompDeclError(Exception):
...
class CompDeclError(Exception): ...


class CompEvalError(Exception):
...
class CompEvalError(Exception): ...


class CompTracer:
Expand Down
3 changes: 1 addition & 2 deletions dm_component/componentize/component/eval_param_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
from secretflow.spec.v1.evaluation_pb2 import NodeEvalParam


class EvalParamError(Exception):
...
class EvalParamError(Exception): ...


def check_allowed_values(value: Attribute, definition: AttributeDef):
Expand Down
2 changes: 2 additions & 0 deletions dm_component/componentize/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def eval_upload(
# 7. upload encrypted file
output_uri = reader.get_output_uri("receive_output")
logging.info("##### file sending #####")

# TODO: make retry scheme configurable
@retry(
wait=wait_exponential(multiplier=1, min=4, max=10),
Expand Down Expand Up @@ -301,6 +302,7 @@ def eval_data_export(

# 2. download the encrytped data from sender
logging.info("##### file downloading #####")

# TODO: make retry scheme configurable
@retry(
wait=wait_exponential(multiplier=1, min=4, max=10),
Expand Down
6 changes: 3 additions & 3 deletions dm_component/deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2024 Ant Group Co., Ltd.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
6 changes: 3 additions & 3 deletions dm_component/deployment/app_image.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2024 Ant Group Co., Ltd.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
6 changes: 3 additions & 3 deletions dm_component/deployment/config_templates.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2024 Ant Group Co., Ltd.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
6 changes: 3 additions & 3 deletions dm_component/deployment/deploy_templates.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2024 Ant Group Co., Ltd.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
20 changes: 10 additions & 10 deletions docker/trustedflow-dev-ubuntu22.04.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2024 Ant Group Co., Ltd.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -23,7 +23,7 @@ RUN ln -sf /usr/bin/bash /bin/sh


RUN apt update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y \
tzdata \
tzdata \
build-essential \
ocaml \
automake \
Expand All @@ -36,11 +36,11 @@ RUN apt update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y \
npm \
git \
debhelper \
zip \
zip \
libcurl4-openssl-dev \
pkgconf \
libboost-dev \
libboost-system-dev \
pkgconf \
libboost-dev \
libboost-system-dev \
libboost-thread-dev \
protobuf-c-compiler \
libprotobuf-c-dev \
Expand All @@ -54,7 +54,7 @@ RUN apt update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y \
rsync \
libfuse2 \
&& rm -f /etc/ssh/ssh_host_* \
&& apt clean
&& apt clean

# instal protoc v3.19.4
RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip \
Expand All @@ -69,7 +69,7 @@ RUN wget http://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& conda init


# install bazelisk
# install bazelisk
RUN npm install -g @bazel/bazelisk

# install emsdk
Expand Down
6 changes: 3 additions & 3 deletions docker/trustedflow-release-ubuntu22.04.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2024 Ant Group Co., Ltd.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
6 changes: 3 additions & 3 deletions docs/build.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash
#
# Copyright 2024 Ant Group Co., Ltd.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
Loading

0 comments on commit 95b0d06

Please sign in to comment.