Disable bytecode generation for python execution commands

This commit is contained in:
Reinier van der Leer
2023-08-25 02:15:38 +02:00
parent 1f3db55ee8
commit 3c48c4a2d6

View File

@@ -122,7 +122,7 @@ def execute_python_file(filename: Path, agent: Agent) -> str:
f"Auto-GPT is running in a Docker container; executing {file_path} directly..."
)
result = subprocess.run(
["python", str(file_path)],
["python", "-B", str(file_path)],
capture_output=True,
encoding="utf8",
cwd=agent.config.workspace_path,
@@ -162,6 +162,7 @@ def execute_python_file(filename: Path, agent: Agent) -> str:
image_name,
[
"python",
"-B",
file_path.relative_to(agent.workspace.root).as_posix(),
],
volumes={