From e0882955e3db1d23e2e2fa4b2c688dcf46d2d866 Mon Sep 17 00:00:00 2001 From: kerta1n <36344851+kerta1n@users.noreply.github.com> Date: Thu, 6 Jul 2023 13:11:43 -0700 Subject: [PATCH] Update docs to use `docker compose` v2 (#4471) * Update setup.md Change "docker-compose" command to "docker compose" to avoid future issues with running the Docker method (`docker-compose` is v1 and is outdated, is not a recognized command with newer versions of Docker engine) * Update usage.md * Update comment in docker-compose.yml --------- Co-authored-by: Reinier van der Leer --- docker-compose.yml | 5 +++-- docs/setup.md | 14 +++++++------- docs/usage.md | 6 +++--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7afa224a..945f969b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,7 @@ # To boot the app run the following: -# docker-compose run auto-gpt -# NOTE: Version 3.9 requires at least docker-compose version 1.29.0 ! +# docker compose run auto-gpt +# NOTE: Version 3.9 requires at least Docker Compose version 2 and Docker Engine version 20.10.13! + version: "3.9" services: diff --git a/docs/setup.md b/docs/setup.md index e894ebe2..43b9d9c8 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -159,28 +159,28 @@ Get your OpenAI API key from: [https://platform.openai.com/account/api-keys](htt ### Run with Docker -Easiest is to use `docker-compose`. +Easiest is to use `docker compose`. Important: Docker Compose version 1.29.0 or later is required to use version 3.9 of the Compose file format. You can check the version of Docker Compose installed on your system by running the following command: - docker-compose version + docker compose version This will display the version of Docker Compose that is currently installed on your system. If you need to upgrade Docker Compose to a newer version, you can follow the installation instructions in the Docker documentation: https://docs.docker.com/compose/install/ -Once you have a recent version of docker-compose, run the commands below in your Auto-GPT folder. +Once you have a recent version of Docker Compose, run the commands below in your Auto-GPT folder. 1. Build the image. If you have pulled the image from Docker Hub, skip this step (NOTE: You *will* need to do this if you are modifying requirements.txt to add/remove dependencies like Python libs/frameworks) :::shell - docker-compose build auto-gpt + docker compose build auto-gpt 2. Run Auto-GPT :::shell - docker-compose run --rm auto-gpt + docker compose run --rm auto-gpt By default, this will also start and attach a Redis memory backend. If you do not want this, comment or remove the `depends: - redis` and `redis:` sections from @@ -190,7 +190,7 @@ Once you have a recent version of docker-compose, run the commands below in your You can pass extra arguments, e.g. running with `--gpt3only` and `--continuous`: ``` shell -docker-compose run --rm auto-gpt --gpt3only --continuous +docker compose run --rm auto-gpt --gpt3only --continuous ``` If you dare, you can also build and run it with "vanilla" docker commands: @@ -200,7 +200,7 @@ docker run -it --env-file=.env -v $PWD:/app auto-gpt docker run -it --env-file=.env -v $PWD:/app --rm auto-gpt --gpt3only --continuous ``` -[docker-compose file]: https://github.com/Significant-Gravitas/Auto-GPT/blob/stable/docker-compose.yml +[Docker Compose file]: https://github.com/Significant-Gravitas/Auto-GPT/blob/stable/docker-compose.yml ### Run with Dev Container diff --git a/docs/usage.md b/docs/usage.md index 2e88298c..42b86eae 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -11,11 +11,11 @@ Running with `--help` lists all the possible command line arguments you can pass !!! info For use with Docker, replace the script in the examples with - `docker-compose run --rm auto-gpt`: + `docker compose run --rm auto-gpt`: :::shell - docker-compose run --rm auto-gpt --help - docker-compose run --rm auto-gpt --ai-settings + docker compose run --rm auto-gpt --help + docker compose run --rm auto-gpt --ai-settings !!! note Replace anything in angled brackets (<>) to a value you want to specify