-
Notifications
You must be signed in to change notification settings - Fork 44.6k
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
Could not run the script in a container. #2640
Comments
@cheungcn it is designed to execute python file inside a Docker container. This helps makes sure that it doesn't perform any malicious activities on the host machine. For now, please install Docker and try again |
Should I run the autogpt within the docker? or just install it |
Just install Docker. Or Docker Desktop.
…On Thu, Apr 20, 2023, 5:24 PM cheungcn ***@***.***> wrote:
@cheungcn <https://github.com/cheungcn> it is designed to execute python
file inside a Docker container. This helps makes sure that it doesn't
perform any malicious activities on the host machine. For now, please
install Docker and try again
Should I run the autogpt within the docker? or just install it
—
Reply to this email directly, view it on GitHub
<#2640 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHNELLINR633KPSZIMUIS3XCD6EXANCNFSM6AAAAAAXFE7R6I>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Did you manage to find a fix for this? I have docker desktop installed and i still can't get this working |
Is docker desktop running fine? Sometimes you need to edit BIOS settings / enable hyper-v. |
I am getting same error. Wouldn't you need to create a dockerfile, I don't think it is enough to just have docker installed, but must create an actual VM with it in some directory, such as in |
Is there an alternative if Docker does not work on our Desktop? The installation is hilariously messed up. |
I'm having the same issue on macOS with Docker installed and working as expected. |
+1 |
+1 |
ok, brief update: on ubuntu dockers needs sudo. forgot i always make my user super-duper-auto-sudoer, just do it and don't ask questions. so, the auto-gpt process maybe cannot/is not aware that needs sudo perms? and on windows could be an admin perms issue? |
that is probably something that should be added to the README.md file and/or at least shown during startup if the system is ubuntu based ? |
any way to fix it? i have docker installed. |
post your version etc - can you run docker yourself (permissions) ? |
I have a clean installation of ubuntu server 22, installed everything according to the site:
Everything works except the chrome browser (I think "google" works) and python script execution due to "no docker" https://i.ibb.co/Pxd2pqd/Capture.png |
I'm in a similar scenario, I have autogpt installed with ubuntu on a virtual box VM, yet it still demands I use docker even within the virtual environment in order to execute python scripts. Anyone know how to avoid this in this case? |
i think the culprit is: https://github.com/Significant-Gravitas/Auto-GPT/blob/master/autogpt/commands/execute_code.py#L16 it just always uses a docker to run code. no option for a direct OS/bash call. what happens if the agent is already running in a container? or if i build a box just for auto-gpt and care not about the security, and actually want the agent to run and modify stuff in the (sand)box where it lives? imo, these security options should be expected closer to v1.0.... for now let's run fast and break stuff... ;) |
Also see: #3884 the analysis is correct, but it would only be ~5-10 lines of code to make this behavior optional and allow people to opt out using an env variable - the basic idea can be seen here: #4016 For a working implementation, refer to: #3713
just run: $ sudo python -m autogpt :-) |
I already lost which version of autogpt is correct. I set up a clean system again yesterday, in docker installed version v0.3.0 using docker compose. Same errors. --speak does not work and disables autogp on startup. Python scripts that autogpt creates do not work. after several operations autogpt stops working completely. Has it ever worked for anyone? |
try it then without the TTS for starters and then take it from there. (yes, working mostly fine here) |
Without speak, of course it "works". I can enter instructions and start the bot's work. However, after a few operations, the bot starts creating .py files that it can't use and throws it to the console. Maybe something is missing in the system? I checked the documentation and there is no such information. It doesn't matter if auto-gpt is installed in docker or directly on the system with pip. |
if you cannot execute python scripts, you are not using docker. That's explicitly mentioned in the docs, and also in the error message. You can always enable execution of shell commands and then use that method to run your python stuff |
Thanks, I'll have to start my own issue later. |
I also struggled with this issue, but I may have found a clue to the solution. Either of the following steps allowed me to write and reflect the data. (1) : Execute "docker run -it docker.io/ceramicwhite/auto-gpt" with PowerShell running as an administrator to start "localhost:3000". I believe step (2) might be the cause, but I'm not entirely sure. |
The project is functional, but it has numerous errors that prevent any meaningful use of the tool. However, the concept itself is fine. |
Even if Docker is installed, if it isn't running, AutoGPT doesn't figure that out. Run a "docker stats" to validate that the daemon is up. |
Have you ever contemplated that numerous users, akin to myself, might attempt to use auto-GPT in a remote IDE environment where Docker installation is fundamentally unfeasible? |
sabr-p wrote... if i build a box just for auto-gpt and care not about the security, and actually want the agent to run and modify stuff in the (sand)box where it lives? Amen! This is exactly my situation. I built a box specifically for auto-gpt; I don't run it on my daily driver. as Boostrix suggested, I should be allowed to opt out of using docker via an env variable. |
it would not be difficult to edit the command system accordingly, I would still suggest you use a dedicated autogpt user account to ensure that it cannot tinker with your your main user account, let alone with being root/admin. the docker related security measures involving python execution are rather self-contained and obvious if you open the file, so can be disabled easily, I would still suggest to only do do so if the current $USER is named "autogpt" |
I got over this error by adding my current user to the
|
This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days. |
This issue was closed automatically because it has been stale for 10 days with no activity. |
This is not an issue with Docker being installed, when you allow AutoGPT to run commands on the system it doesn't know it's not "in" python so in Linux you will issue a directive to the AutoGPT instance to call scripts in the workspace with 'bash -c' I reported this as a bug to improve the message behavior, people here talking about running the module with sudo or installing docker. This particular issue was on Windows, the AutoGPT instance probably just needed to call the script "correctly" for a Windows/Python shell instance? |
Which Operating System are you using?
Windows
GPT-3 or GPT-4?
GPT-3.5
Steps to reproduce 🕹
I just tried using autogpt to write me a python script which prints "Hello"
I ran the autogpt in python and it does write me a script in the folder "auto_gpt_workspace"
However, when autogpt tried to verify the script by running it.
It pops out the error
"Could not run the script in a container. If you haven't already, please install Docker https://docs.docker.com/get-docker/"
And then it starts looping again and again.
Is there anything I should set? I have already installed docker. Is using gpt3.5 a problem for this?
Current behavior 😯
REASONING: The 'search_files' command returned the 'hello.py' file, indicating that the file was saved correctly. I can now execute the file using the 'execute_python_file' command.
PLAN:
CRITICISM: I need to ensure that the file is executed correctly and that there are no syntax errors in the script.
NEXT ACTION: COMMAND = execute_python_file ARGUMENTS = {'file': 'hello.py'}
Executing file 'hello.py' in workspace 'F:\Prgramming\AI\AutoGPT\Auto-GPT\auto_gpt_workspace'
Could not run the script in a container. If you haven't already, please install Docker https://docs.docker.com/get-docker/
SYSTEM: Command execute_python_file returned: Error: Error while fetching server API version: (2, 'CreateFile', 'The system cannot find the file specified.')
You can read more here: https://github.com/Significant-Gravitas/Auto-GPT#openai-api-keys-configuration
Expected behavior 🤔
I expect it runs just fine
Your prompt 📝
ai_goals:
ai_name: Maven
ai_role: python writing AI
Your Logs 📒
activity.log
The text was updated successfully, but these errors were encountered: