AutoGPT: Unable to run built docker container: No module named autogpt
Duplicates
- I have searched the existing issues
Steps to reproduce š¹
Docker buidl goes perfectly fine, albeit with a lot of warningā¦
docker run -it --env-file=./.env -v ~/auto_gpt_workspace:/app/auto_gpt_workspace autogpt
gives back:
/usr/local/bin/python: No module named autogpt
I have followed the README exactly. This is a checked out master from some minutes ago.
Current behavior šÆ
/usr/local/bin/python: No module named autogpt
Expected behavior š¤
It should just run, right?
Your prompt š
# Paste your prompt here
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 33 (11 by maintainers)
Commits related to this issue
- this addresses the issues mentioned in #1513 — committed to ppetermann/Auto-GPT by ppetermann a year ago
For anyone that comes next and is using MacOS:
At the terminal:
cd Documents/GitHub/git clone -b stable https://github.com/Significant-Gravitas/Auto-GPT.gitcd Auto-GPTDockerfile, located at the top of the the new Auto-GPT directory, directly belowONBUILD COPY autogpt/ ./autogpt:NBUILD COPY scripts/ ./scriptsONBUILD COPY plugins/ ./pluginsOPENAI_API_KEYin the .env.template file.env.templateto.env:cp .env.template .envdocker compose build auto-gptNOTE: mac does not usedocker-composesyntaxdocker compose run --rm auto-gptNOTE: mac does not usedocker-composesyntaxAgain I appreciate your help. Iāll take a look at these resources. My feedback would just be that the āSetup with dockerā documentation here https://docs.agpt.co/setup/#set-up-with-docker is a bit misleading. It works for v0.2.2 but not 0.3. Most likely due to the fact that 0.2.2 was using other paths as you mentioned. It would be great if the documentation were updated, or at least a warning added that they will only work for 0.2.2 without additional undocumented steps.
The fix is on the way with #1425
Iām working on an update, just not something that appears of thin air š
https://github.com/ppetermann/Auto-GPT-DockerSetup this is the setup Iām running, which is a bit more complex, but it works, however there might be some pre-existing docker-knowledge required
Okay thanks for looking and the quick responses.
What do you suggest that we do to run in docker with 0.3 on windows? Iām not sure what you mean by āthe scripts error is related to the production build not including scripts because it assumes you have the folder mountedā or how I should go about resolving that issue. Is there a valid docker-compose that we could reference?
Maybe this requires a documentation fix. I am following the guide here https://docs.agpt.co/setup/#run-with-docker
It explicitly says to create a docker-compose file with the mount. But based on your explanation it should not.
However the container still fails with a ModuleNotFoundError when I am not mounting the volume.
I reverted from 0.3 to 0.2.2 and it works. Didnāt really dig in much past that, but might be worth somebody checking that the fix didnāt get reverted in this new releaseā¦
Thanks for catching that, we should probably remove the volume mount from that template
docker-compose.ymlIt looks like someone has a pull request in to fix this already #3706 I can build an image locally and run .0.3.0 by adding the additional two lines from that pull request to the dockerfile. That should get me by until itās merged and the dockerhub image is updated.
Didnāt mean to offend with the documentation comment. I know you guys have your hands full. Just trying to provide constructive feedback.