Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix docker-compose setup #1198

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,30 @@ You can specify the memory index for redis using the following:
MEMORY_INDEX=whatever
```

## Docker Compose + Redis Setup

You can also run Auto-GPT + Redis in one command with docker compose.
Install docker desktop.

Run:

```
docker-compose run auto-gpt
```

See https://hub.docker.com/r/redis/redis-stack-server for setting a password and additional configuration.

Set the following environment variables:

```
MEMORY_BACKEND=redis
REDIS_HOST=redis-stack-server
REDIS_PORT=6379
REDIS_PASSWORD=
```

Follow the Redis guide above.

### 🌲 Pinecone API Key Setup

Pinecone enables the storage of vast amounts of vector-based memory, allowing for only relevant memories to be loaded for the agent at any given time.
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ services:

redis:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This service can be renamed to redis-stack-server and then there's is no need to specify the container_name

image: "redis/redis-stack-server:latest"
container_name: "redis-stack-server"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this is necessary? What is wrong with the default name of redis?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikekelly I have same question.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing wrong with it, I could've used redis but in my local testing the image doesn't spin up as redis it's like auto-gpt-redis-1. I could change this to redis but I think specifying a name is useful

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so that there's something consistent people can put in their .env for the host

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoop my mistake, no need to specify the name. I at least think the readme update is useful and can modify the readme or close the pr

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A specific name instead of a generic name helps avoid conflicts and/or confusion when multiple Redis containers may be running on the same host.

As a best practice, it's better to be specific than generic, especially when you can have OSS Redis, the standard engine; Redis Stack extension with builtin RedisInsight for Dev; and Redis Stack Server, the extension without RedisInsight for Production.

As convention, using the origin product name plus optional specific identifiers helps any new comers and avoids misunderstandings.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aosan if you decide to go in that direction, you're still better off achieving this through the name of the service. Docker compose provides a network where the containers can address each other via their service name.