Skip to content

Commit

Permalink
reset the path
Browse files Browse the repository at this point in the history
  • Loading branch information
iiiyu committed Jul 18, 2023
1 parent 0f5098f commit 7c5b703
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,23 @@ python setup.py install
```bash
# Step 1: Download metagpt official image and prepare config.yaml
docker pull metagpt/metagpt:v0.3
mkdir -p ./opt/metagpt/{config,workspace}
docker run --rm metagpt/metagpt:v0.3 cat /app/metagpt/config/config.yaml > ./opt/metagpt/config/config.yaml
mkdir -p /opt/metagpt/{config,workspace}
docker run --rm metagpt/metagpt:v0.3 cat /app/metagpt/config/config.yaml > /opt/metagpt/config/config.yaml
vim /opt/metagpt/config/config.yaml # Change the config

# Step 2: Run metagpt demo with container
docker run --rm \
--privileged \
-v ./opt/metagpt/config:/app/metagpt/config \
-v ./opt/metagpt/workspace:/app/metagpt/workspace \
-v /opt/metagpt/config:/app/metagpt/config \
-v /opt/metagpt/workspace:/app/metagpt/workspace \
metagpt/metagpt:v0.3 \
python startup.py "Write a cli snake game"

# You can also start a container and execute commands in it
docker run --name metagpt -d \
--privileged \
-v ./opt/metagpt/config:/app/metagpt/config \
-v ./opt/metagpt/workspace:/app/metagpt/workspace \
-v /opt/metagpt/config:/app/metagpt/config \
-v /opt/metagpt/workspace:/app/metagpt/workspace \
metagpt/metagpt:v0.3

docker exec -it metagpt /bin/bash
Expand All @@ -84,8 +84,8 @@ $ python startup.py "Write a cli snake game"
The command `docker run ...` do the following things:

- Run in privileged mode to have permission to run the browser
- Map host directory `./opt/metagpt/config` to container directory `/app/metagpt/config`
- Map host directory `./opt/metagpt/workspace` to container directory `/app/metagpt/workspace`
- Map host directory `/opt/metagpt/config` to container directory `/app/metagpt/config`
- Map host directory `/opt/metagpt/workspace` to container directory `/app/metagpt/workspace`
- Execute the demo command `python startup.py "Write a cli snake game"`

### Build image by yourself
Expand Down

0 comments on commit 7c5b703

Please sign in to comment.