8 Star 38 Fork 9

Gitee 极速下载/FATE

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/FederatedAI/FATE
克隆/下载
Makefile 1.95 KB
一键复制 编辑 原始数据 按行查看 历史
weiwee 提交于 2023-12-28 11:28 . chore: fix makefile
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
mkfile_dir := $(dir $(mkfile_path))
.DEFAULT_GOAL:=help
##@ Dev
.PHONY: install-rust
install-rust_paillier: ## Install rust_paillier.
@echo "install fate_utils"
@cd ${mkfile_dir} && \
. venv/bin/activate.sh && \
maturin develop --release -m rust/fate_utils/Cargo.toml --target-dir build
##@ Build
.PHONY: build-rust
build-rust: ## Build fate_utils.
@echo "build fate_utils"
@cd ${mkfile_dir} && \
. ${mkfile_dir}venv/bin/activate && \
maturin build --release -m rust/fate_utils/crates/fate_utils/Cargo.toml --out dist --target-dir build
.PHONY: build-fate
build-fate: ## Build fate
@echo "build fate"
@cd ${mkfile_dir}/python && \
python3 setup.py sdist --formats=gztar -d ../dist
.PHONY: build ## Build all
build: build-rust_paillier build-fate
@echo "build all"
##@ Generate
.PHONY: gen-osx-proto
gen-osx-proto: ## Generate osx protobuf.
@cd ${mkfile_dir} && \
python3 -m grpc_tools.protoc --proto_path=proto/ \
--python_out=python/fate/arch/federation/backends/osx/ \
--grpc_python_out=python/fate/arch/federation/backends/osx/ \
proto/osx/osx.proto
.PHONY: gen-task-jsonschema
gen-task-jsonschema: ## Generate task jsonschema.
@cd ${mkfile_dir}/python && \
mkdir -p ${mkfile_dir}/schemas && \
python3 -c "from fate.components.core.spec.task import TaskConfigSpec; print(TaskConfigSpec.schema_json(indent=2))" >> \
${mkfile_dir}/schemas/task.schema.json
##@ Clean
.PHONY: clean
clean: ## Clean unused files.
@cd ${mkfile_dir} && \
rm -rf dist/ build/ rust/tensor/rust_paillier/target && \
find python -name '*.pyc' -exec rm -f {} \; && \
find python -name '__pycache__' -exec rm -rf {} \+ && \
find python -name '*.egg-info' -exec rm -rf {} \+
.PHONY: help
help:
@awk 'BEGIN {FS = ":.*##"; printf "Usage: make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-25s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/mirrors/FATE.git
git@gitee.com:mirrors/FATE.git
mirrors
FATE
FATE
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385