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 <github@pwuts.nl>
pull/3774/head^2
kerta1n 2023-07-06 13:11:43 -07:00 committed by GitHub
parent 2fcd91b765
commit e0882955e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 12 deletions

View File

@ -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:

View File

@ -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

View File

@ -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 <filename>
docker compose run --rm auto-gpt --help
docker compose run --rm auto-gpt --ai-settings <filename>
!!! note
Replace anything in angled brackets (<>) to a value you want to specify