Skip to content

Commit 27b4fd4

Browse files
committed
fix
1 parent 47242e5 commit 27b4fd4

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

deploy/astrbot/cli.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,38 @@ cd AstrBot
2323

2424
```bash
2525
python3 -m venv ./venv
26-
source venv/bin/activate
2726
```
2827

2928
以上步骤会创建一个虚拟环境并激活(以免打乱你电脑本地的 Python 环境),并使用清华大学的镜像源来安装 AstrBot 的依赖。依赖的安装需要花费一些时间。
3029

3130
接下来,通过以下命令安装依赖文件:
3231

3332
```bash
34-
python3 -m pip install -r requirements.txt -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
33+
venv/bin/python3 -m pip install -r requirements.txt -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
3534
```
3635

3736
> [!TIP]
3837
> 推荐使用更快的 uv 工具来安装依赖文件(平均快 10-100 倍):
3938
> ```bash
40-
> python3 -m pip install uv
41-
> python3 -m uv pip install -r requirements.txt -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
39+
> venv/bin/python3 -m pip install uv
40+
> venv/bin/python3 -m uv pip install -r requirements.txt -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
4241
> ```
4342
4443
然后运行 AstrBot
4544
46-
> [!TIP]
47-
> AstrBot 支持基于 Docker 的沙箱代码执行器。如果你需要使用沙箱代码执行器,请使用 `sudo` 执行下面的指令,以便 AstrBot 能够正常操作 Docker。
4845
4946
```bash
50-
python3 main.py
47+
venv/bin/python3 main.py
5148
```
5249
50+
> [!TIP]
51+
> AstrBot 支持基于 Docker 的沙箱代码执行器。如果你需要使用沙箱代码执行器,请使用 `sudo` 以便 AstrBot 能够正常操作 Docker。
52+
> ```bash
53+
> sudo -E venv/bin/python3 main.py
54+
> ```
55+
56+
57+
5358
## 🎉 大功告成!
5459
5560
如果一切顺利,你会看到 AstrBot 打印出的日志。

0 commit comments

Comments
 (0)