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 example volumes #3875

Closed

Conversation

montanaflynn
Copy link
Contributor

@montanaflynn montanaflynn commented May 6, 2023

  1. The auto_gpt_workspace is created in the docker container inside /app/autogpt/auto_gpt_workspace and not /app/auto_gpt_workspace, so it was not being correctly synced from host to container.

  2. Docker compose does not allow single file volumes, uncommenting the lines removed in this PR would cause a directory to be created and the error:

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 90, in main
    run_auto_gpt(
  File "/app/autogpt/main.py", line 135, in run_auto_gpt
    ai_config = construct_main_ai_config()
  File "/app/autogpt/prompts/prompt.py", line 88, in construct_main_ai_config
    config = AIConfig.load(CFG.ai_settings_file)
  File "/app/autogpt/config/ai_config.py", line 75, in load
    with open(config_file, encoding="utf-8") as file:
IsADirectoryError: [Errno 21] Is a directory: 'ai_settings.yaml'

Background

Changes

Documentation

Test Plan

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes

1. The `auto_gpt_workspace` is created in the docker container inside `/app/autogpt/auto_gpt_workspace` and not `/app/auto_gpt_workspace`, so it was not being correctly synced from host to container.

2. Docker compose does not allow single file volumes, uncommenting the lines removed in this PR would cause a directory to be created and the error:

```
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 90, in main
    run_auto_gpt(
  File "/app/autogpt/main.py", line 135, in run_auto_gpt
    ai_config = construct_main_ai_config()
  File "/app/autogpt/prompts/prompt.py", line 88, in construct_main_ai_config
    config = AIConfig.load(CFG.ai_settings_file)
  File "/app/autogpt/config/ai_config.py", line 75, in load
    with open(config_file, encoding="utf-8") as file:
IsADirectoryError: [Errno 21] Is a directory: 'ai_settings.yaml'
```
@vercel
Copy link

vercel bot commented May 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2023 1:58am

@github-actions github-actions bot added the size/s label May 6, 2023
@vercel vercel bot temporarily deployed to Preview May 6, 2023 01:58 Inactive
@codecov
Copy link

codecov bot commented May 6, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (d184d0d) 60.92% compared to head (972054e) 60.92%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3875   +/-   ##
=======================================
  Coverage   60.92%   60.92%           
=======================================
  Files          72       72           
  Lines        3304     3304           
  Branches      542      542           
=======================================
  Hits         2013     2013           
  Misses       1152     1152           
  Partials      139      139           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@montanaflynn
Copy link
Contributor Author

@ntindle @richbeales I understand there's a hold on merging PRs during the code rework, but this doesn't change any code and fixes the suggested usage instructions, which is causing lots of problems and questions in discord for new users.

Screenshot 2023-05-07 at 10 20 48 AM

@Boostrix
Copy link
Contributor

Boostrix commented May 7, 2023

yes, this being a non-code PR and one that is blocking other potential contributor from using the system, it should definitely be considered for review/integration despite the ongoing re-arch effort

@k-boikov
Copy link
Contributor

Already fixed with another PR. Sorry.

@k-boikov k-boikov closed this May 12, 2023
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 size/s
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants