Files
ssw-mpc/deploy/ray/start-node.sh
T
admin 54781b3f83
ci / gate (push) Waiting to run
refactor: 项目改名 ssw-mpc,crate 统一到 mpc-* 前缀
- 项目与文档标题:nax-rs → ssw-mpc(尚数网-多方安全计算),二进制 nax → mpc
- 18 个 crate 及目录 nax-* → mpc-*,Rust 引用 nax_* → mpc_*
- 环境变量、C 符号、构建/部署脚本:NAX_* → MPC_*、libnax_ray.so → libmpc_ray.so
- 保留协议域分隔常量与 refs/nax 参考实现路径,维持 golden 向量与历史数据兼容
- 新增 [profile.dev] incremental=false
2026-11-05 15:06:12 +08:00

27 lines
848 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# 在各机构机器上启动一个 Ray worker 节点,并打上该方的资源标签。
#
# 用法:
# bash deploy/ray/start-node.sh alice <head-host>:6379
#
# 资源标签是整套方案的关键:mpc 提交任务时声明 resources={"alice_node": 1},
# Ray 就只会把该任务调度到这台机器上 —— 数据不出域的物理保证。
set -euo pipefail
SITE="${1:?用法: start-node.sh <site-name> [head-address]}"
HEAD="${2:-}"
TAG="${SITE}_node"
if ! command -v ray >/dev/null 2>&1; then
echo "未找到 ray。先 pip install 'ray[default]'" >&2
exit 1
fi
ARGS=(--num-cpus=1 --num-gpus=0 --resources="{\"${TAG}\": 1}")
if [[ -n "$HEAD" ]]; then
ARGS+=(--address="$HEAD")
fi
echo "启动 Ray 节点: site=${SITE} tag=${TAG} head=${HEAD:-<本机为 head>}"
exec ray start "${ARGS[@]}" --block