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

prompt_settings.yaml cant be found?? #4598

Closed
1 task done
FreddzieAI opened this issue Jun 6, 2023 · 22 comments
Closed
1 task done

prompt_settings.yaml cant be found?? #4598

FreddzieAI opened this issue Jun 6, 2023 · 22 comments
Labels
bug Something isn't working docker function: config

Comments

@FreddzieAI
Copy link

⚠️ Search for existing issues first ⚠️

  • I have searched the existing issues, and there is no existing issue for my problem

Which Operating System are you using?

Docker

Which version of Auto-GPT are you using?

Latest Release

Do you use OpenAI GPT-3 or GPT-4?

GPT-4

Which area covers your issue best?

Installation and setup

Describe your issue.

image

this error pops up even tho i have the file

Upload Activity Log Content

No response

Upload Error Log Content

No response

@FreddzieAI
Copy link
Author

i can use this command as a work arround but is there a way to not have to do this
docker-compose run --rm -v /home/Freddie_Test-7/Auto-GPT-0.4.0/prompt_settings.yaml:/app/prompt_settings.yaml auto-gpt

@TsundokuJim
Copy link

TsundokuJim commented Jun 6, 2023

Same issue, also using Docker. The prompt_settings.yaml file is sitting in the main Auto-GPT-0.4.0 directory and contains the usual constraints, resources, and performance eval settings, yet auto-gpt can't find it. It's correctly identified by Windows as a yaml source file and isn't tagged as read-only or otherwise restricted.

@maxfield-allison
Copy link

maxfield-allison commented Jun 6, 2023

same issue on linux in docker. Mounting as a volume does get around the issue

@ericflecher
Copy link

Same issue

@Naetmul
Copy link

Naetmul commented Jun 7, 2023

I'm currently running WSL2 Docker on a Windows system.

I took the prompt_settings.yaml file from the repository and moved it to the Auto-GPT folder, the same place where the .env file is located. After that, I added the line - ./prompt_settings.yaml:/app/prompt_settings.yaml under the volumes: section in the docker-compose.yml file.

version: "3.9"
services:
  auto-gpt:
    image: significantgravitas/auto-gpt
    env_file:
      - .env
    profiles: ["exclude-from-up"]
    volumes:
      - ./auto_gpt_workspace:/app/autogpt/auto_gpt_workspace
      - ./data:/app/data
      - ./logs:/app/logs
      - ./prompt_settings.yaml:/app/prompt_settings.yaml

Following these modifications, I ran the command docker-compose build auto-gpt. It works after these steps.

I don't know if it works properly in version 0.4.0 though.

@playfluent
Copy link

this was able to fix my issue running Docker on MacOS

@hugh-min
Copy link

hugh-min commented Jun 7, 2023

same issue on Windows Docker

@ccdanpian
Copy link

I had the same problem when using docker pull.
You can try to git clone to the local, just modify the .env, then execute docker-compose build and run docker-compose run

@lc0rp lc0rp added bug Something isn't working function: config docker labels Jun 8, 2023
@Wemmons831
Copy link

I'm currently running WSL2 Docker on a Windows system.

I took the prompt_settings.yaml file from the repository and moved it to the Auto-GPT folder, the same place where the .env file is located. After that, I added the line - ./prompt_settings.yaml:/app/prompt_settings.yaml under the volumes: section in the docker-compose.yml file.

version: "3.9"
services:
  auto-gpt:
    image: significantgravitas/auto-gpt
    env_file:
      - .env
    profiles: ["exclude-from-up"]
    volumes:
      - ./auto_gpt_workspace:/app/autogpt/auto_gpt_workspace
      - ./data:/app/data
      - ./logs:/app/logs
      - ./prompt_settings.yaml:/app/prompt_settings.yaml

Following these modifications, I ran the command docker-compose build auto-gpt. It works after these steps.

I don't know if it works properly in version 0.4.0 though.

Following these steps I get the error
IsADirectoryError: [Errno 21] Is a directory: 'prompt_settings.yaml'
Windows 11 with docker

@interterror
Copy link

At first, I was cheering for the guy, but now ... after seeing this bloody mess. I wish someone up to the task took over.

@ccdanpian
Copy link

I think the problem may be that the docker image and the code version downloaded from git are not consistent. The easiest way is not to use docker pull to pull the image from the server, git clone it directly to local, don’t need to modify the docker-compose.yml.
this method works on both of my computers

step1: git clone -b stable https://github.com/Significant-Gravitas/Auto-GPT.git
don't modify docker-compose.yml, just goto step2
setp2: cd Auto-GPT
step3: modify the .env
step4: docker-compose build auto-gpt
step5: docker-compose run --rm auto-gpt

@ZaneStanutz
Copy link

docker image seems to be broken for me as well .. github repo worked fine. thx @ccdanpian !

@cap273
Copy link

cap273 commented Jun 12, 2023

Docker image was also broken for me. Thank you @ccdanpian !

@jonasdebeukelaer
Copy link

