Auto-GPT-Plugins icon indicating copy to clipboard operation
Auto-GPT-Plugins copied to clipboard

Instructions for plugin install with docker

Open benjamincommeau2 opened this issue 1 year ago • 9 comments

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.

benjamincommeau2 avatar May 28 '23 22:05 benjamincommeau2

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

Lrennard avatar May 29 '23 07:05 Lrennard

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.

benjamincommeau2 avatar May 29 '23 19:05 benjamincommeau2

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.

Lrennard avatar May 29 '23 20:05 Lrennard

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.

miheerwa avatar May 30 '23 08:05 miheerwa

@benjamincommeau2 did this work?

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

lc0rp avatar May 31 '23 05:05 lc0rp

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.

h4ck3rk3y avatar Jun 13 '23 13:06 h4ck3rk3y

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

QvQQ avatar Jul 29 '23 15:07 QvQQ

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?

Kozyge avatar Oct 26 '23 00:10 Kozyge

@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

JamieGoodson avatar Nov 15 '23 14:11 JamieGoodson