diff --git a/README.md b/README.md index c51839263..576806f66 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,22 @@ # Copy the configuration file and make the necessary modifications. | OPENAI_API_KEY # Replace with your own key | OPENAI_API_KEY: "sk-..." | export OPENAI_API_KEY="sk-..." | | OPENAI_API_BASE # Optional | OPENAI_API_BASE: "https:///v1" | export OPENAI_API_BASE="https:///v1" | +## Docker Setup + +You can also use docker to setup MetaGPT. +```bash +cd metagpt +docker build --network host -t metagpt: . +``` +There are some changes of mirrors in the dockerfile, for users outside mainland China, feel free to modify or delete them :) + +To run the docker image, you can use the following command. +```bash +docker run docker run -it -v :/app/metagpt/config -v :/app/metagpt/workspace metagpt: +``` +This command mounts the config folder and workspace folder in the host machine, and you should use absolute directory of these folders. The `command` is what you want to run, you can set it as `/bin/bash -c "cd metagpt && python startup.py "Write helloworld in python""` or just `/bin/bash` for interactive terminal. + + ## Tutorial: Initiating a startup ```shell