use metagpt cli instead. update all related docs

This commit is contained in:
geekan 2023-12-11 14:58:54 +08:00
parent ad17a2dc7a
commit b4eb8e4f34
10 changed files with 39 additions and 37 deletions

View file

@ -15,7 +15,7 @@ # Step 2: Run metagpt demo with container
-v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
-v /opt/metagpt/workspace:/app/metagpt/workspace \
metagpt/metagpt:latest \
python3 startup.py "Write a cli snake game"
metagpt "Write a cli snake game"
# You can also start a container and execute commands in it
docker run --name metagpt -d \
@ -25,7 +25,7 @@ # You can also start a container and execute commands in it
metagpt/metagpt:latest
docker exec -it metagpt /bin/bash
$ python3 startup.py "Write a cli snake game"
$ metagpt "Write a cli snake game"
```
The command `docker run ...` do the following things:
@ -33,7 +33,7 @@ # You can also start a container and execute commands in it
- Run in privileged mode to have permission to run the browser
- Map host configure file `/opt/metagpt/config/key.yaml` to container `/app/metagpt/config/key.yaml`
- Map host directory `/opt/metagpt/workspace` to container `/app/metagpt/workspace`
- Execute the demo command `python3 startup.py "Write a cli snake game"`
- Execute the demo command `metagpt "Write a cli snake game"`
### Build image by yourself

View file

@ -15,7 +15,7 @@ # 步骤2: 使用容器运行metagpt演示
-v /opt/metagpt/config/key.yaml:/app/metagpt/config/key.yaml \
-v /opt/metagpt/workspace:/app/metagpt/workspace \
metagpt/metagpt:latest \
python startup.py "Write a cli snake game"
metagpt "Write a cli snake game"
# 您也可以启动一个容器并在其中执行命令
docker run --name metagpt -d \
@ -25,7 +25,7 @@ # 您也可以启动一个容器并在其中执行命令
metagpt/metagpt:latest
docker exec -it metagpt /bin/bash
$ python startup.py "Write a cli snake game"
$ metagpt "Write a cli snake game"
```
`docker run ...`做了以下事情:
@ -33,7 +33,7 @@ # 您也可以启动一个容器并在其中执行命令
- 以特权模式运行,有权限运行浏览器
- 将主机文件 `/opt/metagpt/config/key.yaml` 映射到容器文件 `/app/metagpt/config/key.yaml`
- 将主机目录 `/opt/metagpt/workspace` 映射到容器目录 `/app/metagpt/workspace`
- 执行示例命令 `python startup.py "Write a cli snake game"`
- 执行示例命令 `metagpt "Write a cli snake game"`
### 自己构建镜像