Same thing here. I've got a custom docker image I've created, and trying to copy the file I get a error as docker can't seem to see the file, which is very strange. Logs in case this helps debug.

 => CACHED [autogpt-release 2/4] RUN pip install pymilvus==2.2.8                                                                                                                                                                                                     
 => CACHED [autogpt-release 3/4] RUN sed -i '/Items below this point will not be included in the Docker Image/,$d' requirements.txt &&  pip install --no-cache-dir -r requirements.txt                                                  
 => CACHED [autogpt-release 4/4] WORKDIR /app                                                                                                                                                                                                                       
 => CACHED [auto-gpt 1/2] COPY autogpt ./autogpt                                                                                                                                                                                                                     
 => CACHED [auto-gpt 2/2] COPY scripts ./scripts                                                                                                                                                                                                
 => CACHED [auto-gpt 3/2] COPY plugins ./plugins                                                                                                                                                                                                              
 => CACHED [auto-gpt 4/2] COPY chrome_settings ./chrome_settings                                                                                                                                                                                                     
 => ERROR [auto-gpt 5/2] COPY prompt_settings.yaml .                                                                                                                                                                                                                 
------
 > [auto-gpt 5/2] COPY prompt_settings.yaml .:
------
Dockerfile.heroku:1
--------------------
   1 | >>> # Use an official Python base image from the Docker Hub
   2 |     FROM python:3.10-slim AS autogpt-base
   3 |     
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref moby::txcbjadsz8vmnyi3gv2yp5c4c: "/prompt_settings.yaml": not found

@lmsanch
Copy link

lmsanch commented Jun 13, 2023

I ran auto locally on my M2 mac, and also using a Docker container using the solution of @ccdanpian above and using the stable release here https://github.com/Significant-Gravitas/Auto-GPT/releases/tag/v0.4.0
In both cases, I get this:

Using memory of type:  JSONFileMemory
Using Browser:  chrome
FAILED FILE VALIDATION  The file `prompt_settings.yaml` wasn't found
DOUBLE CHECK CONFIGURATION  Please ensure you've setup and configured everything correctly. Read https://github.com/Torantulino/Auto-GPT#readme to double check. You can also create a github issue or join the discord and ask there!

Any help?

@ccdanpian
Copy link

@lmsanch
Sorry, I don’t have a Mac, so I haven’t tried it on a Mac. The following configuration also works well ok on my win11 computer.
Please try edit your docker-compose.yml follow the attached file, and try again.
docker-compose.zip

@lmsanch
Copy link

lmsanch commented Jun 14, 2023

@ccdanpian I used that file and replicated the whole thing. This is what I get:

Using memory of type:  JSONFileMemory
Using Browser:  chrome
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/app/autogpt/__main__.py", line 5, in <module>
    autogpt.cli.main()
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1635, in invoke
    rv = super().invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/app/autogpt/cli.py", line 96, in main
    run_auto_gpt(
  File "/app/autogpt/main.py", line 183, in run_auto_gpt
    system_prompt = ai_config.construct_full_prompt()
  File "/app/autogpt/config/ai_config.py", line 141, in construct_full_prompt
    prompt_generator = build_default_prompt_generator()
  File "/app/autogpt/prompts/prompt.py", line 32, in build_default_prompt_generator
    prompt_config = PromptConfig(CFG.prompt_settings_file)
  File "/app/autogpt/config/prompt_config.py", line 42, in __init__
    (validated, message) = utils.validate_yaml_file(config_file)
  File "/app/autogpt/utils.py", line 65, in validate_yaml_file
    with open(file, encoding="utf-8") as fp:
IsADirectoryError: [Errno 21] Is a directory: 'prompt_settings.yaml'

For some reason, in the build, prompt_settings.yaml is not a file, but a directory. I erased that directory and duplicated prompt_settings.yaml and placed it in the same dir where .env is. It is working now. Thanks!

@ccdanpian
Copy link

@lmsanch
I guess there should be a folder named prompt_settings.yaml in your Auto-GPT root directory. Please delete it. Check if there is a file named prompt_settings.yaml. If not, please extract the attached file and put it in the root directory. Then try again, but do not run the command “docker-compose build auto-gpt”.

setp1: cd Auto-GPT
step2: docker pull significantgravitas/auto-gpt
step3: modify the .env
step4: add the 2 files: prompt_settings.yaml, docker-compose.yml
step5: docker-compose run --rm auto-gpt

prompt_settings.zip

@ccdanpian
Copy link

@lmsanch
I see that there is already an FR#4680 to fix this bug, so it should be working normally soon.

@dsdnklasmals
Copy link

docker image seems to be broken for me as well .. github repo worked fine. thx @ccdanpian !

Docker的形象对我来说似乎也被打破了。GitHub Repo运行良好。thx @ccdanpian

docker 是我这辈子用过最垃圾的东西 没有之一!!!

@ntindle
Copy link
Member

ntindle commented Jun 16, 2023

Fixed by #4680

@ntindle ntindle closed this as completed Jun 16, 2023
@Luckiluciano
Copy link

ccdanpian

I am not a developer. I am simply an enthusiast. I compiled all the possible solutions including, the one's outside of this thread and fed it to ChatGPT. ChatGPT stated that this one is the best solution. After a clean wipe, I followed these instructions and had a succesful install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docker function: config
Projects
None yet
Development

No branches or pull requests