Skip to content

Commit

Permalink
chore: add non-TEE deployment guide
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Feb 16, 2025
1 parent 0a18867 commit 9844525
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 0 deletions.
50 changes: 50 additions & 0 deletions agents/anda_bot/deployment_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,56 @@ cp example.env .env
cargo run -p anda_bot -- start-local
```

## 在 Linux 中运行非 TEE 版本

1. 安装 Rust 开发环境。
2. 安装 IC TEE CLI 工具。
使用 rust cargo 安装:
```sh
cargo install ic_tee_cli
ic_tee_cli --help
```

3. 在 linux 环境下可直接下载 anda_bot 可执行文件。
```sh
wget https://github.com/ldclabs/anda/releases/download/v0.4.0/anda_bot
chmod +x anda_bot
```

其它操作系统可自行编译,参考:
```sh
cargo build -p anda_bot --release
```

4. 下载 `Character.toml``Config.toml``Config.toml` 文件:

- https://github.com/ldclabs/anda/blob/main/agents/anda_bot/nitro_enclave/Character.toml
- https://github.com/ldclabs/anda/blob/main/agents/anda_bot/nitro_enclave/Config.toml

并将其内容修改为你的配置。

5. 创建 `.env` 文件,填写以下内容:
```sh
LOG_LEVEL=debug
ID_SECRET=0000000000000000000000000000000000000000000000000000000000000000
ROOT_SECRET=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CHARACTER_FILE_PATH='./Character.toml'
CONFIG_FILE_PATH='./Config.toml'
```

使用 `ic_tee_cli` 生成你自己的 ID_SECRET 和 ROOT_SECRET:
```sh
# ID_SECRET
ic_tee_cli rand-bytes --len 32
# ROOT_SECRET
ic_tee_cli rand-bytes --len 48
```

6. 启动 anda_bot
```sh
./anda_bot
```

## 部署 TEE 版本

### 准备环境
Expand Down
51 changes: 51 additions & 0 deletions agents/anda_bot/deployment_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,57 @@ cp example.env .env
cargo run -p anda_bot -- start-local
```

## Running Non-TEE Version on Linux

1. Install the Rust development environment.

2. Install the IC TEE CLI tool.
Install using rust cargo:
```sh
cargo install ic_tee_cli
ic_tee_cli --help
```

3. Download the executable directly on Linux:
```sh
wget https://github.com/ldclabs/anda/releases/download/v0.4.0/anda_bot
chmod +x anda_bot
```

For other operating systems, compile it yourself:
```sh
cargo build -p anda_bot --release
```

4. Download `Character.toml` and `Config.toml` files:

- https://github.com/ldclabs/anda/blob/main/agents/anda_bot/nitro_enclave/Character.toml
- https://github.com/ldclabs/anda/blob/main/agents/anda_bot/nitro_enclave/Config.toml

Modify their contents to fit your configuration.

5. Create a `.env` file with the following content:
```sh
LOG_LEVEL=debug
ID_SECRET=0000000000000000000000000000000000000000000000000000000000000000
ROOT_SECRET=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CHARACTER_FILE_PATH='./Character.toml'
CONFIG_FILE_PATH='./Config.toml'
```

Generate your own ID_SECRET and ROOT_SECRET using `ic_tee_cli`:
```sh
# ID_SECRET
ic_tee_cli rand-bytes --len 32
# ROOT_SECRET
ic_tee_cli rand-bytes --len 48
```

6. Start anda_bot
```sh
./anda_bot
```

## Deploy TEE Version

### Prepare Environment
Expand Down

0 comments on commit 9844525

Please sign in to comment.