Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Instructions for plugin install with docker #185

Open
benjamincommeau2 opened this issue May 28, 2023 · 9 comments
Open

Instructions for plugin install with docker #185

benjamincommeau2 opened this issue May 28, 2023 · 9 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@benjamincommeau2
Copy link

How do I install the Auto-GPT-Plugins if I installed autoGPT using docker composer https://docs.agpt.co/setup/#run-with-docker ? I am not seeing a run.sh file anywhere.

@Lrennard
Copy link
Contributor

Assuming you've installed Docker engine, docker compose, and run <docker pull significantgravitas/auto-gpt>
once you've launched the container with you can try running the following:

./run.sh

If that doesn't work go ahead and run it manually:

pip install -r requirements.txt
python -m autogpt --install-plugin-deps

@benjamincommeau2
Copy link
Author

I am sorry, but I am still not getting it. When I run the container using docker-compose run --rm auto-gpt, it just pulls me into AutoGPT's input prompt.

@Lrennard
Copy link
Contributor

Lrennard commented May 29, 2023

I am sorry, but I am still not getting it. When I run the container using docker-compose run --rm auto-gpt, it just pulls me into AutoGPT's input prompt.

Yes, After downloading Plugin Folder and Installing Dependencies, AGPT will Launch, You should be prompted to allow or deny each plugin if you haven't set the allow and denylist in .env.

If you're having trouble getting the plugins to launch with AGPT i'd suggest redownloading the .zip using the install guide in the Plugin repo. you'll do this via command line before Launching AGPT with the <--install-plugin-deps> argument

Assuming you've installed Docker engine, docker compose, and run <docker pull significantgravitas/auto-gpt> once you've launched the container with you can try running the following:

./run.sh

If that doesn't work go ahead and run it manually:

pip install -r requirements.txt python -m autogpt --install-plugin-deps

You're right, my apologies I must've been too tired to think.

@miheerwa
Copy link

Hi @benjamincommeau2 ,

I found the instructions for this not as clear for docker as I was hoping. The method that worked for me seems to be temporary if I run the container again by rebuilding with composer, once built the first time, using the Terminal via docker seems to work well for me. I am also new to docker so there may be better ways. I was able the get plugins to work by doing the following:

in your preferred terminal (I am on windows using powershell):
docker-compose run --rm auto-gpt --continuous

Once Auto-GPT container is running; Go to docker and find your auto-gpt container and expand the sub-container to find auto-gpt-run-###. Click on the 3 dots to the right and select "Open In Terminal".
At the prompt run command:
curl -L -o ./plugins/Auto-GPT-Plugins.zip https://github.com/Significant-Gravitas/Auto-GPT-Plugins/archive/refs/heads/master.zip

After downloaded, run:
python -m autogpt --install-plugin-deps

The other methods for ./run.sh or .\run.bat seem to be best performed with if you pull the latest and run native to terminal. Visual Studio or Visual Studio Code make this easier if on windows. The above method may also be easier with either VS and using the container plugin located here: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers

Again, this worked for me however, I feel there is probably a much better process to follow from those more experienced.
I do hope this helps.

@lc0rp
Copy link
Contributor

lc0rp commented May 31, 2023

@benjamincommeau2 did this work?

@miheerwa would you be interested in adding these instructions to the docs/readme via a PR?

@lc0rp lc0rp added documentation Improvements or additions to documentation good first issue Good for newcomers labels May 31, 2023
@lc0rp lc0rp changed the title Install with docker Instructions for plugin install with docker May 31, 2023
@h4ck3rk3y
Copy link
Contributor

As an alternative I'd recommend using https://github.com/kurtosis-tech/autogpt-package. The integration tests use them - https://github.com/Significant-Gravitas/Auto-GPT-Plugins/blob/master/.github/workflows/test-plugin-installation.yml

Disclaimer - I maintain the above codebase but I 100% believe thats the easiest way to add plugins.

@QvQQ
Copy link

QvQQ commented Jul 29, 2023

I just discovered an elegant approach to integrate plugins for auto-gpt when running it with the docker-compose command.
Edit your docker-compose.yaml file as below.
Then just run mkdir ./plugins && curl -L -o ./plugins/Auto-GPT-Plugins.zip https://github.com/Significant-Gravitas/Auto-GPT-Plugins/archive/refs/heads/master.zip at the catalogue.

version: "3.9"
services:
  auto-gpt:
    image: significantgravitas/auto-gpt
    env_file:
      - .env
    profiles: ["exclude-from-up"]
    volumes:
      - ./auto_gpt_workspace:/app/auto_gpt_workspace
      - ./data:/app/data
      ## allow auto-gpt to write logs to disk
      - ./logs:/app/logs
      - ./plugins:/app/plugins
      # - type: bind
      #   source: ./ai_settings.yaml
      #   target: /app/ai_settings.yaml

@Kozyge
Copy link

Kozyge commented Oct 26, 2023

I just discovered an elegant approach to integrate plugins for auto-gpt when running it with the docker-compose command. Edit your docker-compose.yaml file as below. Then just run mkdir ./plugins && curl -L -o ./plugins/Auto-GPT-Plugins.zip https://github.com/Significant-Gravitas/Auto-GPT-Plugins/archive/refs/heads/master.zip at the catalogue.

version: "3.9"
services:
  auto-gpt:
    image: significantgravitas/auto-gpt
    env_file:
      - .env
    profiles: ["exclude-from-up"]
    volumes:
      - ./auto_gpt_workspace:/app/auto_gpt_workspace
      - ./data:/app/data
      ## allow auto-gpt to write logs to disk
      - ./logs:/app/logs
      - ./plugins:/app/plugins
      # - type: bind
      #   source: ./ai_settings.yaml
      #   target: /app/ai_settings.yaml

And how did u manage to have a config file for the plugin. did u just use .env?

@JamieGoodson
Copy link

JamieGoodson commented Nov 15, 2023

@QvQQ This solution worked for me, thanks! For those wondering, you also need to create a plugins_config.yaml and bind it to the docker container in order to actually enable the plugins.

docker-compose.yaml:

version: "3.9"
services:
  auto-gpt:
    image: significantgravitas/auto-gpt
    env_file:
      - .env
    profiles: ["exclude-from-up"]
    volumes:
      - ./auto_gpt_workspace:/app/auto_gpt_workspace
      - ./data:/app/data
      - ./logs:/app/logs ## allow auto-gpt to write logs to disk
      - ./plugins:/app/plugins
      - type: bind
        source: ./plugins_config.yaml
        target: /app/plugins_config.yaml

plugins_config.yaml (in the root of your AutoGPT project folder):

AutoGPTBingSearch:
  config: {}
  enabled: true
# Add more plugins here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

8 participants