Significant-Gravitas / Auto-GPT-Plugins

Plugins for Auto-GPT
MIT License
3.9k stars 568 forks source link

Instructions for plugin install with docker #185

Open benjamincommeau2 opened 1 year ago

benjamincommeau2 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@benjamincommeau2 did this work?

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

h4ck3rk3y commented 1 year ago

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 commented 11 months ago

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 commented 8 months ago

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 commented 8 months ago

@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