AutoGPT
AutoGPT copied to clipboard
Improve docker setup & config
Background
The current Dockerfile and docker-compose file seem to have unnecessary convolution of configuration and don't contain an optimal configuration out of the box. Also, it is not consistent with the README. This PR attempts to fix that.
This PR either conflicts with or deprecates PRs #1843, #1830 and #1199
Changes
- Merge
apt-getactions into one layer - Uncouple app user and python dependencies: install packages globally instead of in
/home/appuser - Create
appuserwith UID 1000 to match probable permissions on Linux host - Change workdir to
/app(as documented in the README) which is a widely used standard, making it easier to work with for new users - Improve/fix
docker-composeconfig- Use Redis container as memory backend by default
- Remove unused (and after this PR, redundant) volume mount to
/app - Mount
./logs/,./auto_gpt_workspace/and./ai_settings.yamlin/app
Documentation
New configuration is consistent with current configuration; no update needed.
Test Plan
No Python code is changed, so testing succeeds if the container builds and runs properly after these changes, which it does.
PR Quality Checklist
- [x] My pull request is atomic and focuses on a single change. (as far as I understand this checkbox)
- [x] I have thoroughly tested my changes with multiple different prompts.
- [x] I have considered potential risks and mitigations for my changes.
- [x] I have documented my changes clearly and comprehensively.
- [x] I have not snuck in any "extra" small tweaks changes
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.
May be worth adding Chrome for selenium in docker to the compose file
https://hub.docker.com/r/selenium/standalone-chrome/
See here for examples
https://github.com/SeleniumHQ/docker-selenium
@ntindle currently, Chrome and Firefox along with some other tools are installed in the docker container, see Dockerfile. I'm not convinced this is the way, but also don't have time to dive into it further atm.
Do you think it is worth it to use standalone selenium containers instead of running headless browsers in the auto-gpt container?
IMO using the selenium headless versions with their drivers makes a lot of sense. Otherwise we’d basically need to duplicate the work they’ve done and will continue to do when things change
Could you make a PR to implement that as soon as this one merges? Would be nice :)
Can do
@mikekelly care to review?
Quite a bit of this is covering ground from https://github.com/Significant-Gravitas/Auto-GPT/pull/1199 and will conflict with it
I don't see the purpose in creating a PR that "deprecates" a PR that precedes it, why not simply provide feedback on an existing PR that is waiting to be merged?
I don't see the purpose in creating a PR that "deprecates" a PR that precedes it, why not simply provide feedback on an existing PR that is waiting to be merged?
Because I didn't know about your PR, and submitted it before becoming as actively involved as I am now. We're working on combing through all open PRs, but I hadn't gotten to yours yet.
I wish I had searched better, because now I'm facing a mountain of PRs and issues many of which are also duplicate. :')
Closing in favor of #1199
Reopening since #1199 isn't being updated
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.
Codecov Report
Patch coverage has no change and project coverage change: -7.78 :warning:
Comparison is base (
794a164) 49.40% compared to head (01c662e) 41.62%.
Additional details and impacted files
@@ Coverage Diff @@
## master #1843 +/- ##
==========================================
- Coverage 49.40% 41.62% -7.78%
==========================================
Files 63 64 +1
Lines 3004 3022 +18
Branches 494 505 +11
==========================================
- Hits 1484 1258 -226
- Misses 1400 1699 +299
+ Partials 120 65 -55
| Impacted Files | Coverage Δ | |
|---|---|---|
| autogpt/commands/web_selenium.py | 0.00% <0.00%> (ø) |
... and 17 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
This combined with a smoke test of the docker container in CI would be top notch
@ntindle this PR fixes docker; a draft for a smoke test job is in #3059