From 954f85849e5675fd9b1d6eab91cc86d62231a929 Mon Sep 17 00:00:00 2001 From: P0sitive Date: Fri, 7 Jul 2023 13:03:51 +0800 Subject: [PATCH] add docker descriptions --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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