Skip to content

Commit

Permalink
Update docs to use docker compose v2 (Significant-Gravitas#4471)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
2 people authored and dayofthedave committed Jul 17, 2023
1 parent e744b38 commit a287bd6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
14 changes: 7 additions & 7 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a287bd6

Please sign in to comment.