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

[Bug]: Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1) #3169

Closed
2 tasks done
JamDon2 opened this issue Jul 29, 2024 · 33 comments · Fixed by #3381, #3390, #3426 or #3427
Closed
2 tasks done
Labels
bug Something isn't working severity:critical Affecting all users

Comments

@JamDon2
Copy link

JamDon2 commented Jul 29, 2024

Is there an existing issue for the same bug?

Describe the bug

I am running OpenDevin with Docker Compose, and there is no sandbox container present, so the SSH fails. What could cause this?

I am running Docker 27.1.1 on Ubuntu 22.04

Current OpenDevin version

ghcr.io/opendevin/opendevin:main

Installation and Configuration

opendevin:
  container_name: opendevin
  image: ghcr.io/opendevin/opendevin:main
  restart: unless-stopped
  environment:
    - SANDBOX_USER_ID=1001
    - LLM_API_KEY=ollama
    - LLM_BASE_URL=http://ollama:11434
    - LLM_OLLAMA_BASE_URL=http://ollama11434
    - WORKSPACE_MOUNT_PATH=/workspace
  volumes:
    - ../agent-workspace:/workspace
    - /var/run/docker.sock:/var/run/docker.sock
  expose:
    - 3000

Model and Agent

No response

Operating System

Ubuntu 22.04 on ARM

Reproduction Steps

No response

Logs, Errors, Screenshots, and Additional Context

opendevin  | 15:57:40 - opendevin:INFO: agent.py:79 - Using runtime: server
opendevin  | 15:57:40 - opendevin:INFO: ssh_box.py:135 - SSHBox is running as opendevin user with USER_ID=1001 in the sandbox
opendevin  | 15:57:40 - opendevin:INFO: ssh_box.py:178 - Detected initial session.
opendevin  | 15:57:40 - opendevin:INFO: ssh_box.py:180 - Creating new Docker container
opendevin  | 15:57:40 - opendevin:WARNING: ssh_box.py:578 - Using port forwarding till the enable host network mode of Docker is out of experimental mode.Check the 897th issue on https://github.com/OpenDevin/OpenDevin/issues/ for more information.
opendevin  | 15:57:40 - opendevin:INFO: ssh_box.py:586 - Mounting volumes: {'/workspace': {'bind': '/workspace', 'mode': 'rw'}, '/tmp/cache': {'bind': '/home/opendevin/.cache', 'mode': 'rw'}}
opendevin  | 15:57:41 - opendevin:INFO: ssh_box.py:597 - Container started
opendevin  | 15:57:42 - opendevin:INFO: ssh_box.py:613 - waiting for container to start: 1, container status: running
opendevin  | 15:57:43 - opendevin:INFO: ssh_box.py:342 - Connecting to SSH session...
opendevin  | 15:57:43 - opendevin:INFO: ssh_box.py:345 - You can debug the SSH connection by running: `ssh -v -p 39925 opendevin@localhost` using the password '7b412924-7db9-43bd-9e19-9bba89e1bd7a'
opendevin  | 15:57:43 - opendevin:ERROR: ssh_box.py:351 - Failed to login to SSH session, retrying...
opendevin  | 15:57:48 - opendevin:INFO: ssh_box.py:342 - Connecting to SSH session...
opendevin  | 15:57:48 - opendevin:INFO: ssh_box.py:345 - You can debug the SSH connection by running: `ssh -v -p 39925 opendevin@localhost` using the password '7b412924-7db9-43bd-9e19-9bba89e1bd7a'
opendevin  | 15:57:48 - opendevin:ERROR: ssh_box.py:351 - Failed to login to SSH session, retrying...
opendevin  | 15:57:53 - opendevin:INFO: ssh_box.py:342 - Connecting to SSH session...
opendevin  | 15:57:53 - opendevin:INFO: ssh_box.py:345 - You can debug the SSH connection by running: `ssh -v -p 39925 opendevin@localhost` using the password '7b412924-7db9-43bd-9e19-9bba89e1bd7a'
opendevin  | 15:57:54 - opendevin:ERROR: ssh_box.py:351 - Failed to login to SSH session, retrying...
opendevin  | 15:57:59 - opendevin:INFO: ssh_box.py:342 - Connecting to SSH session...
opendevin  | 15:57:59 - opendevin:INFO: ssh_box.py:345 - You can debug the SSH connection by running: `ssh -v -p 39925 opendevin@localhost` using the password '7b412924-7db9-43bd-9e19-9bba89e1bd7a'
opendevin  | 15:57:59 - opendevin:ERROR: ssh_box.py:351 - Failed to login to SSH session, retrying...
opendevin  | 15:58:04 - opendevin:INFO: ssh_box.py:342 - Connecting to SSH session...
opendevin  | 15:58:04 - opendevin:INFO: ssh_box.py:345 - You can debug the SSH connection by running: `ssh -v -p 39925 opendevin@localhost` using the password '7b412924-7db9-43bd-9e19-9bba89e1bd7a'
opendevin  | 15:58:04 - opendevin:ERROR: ssh_box.py:351 - Failed to login to SSH session, retrying...
opendevin  | 15:58:04 - opendevin:ERROR: session.py:116 - Error creating controller: RetryError[<Future at 0xf20b3eb1ed20 state=finished raised ExceptionPxssh>]
opendevin  | Traceback (most recent call last):
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 478, in __call__
opendevin  |     result = fn(*args, **kwargs)
opendevin  |              ^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/docker/ssh_box.py", line 354, in __ssh_login
opendevin  |     raise e
opendevin  |   File "/app/opendevin/runtime/docker/ssh_box.py", line 348, in __ssh_login
opendevin  |     self.ssh.login(hostname, username, self._ssh_password, port=self._ssh_port)
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/pexpect/pxssh.py", line 424, in login
opendevin  |     raise ExceptionPxssh('Could not establish connection to host')
opendevin  | pexpect.pxssh.ExceptionPxssh: Could not establish connection to host
opendevin  | 
opendevin  | The above exception was the direct cause of the following exception:
opendevin  | 
opendevin  | Traceback (most recent call last):
opendevin  |   File "/app/opendevin/server/session/session.py", line 106, in _initialize_agent
opendevin  |     await self.agent_session.start(
opendevin  |   File "/app/opendevin/server/session/agent.py", line 54, in start
opendevin  |     await self._create_runtime(runtime_name, config)
opendevin  |   File "/app/opendevin/server/session/agent.py", line 81, in _create_runtime
opendevin  |     self.runtime = runtime_cls(
opendevin  |                    ^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/server/runtime.py", line 48, in __init__
opendevin  |     self.sandbox = self.create_sandbox(sid, config.sandbox.box_type)
opendevin  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/server/runtime.py", line 61, in create_sandbox
opendevin  |     return DockerSSHBox(
opendevin  |            ^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/docker/ssh_box.py", line 203, in __init__
opendevin  |     raise e
opendevin  |   File "/app/opendevin/runtime/docker/ssh_box.py", line 200, in __init__
opendevin  |     self.start_ssh_session()
opendevin  |   File "/app/opendevin/runtime/docker/ssh_box.py", line 358, in start_ssh_session
opendevin  |     self.__ssh_login()
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 336, in wrapped_f
opendevin  |     return copy(f, *args, **kw)
opendevin  |            ^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 475, in __call__
opendevin  |     do = self.iter(retry_state=retry_state)
opendevin  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 376, in iter
opendevin  |     result = action(retry_state)
opendevin  |              ^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/tenacity/__init__.py", line 419, in exc_check
opendevin  |     raise retry_exc from fut.exception()
opendevin  | tenacity.RetryError: RetryError[<Future at 0xf20b3eb1ed20 state=finished raised ExceptionPxssh>]
@JamDon2 JamDon2 added the bug Something isn't working label Jul 29, 2024
@dosubot dosubot bot added the severity:medium Affecting multiple users label Jul 29, 2024
@mamoodi mamoodi added severity:low Minor issues, affecting single user and removed severity:medium Affecting multiple users labels Jul 29, 2024
@neubig
Copy link
Contributor

neubig commented Aug 9, 2024

Hi @JamDon2 , similarly to the previous issue, this should be fixed by our new Event Stream runtime. Please take another look.

@neubig neubig closed this as completed Aug 9, 2024
@JamDon2
Copy link
Author

JamDon2 commented Aug 9, 2024

@neubig Unfortunately there is now a different error. Here is the log:

opendevin  | Starting OpenDevin...
opendevin  | Setting up enduser with id 1001
opendevin  | Docker socket group id: 999
opendevin  | systemd-journal:x:999:
opendevin  | Group with id 999 already exists
opendevin  | Running as enduser
opendevin  | INFO:     Started server process [36]
opendevin  | INFO:     Waiting for application startup.
opendevin  | INFO:     Application startup complete.
opendevin  | INFO:     Uvicorn running on http://0.0.0.0:3000 (Press CTRL+C to quit)
opendevin  | INFO:     ('172.18.0.12', 37882) - "WebSocket /ws?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWQiOiIyOWU3MWU5Mi1kODIyLTQyMTEtOGRlOS02ZWJlODZhNTUxMTgifQ.nScvbEbTJxzKZC_ofEy8TA9WJ15aHa9ri5hhPQEfInI&latest_event_id=1" [accepted]
opendevin  | �[92m21:42:46 - opendevin:ERROR�[0m: auth.py:27 - Invalid token
opendevin  | INFO:     connection open
opendevin  | INFO:     connection closed
opendevin  | INFO:     ('172.18.0.12', 37896) - "WebSocket /ws" [accepted]
opendevin  | INFO:     connection open
opendevin  | �[92m21:42:50 - opendevin:INFO�[0m: agent.py:78 - Using runtime: eventstream
opendevin  | �[92m21:42:50 - opendevin:INFO�[0m: runtime_build.py:34 - Using project root: /app
opendevin  | * Creating isolated environment: venv+pip...
opendevin  | * Installing packages in isolated environment:
opendevin  |   - poetry-core
opendevin  | * Getting build dependencies for sdist...
opendevin  | * Building sdist...
opendevin  | Traceback (most recent call last):
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
opendevin  |     main()
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
opendevin  |     json_out["return_val"] = hook(**hook_input["kwargs"])
opendevin  |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 326, in build_sdist
opendevin  |     return backend.build_sdist(sdist_directory, config_settings)
opendevin  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/tmp/build-env-6mzv8u0q/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 69, in build_sdist
opendevin  |     path = SdistBuilder(poetry).build(Path(sdist_directory))
opendevin  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/tmp/build-env-6mzv8u0q/lib/python3.12/site-packages/poetry/core/masonry/builders/sdist.py", line 90, in build
opendevin  |     with file.path.open("rb") as f:
opendevin  |          ^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/usr/local/lib/python3.12/pathlib.py", line 1013, in open
opendevin  |     return io.open(self, mode, buffering, encoding, errors, newline)
opendevin  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  | PermissionError: [Errno 13] Permission denied: '/app/opendevin/controller/__pycache__/__init__.cpython-312.pyc'
opendevin  | 
opendevin  | ERROR Backend subprocess exited when trying to invoke build_sdist
opendevin  | �[92m21:42:54 - opendevin:ERROR�[0m: runtime_build.py:39 - Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)
opendevin  | �[92m21:42:54 - opendevin:ERROR�[0m: session.py:116 - Error creating controller: Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)
opendevin  | Traceback (most recent call last):
opendevin  |   File "/app/opendevin/server/session/session.py", line 106, in _initialize_agent
opendevin  |     await self.agent_session.start(
opendevin  |   File "/app/opendevin/server/session/agent.py", line 53, in start
opendevin  |     await self._create_runtime(runtime_name, config, agent)
opendevin  |   File "/app/opendevin/server/session/agent.py", line 86, in _create_runtime
opendevin  |     await self.runtime.ainit()
opendevin  |   File "/app/opendevin/runtime/client/runtime.py", line 81, in ainit
opendevin  |     self.container_image = build_runtime_image(
opendevin  |                            ^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 252, in build_runtime_image
opendevin  |     from_scratch_hash = prep_docker_build_folder(
opendevin  |                         ^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 108, in prep_docker_build_folder
opendevin  |     _put_source_code_to_dir(dir_path)
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 57, in _put_source_code_to_dir
opendevin  |     tarball_path = _create_project_source_dist()
opendevin  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 40, in _create_project_source_dist
opendevin  |     raise Exception(f'Build failed: {result}')
opendevin  | Exception: Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)
opendevin  | �[92m21:44:14 - opendevin:INFO�[0m: session.py:66 - WebSocket disconnected, sid: 65d7905b-3481-41db-a7ce-4c1df52d5d35
opendevin  | INFO:     connection closed
opendevin  | INFO:     172.18.0.12:60222 - "GET / HTTP/1.1" 200 OK
opendevin  | INFO:     172.18.0.12:60230 - "GET /assets/index-BPLyMB4Y.js HTTP/1.1" 200 OK
opendevin  | INFO:     172.18.0.12:60240 - "GET /assets/index-Dadf-VsP.css HTTP/1.1" 200 OK
opendevin  | INFO:     172.18.0.12:60248 - "GET /locales/en/translation.json HTTP/1.1" 200 OK
opendevin  | INFO:     172.18.0.12:60252 - "GET /favicon-32x32.png HTTP/1.1" 200 OK
opendevin  | INFO:     172.18.0.12:60268 - "GET /apple-touch-icon.png HTTP/1.1" 200 OK
opendevin  | INFO:     172.18.0.12:60278 - "GET /api/options/models HTTP/1.1" 200 OK
opendevin  | INFO:     172.18.0.12:60286 - "GET /api/options/agents HTTP/1.1" 200 OK
opendevin  | INFO:     ('172.18.0.12', 60302) - "WebSocket /ws" [accepted]
opendevin  | INFO:     connection open
opendevin  | �[92m21:44:18 - opendevin:INFO�[0m: agent.py:78 - Using runtime: eventstream
opendevin  | �[92m21:44:18 - opendevin:INFO�[0m: runtime_build.py:34 - Using project root: /app
opendevin  | * Creating isolated environment: venv+pip...
opendevin  | * Installing packages in isolated environment:
opendevin  |   - poetry-core
opendevin  | * Getting build dependencies for sdist...
opendevin  | * Building sdist...
opendevin  | Traceback (most recent call last):
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
opendevin  |     main()
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
opendevin  |     json_out["return_val"] = hook(**hook_input["kwargs"])
opendevin  |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 326, in build_sdist
opendevin  |     return backend.build_sdist(sdist_directory, config_settings)
opendevin  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/tmp/build-env-pl_vj67a/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 69, in build_sdist
opendevin  |     path = SdistBuilder(poetry).build(Path(sdist_directory))
opendevin  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/tmp/build-env-pl_vj67a/lib/python3.12/site-packages/poetry/core/masonry/builders/sdist.py", line 90, in build
opendevin  |     with file.path.open("rb") as f:
opendevin  |          ^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/usr/local/lib/python3.12/pathlib.py", line 1013, in open
opendevin  |     return io.open(self, mode, buffering, encoding, errors, newline)
opendevin  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  | PermissionError: [Errno 13] Permission denied: '/app/opendevin/controller/__pycache__/__init__.cpython-312.pyc'
opendevin  | 
opendevin  | ERROR Backend subprocess exited when trying to invoke build_sdist
opendevin  | �[92m21:44:21 - opendevin:ERROR�[0m: runtime_build.py:39 - Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)
opendevin  | �[92m21:44:21 - opendevin:ERROR�[0m: session.py:116 - Error creating controller: Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)
opendevin  | Traceback (most recent call last):
opendevin  |   File "/app/opendevin/server/session/session.py", line 106, in _initialize_agent
opendevin  |     await self.agent_session.start(
opendevin  |   File "/app/opendevin/server/session/agent.py", line 53, in start
opendevin  |     await self._create_runtime(runtime_name, config, agent)
opendevin  |   File "/app/opendevin/server/session/agent.py", line 86, in _create_runtime
opendevin  |     await self.runtime.ainit()
opendevin  |   File "/app/opendevin/runtime/client/runtime.py", line 81, in ainit
opendevin  |     self.container_image = build_runtime_image(
opendevin  |                            ^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 252, in build_runtime_image
opendevin  |     from_scratch_hash = prep_docker_build_folder(
opendevin  |                         ^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 108, in prep_docker_build_folder
opendevin  |     _put_source_code_to_dir(dir_path)
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 57, in _put_source_code_to_dir
opendevin  |     tarball_path = _create_project_source_dist()
opendevin  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 40, in _create_project_source_dist
opendevin  |     raise Exception(f'Build failed: {result}')
opendevin  | Exception: Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)

@neubig
Copy link
Contributor

neubig commented Aug 10, 2024

Hmm, not sure what is going on, but @rbren also reported this on slack, so it seems like a consistent issue...

@neubig neubig reopened this Aug 10, 2024
@Mobuis
Copy link

Mobuis commented Aug 11, 2024

@neubig Unfortunately there is now a different error. Here is the log:

opendevin  | Starting OpenDevin...
opendevin  | Setting up enduser with id 1001
opendevin  | Docker socket group id: 999
opendevin  | systemd-journal:x:999:
opendevin  | Group with id 999 already exists
opendevin  | Running as enduser
opendevin  | INFO:     Started server process [36]
opendevin  | INFO:     Waiting for application startup.
opendevin  | INFO:     Application startup complete.
opendevin  | INFO:     Uvicorn running on http://0.0.0.0:3000 (Press CTRL+C to quit)
opendevin  | INFO:     ('172.18.0.12', 37882) - "WebSocket /ws?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWQiOiIyOWU3MWU5Mi1kODIyLTQyMTEtOGRlOS02ZWJlODZhNTUxMTgifQ.nScvbEbTJxzKZC_ofEy8TA9WJ15aHa9ri5hhPQEfInI&latest_event_id=1" [accepted]
opendevin  | �[92m21:42:46 - opendevin:ERROR�[0m: auth.py:27 - Invalid token
opendevin  | INFO:     connection open
opendevin  | INFO:     connection closed
opendevin  | INFO:     ('172.18.0.12', 37896) - "WebSocket /ws" [accepted]
opendevin  | INFO:     connection open
opendevin  | �[92m21:42:50 - opendevin:INFO�[0m: agent.py:78 - Using runtime: eventstream
opendevin  | �[92m21:42:50 - opendevin:INFO�[0m: runtime_build.py:34 - Using project root: /app
opendevin  | * Creating isolated environment: venv+pip...
opendevin  | * Installing packages in isolated environment:
opendevin  |   - poetry-core
opendevin  | * Getting build dependencies for sdist...
opendevin  | * Building sdist...
opendevin  | Traceback (most recent call last):
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
opendevin  |     main()
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
opendevin  |     json_out["return_val"] = hook(**hook_input["kwargs"])
opendevin  |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 326, in build_sdist
opendevin  |     return backend.build_sdist(sdist_directory, config_settings)
opendevin  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/tmp/build-env-6mzv8u0q/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 69, in build_sdist
opendevin  |     path = SdistBuilder(poetry).build(Path(sdist_directory))
opendevin  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/tmp/build-env-6mzv8u0q/lib/python3.12/site-packages/poetry/core/masonry/builders/sdist.py", line 90, in build
opendevin  |     with file.path.open("rb") as f:
opendevin  |          ^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/usr/local/lib/python3.12/pathlib.py", line 1013, in open
opendevin  |     return io.open(self, mode, buffering, encoding, errors, newline)
opendevin  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  | PermissionError: [Errno 13] Permission denied: '/app/opendevin/controller/__pycache__/__init__.cpython-312.pyc'
opendevin  | 
opendevin  | ERROR Backend subprocess exited when trying to invoke build_sdist
opendevin  | �[92m21:42:54 - opendevin:ERROR�[0m: runtime_build.py:39 - Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)
opendevin  | �[92m21:42:54 - opendevin:ERROR�[0m: session.py:116 - Error creating controller: Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)
opendevin  | Traceback (most recent call last):
opendevin  |   File "/app/opendevin/server/session/session.py", line 106, in _initialize_agent
opendevin  |     await self.agent_session.start(
opendevin  |   File "/app/opendevin/server/session/agent.py", line 53, in start
opendevin  |     await self._create_runtime(runtime_name, config, agent)
opendevin  |   File "/app/opendevin/server/session/agent.py", line 86, in _create_runtime
opendevin  |     await self.runtime.ainit()
opendevin  |   File "/app/opendevin/runtime/client/runtime.py", line 81, in ainit
opendevin  |     self.container_image = build_runtime_image(
opendevin  |                            ^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 252, in build_runtime_image
opendevin  |     from_scratch_hash = prep_docker_build_folder(
opendevin  |                         ^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 108, in prep_docker_build_folder
opendevin  |     _put_source_code_to_dir(dir_path)
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 57, in _put_source_code_to_dir
opendevin  |     tarball_path = _create_project_source_dist()
opendevin  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 40, in _create_project_source_dist
opendevin  |     raise Exception(f'Build failed: {result}')
opendevin  | Exception: Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)
opendevin  | �[92m21:44:14 - opendevin:INFO�[0m: session.py:66 - WebSocket disconnected, sid: 65d7905b-3481-41db-a7ce-4c1df52d5d35
opendevin  | INFO:     connection closed
opendevin  | INFO:     172.18.0.12:60222 - "GET / HTTP/1.1" 200 OK
opendevin  | INFO:     172.18.0.12:60230 - "GET /assets/index-BPLyMB4Y.js HTTP/1.1" 200 OK
opendevin  | INFO:     172.18.0.12:60240 - "GET /assets/index-Dadf-VsP.css HTTP/1.1" 200 OK
opendevin  | INFO:     172.18.0.12:60248 - "GET /locales/en/translation.json HTTP/1.1" 200 OK
opendevin  | INFO:     172.18.0.12:60252 - "GET /favicon-32x32.png HTTP/1.1" 200 OK
opendevin  | INFO:     172.18.0.12:60268 - "GET /apple-touch-icon.png HTTP/1.1" 200 OK
opendevin  | INFO:     172.18.0.12:60278 - "GET /api/options/models HTTP/1.1" 200 OK
opendevin  | INFO:     172.18.0.12:60286 - "GET /api/options/agents HTTP/1.1" 200 OK
opendevin  | INFO:     ('172.18.0.12', 60302) - "WebSocket /ws" [accepted]
opendevin  | INFO:     connection open
opendevin  | �[92m21:44:18 - opendevin:INFO�[0m: agent.py:78 - Using runtime: eventstream
opendevin  | �[92m21:44:18 - opendevin:INFO�[0m: runtime_build.py:34 - Using project root: /app
opendevin  | * Creating isolated environment: venv+pip...
opendevin  | * Installing packages in isolated environment:
opendevin  |   - poetry-core
opendevin  | * Getting build dependencies for sdist...
opendevin  | * Building sdist...
opendevin  | Traceback (most recent call last):
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
opendevin  |     main()
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
opendevin  |     json_out["return_val"] = hook(**hook_input["kwargs"])
opendevin  |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 326, in build_sdist
opendevin  |     return backend.build_sdist(sdist_directory, config_settings)
opendevin  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/tmp/build-env-pl_vj67a/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 69, in build_sdist
opendevin  |     path = SdistBuilder(poetry).build(Path(sdist_directory))
opendevin  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/tmp/build-env-pl_vj67a/lib/python3.12/site-packages/poetry/core/masonry/builders/sdist.py", line 90, in build
opendevin  |     with file.path.open("rb") as f:
opendevin  |          ^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/usr/local/lib/python3.12/pathlib.py", line 1013, in open
opendevin  |     return io.open(self, mode, buffering, encoding, errors, newline)
opendevin  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  | PermissionError: [Errno 13] Permission denied: '/app/opendevin/controller/__pycache__/__init__.cpython-312.pyc'
opendevin  | 
opendevin  | ERROR Backend subprocess exited when trying to invoke build_sdist
opendevin  | �[92m21:44:21 - opendevin:ERROR�[0m: runtime_build.py:39 - Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)
opendevin  | �[92m21:44:21 - opendevin:ERROR�[0m: session.py:116 - Error creating controller: Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)
opendevin  | Traceback (most recent call last):
opendevin  |   File "/app/opendevin/server/session/session.py", line 106, in _initialize_agent
opendevin  |     await self.agent_session.start(
opendevin  |   File "/app/opendevin/server/session/agent.py", line 53, in start
opendevin  |     await self._create_runtime(runtime_name, config, agent)
opendevin  |   File "/app/opendevin/server/session/agent.py", line 86, in _create_runtime
opendevin  |     await self.runtime.ainit()
opendevin  |   File "/app/opendevin/runtime/client/runtime.py", line 81, in ainit
opendevin  |     self.container_image = build_runtime_image(
opendevin  |                            ^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 252, in build_runtime_image
opendevin  |     from_scratch_hash = prep_docker_build_folder(
opendevin  |                         ^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 108, in prep_docker_build_folder
opendevin  |     _put_source_code_to_dir(dir_path)
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 57, in _put_source_code_to_dir
opendevin  |     tarball_path = _create_project_source_dist()
opendevin  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opendevin  |   File "/app/opendevin/runtime/utils/runtime_build.py", line 40, in _create_project_source_dist
opendevin  |     raise Exception(f'Build failed: {result}')
opendevin  | Exception: Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)

I'm reproducing the error with the same logs 😢 (macOS M1 Pro)

@neubig neubig added severity:medium Affecting multiple users and removed severity:low Minor issues, affecting single user labels Aug 12, 2024
@neubig
Copy link
Contributor

neubig commented Aug 12, 2024

Hopefully we can get someone to reproduce/fix this. I can't do it myself so I'm not able to help unfortunately... I'll post it on the slack!

@neubig neubig changed the title [Bug]: SSH login error with no sandbox container (Ubuntu on ARM) [Bug]: Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1) Aug 12, 2024
@luck0r
Copy link

luck0r commented Aug 13, 2024

I have the same problem, it tries over and over again * Building sdist... and then :
`* Building sdist...
Traceback (most recent call last):
File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in
main()
File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 326, in build_sdist
return backend.build_sdist(sdist_directory, config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/build-env-hkq91bqk/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 69, in build_sdist
path = SdistBuilder(poetry).build(Path(sdist_directory))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/build-env-hkq91bqk/lib/python3.12/site-packages/poetry/core/masonry/builders/sdist.py", line 90, in build
with file.path.open("rb") as f:
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/pathlib.py", line 1013, in open
return io.open(self, mode, buffering, encoding, errors, newline)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/app/opendevin/controller/pycache/init.cpython-312.pyc'

ERROR Backend subprocess exited when trying to invoke build_sdist
19:52:47 - opendevin:ERROR: runtime_build.py:45 - Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)
19:52:47 - opendevin:ERROR: session.py:118 - Error creating controller: Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)
Traceback (most recent call last):
File "/app/opendevin/server/session/session.py", line 109, in _initialize_agent
await self.agent_session.start(
File "/app/opendevin/server/session/agent.py", line 55, in start
await self._create_runtime(runtime_name, config, agent)
File "/app/opendevin/server/session/agent.py", line 98, in _create_runtime
await self.runtime.ainit()
File "/app/opendevin/runtime/client/runtime.py", line 81, in ainit
self.container_image = build_runtime_image(
^^^^^^^^^^^^^^^^^^^^
File "/app/opendevin/runtime/utils/runtime_build.py", line 307, in build_runtime_image
from_scratch_hash = prep_docker_build_folder(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/opendevin/runtime/utils/runtime_build.py", line 138, in prep_docker_build_folder
_put_source_code_to_dir(dir_path)
File "/app/opendevin/runtime/utils/runtime_build.py", line 69, in _put_source_code_to_dir
tarball_path = _create_project_source_dist()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/opendevin/runtime/utils/runtime_build.py", line 46, in _create_project_source_dist
raise Exception(f'Build failed: {result}')
Exception: Build failed: CompletedProcess(args=['python', '-m', 'build', '-s', '/app'], returncode=1)
19:52:47 - opendevin:INFO: session.py:138 - Server event`

@JamDon2
Copy link
Author

JamDon2 commented Aug 13, 2024

@neubig I am willing to set up a VM where the issue can be reproduced and provide access to it if that helps

@neubig
Copy link
Contributor

neubig commented Aug 13, 2024

Hey @JamDon2 , that'd be really helpful!

@JamDon2
Copy link
Author

JamDon2 commented Aug 13, 2024

@neubig Sure I'll set it up tomorrow, where can I send the login information?

@neubig
Copy link
Contributor

neubig commented Aug 13, 2024

Thanks, neubig@gmail.com works

@tobitege
Copy link
Collaborator

Hey @JamDon2 and @luck0r ,
if your time permits, you could try adding the following file to your OpenDevin root folder and see if this avoids the error:
https://github.com/OpenDevin/OpenDevin/blob/daf44fb36151688a1390c6ff587153be21e865fc/MANIFEST.in

@JamDon2
Copy link
Author

JamDon2 commented Aug 14, 2024

Sure, I can test it in around 5-6 hours

@luck0r
Copy link

luck0r commented Aug 14, 2024

Hey @JamDon2 and @luck0r , if your time permits, you could try adding the following file to your OpenDevin root folder and see if this avoids the error: https://github.com/OpenDevin/OpenDevin/blob/daf44fb36151688a1390c6ff587153be21e865fc/MANIFEST.in

Hey @tobitege, for me it did not change the error. still get same permissioned denied. I have put it in /app and /app/opendevin
docker exec -it fe73da16ecce cat /app/MANIFEST.in

Exclude all Python bytecode files

global-exclude *.pyc

Exclude Python cache directories

global-exclude pycache

@tobitege
Copy link
Collaborator

tobitege commented Aug 14, 2024

@luck0r It might not work that way if you're only using the Docker call, i.e. it might require that PR to be merged first so that the updated main image has it inside it.

@neubig
Copy link
Contributor

neubig commented Aug 14, 2024

Hi all! Could you pull the latest main branch and see if it works? @tobitege pushed a fix that should solve the issue

@luck0r
Copy link

luck0r commented Aug 14, 2024

i did pull the latest from main: sha256:7353e2f118129a1724a2e2135b79a4ad04fb7e74f0ae2478d59409c011595665
the error is the same:
`INFO: connection open
13:14:34 - opendevin:INFO: agent.py:79 - Using security analyzer:
13:14:34 - opendevin:INFO: agent.py:90 - Using runtime: eventstream
13:14:34 - opendevin:INFO: runtime_build.py:40 - Using project root: /app

  • Creating isolated environment: venv+pip...
  • Installing packages in isolated environment:
    • poetry-core
  • Getting build dependencies for sdist...
  • Building sdist...
    Traceback (most recent call last):
    File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in
    main()
    File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 326, in build_sdist
    return backend.build_sdist(sdist_directory, config_settings)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/build-env-vtmai59o/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 69, in build_sdist
    path = SdistBuilder(poetry).build(Path(sdist_directory))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/build-env-vtmai59o/lib/python3.12/site-packages/poetry/core/masonry/builders/sdist.py", line 90, in build
    with file.path.open("rb") as f:
    ^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/pathlib.py", line 1013, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    PermissionError: [Errno 13] Permission denied: '/app/opendevin/controller/pycache/init.cpython-312.pyc'
    `

@tobitege
Copy link
Collaborator

Oh well, was worth a try. Thanks for reporting back!

@JamDon2
Copy link
Author

JamDon2 commented Aug 14, 2024

Unfortunately it doesn't work for me either. I'll send you the credentials for the VM tonight (around 6 hours from now).

@tobitege tobitege reopened this Aug 14, 2024
@tobitege
Copy link
Collaborator

tobitege commented Aug 14, 2024

Hey @JamDon2 @luck0r
If not already doing so, please try ghcr.io/opendevin/opendevin:main as image name for your docker command.
That image can also appear delayed in the registry once the merge of the PR was done as the workflows take about an hour to finish. It could be that you pulled an "earlier" image, which I'd like to re-check, if you guys don't mind.
Thanks for your reports and time in any case, appreciated!

@JamDon2
Copy link
Author

JamDon2 commented Aug 14, 2024

Hey @tobitege
I am already using that, and even tried building the image myself from the main branch after the PR was merged, and can still reproduce the issue unfortunately.

@tobitege
Copy link
Collaborator

Thanks so much for confirming. I'll look into fixing this differently then, please stay tuned.

@JamDon2
Copy link
Author

JamDon2 commented Aug 14, 2024

@neubig Just sent you an email with the info for the server

@JamDon2
Copy link
Author

JamDon2 commented Aug 14, 2024

@tobitege Do you need access as well?

@tobitege
Copy link
Collaborator

@tobitege Do you need access as well?

Thanks, for now it should suffice that neubig gets the details.

@tobitege
Copy link
Collaborator

Hey @JamDon2 @luck0r
please try again, if time permits 🤗

@JamDon2
Copy link
Author

JamDon2 commented Aug 14, 2024

@tobitege I can still reproduce it with the latest version. I waited for the GH Actions run to finish, so it is the latest.

@tobitege
Copy link
Collaborator

@tobitege I can still reproduce it with the latest version. I waited for the GH Actions run to finish, so it is the latest.

The GH actions after merge aren't done yet, though. Only then the image goes to the registry.
I'll have to re-try as well once it's done.

@tobitege
Copy link
Collaborator

Yeh, I can reproduce it here as well... back to the drawing board... 😔

@tobitege tobitege reopened this Aug 15, 2024
@dagelf
Copy link
Contributor

dagelf commented Aug 15, 2024

Most likely upstream image contamination. Maybe we're not using docker correctly, we should only pull in static things. Deny "the strangers" (from Dark City 1998) levers to break things that they will never understand, downstream...

@mamoodi mamoodi added severity:critical Affecting all users and removed severity:medium Affecting multiple users labels Aug 15, 2024
@lapochka8
Copy link

lapochka8 commented Aug 15, 2024

running this docker setup,

docker run -it --pull=always -e SANDBOX_USER_ID=$(id -u) -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE -v $WORKSPACE_BASE:/opt/workspace_base -v /var/run/docker.sock:/var/run/docker.sock -p 3000:3000 --add-host host.docker.internal:host-gateway --name opendevin-app-$(date +%Y%m%d%H%M%S) ghcr.io/opendevin/opendevin:main

with this output

`INFO: Started server process [42]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:3000 (Press CTRL+C to quit)
INFO: ('172.17.0.1', 47266) - "WebSocket /ws?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWQiOiJlNzU3MmEwNC04ZDNlLTQzMmYtYWY1My0xYzliZjRhMDgzZDQifQ.ubNdRj46ugYAoplANoQD2nyEpoHjobEpp8LFcmowVfg&latest_event_id=1" [accepted]
20:27:18 - opendevin:ERROR: auth.py:27 - Invalid token
INFO: connection open
INFO: connection closed
INFO: ('172.17.0.1', 48754) - "WebSocket /ws" [accepted]
INFO: connection open
20:27:22 - opendevin:INFO: agent.py:79 - Using security analyzer:
20:27:22 - opendevin:INFO: agent.py:90 - Using runtime: eventstream
20:27:22 - opendevin:INFO: runtime_build.py:41 - Using project root: /app

  • Creating isolated environment: venv+pip...
  • Installing packages in isolated environment:
    • poetry-core
  • Getting build dependencies for sdist...
  • Building sdist...
    Traceback (most recent call last):
    File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in
    main()
    File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/app/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 326, in build_sdist
    return backend.build_sdist(sdist_directory, config_settings)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/build-env-vd7a52mi/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 69, in build_sdist
    path = SdistBuilder(poetry).build(Path(sdist_directory))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/build-env-vd7a52mi/lib/python3.12/site-packages/poetry/core/masonry/builders/sdist.py", line 90, in build
    with file.path.open("rb") as f:
    ^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.12/pathlib.py", line 1013, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    PermissionError: [Errno 13] Permission denied: '/app/opendevin/controller/pycache/init.cpython-312.pyc'

ERROR Backend subprocess exited when trying to invoke build_sdist
20:27:25 - opendevin:ERROR: runtime_build.py:46 - Build failed: CompletedProcess(args='python -m build -s /app', returncode=1)
20:27:25 - opendevin:ERROR: session.py:118 - Error creating controller: Build failed: CompletedProcess(args='python -m build -s /app', returncode=1)
Traceback (most recent call last):
File "/app/opendevin/server/session/session.py", line 109, in _initialize_agent
await self.agent_session.start(
File "/app/opendevin/server/session/agent.py", line 55, in start
await self._create_runtime(runtime_name, config, agent)
File "/app/opendevin/server/session/agent.py", line 98, in _create_runtime
await self.runtime.ainit()
File "/app/opendevin/runtime/client/runtime.py", line 84, in ainit
self.container_image = build_runtime_image(
^^^^^^^^^^^^^^^^^^^^
File "/app/opendevin/runtime/utils/runtime_build.py", line 223, in build_runtime_image
from_scratch_hash = prep_docker_build_folder(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/opendevin/runtime/utils/runtime_build.py", line 139, in prep_docker_build_folder
_put_source_code_to_dir(dir_path)
File "/app/opendevin/runtime/utils/runtime_build.py", line 70, in _put_source_code_to_dir
tarball_path = _create_project_source_dist()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/opendevin/runtime/utils/runtime_build.py", line 47, in _create_project_source_dist
raise Exception(f'Build failed: {result}')
Exception: Build failed: CompletedProcess(args='python -m build -s /app', returncode=1)`

Everything was running fine 5 minutes ago, and now its just killing itself. Not sure whats going on with it.

Running base docker run -it \ --pull=always \ -e SANDBOX_USER_ID=$(id -u) \ -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \ -v $WORKSPACE_BASE:/opt/workspace_base \ -v /var/run/docker.sock:/var/run/docker.sock \ -p 3000:3000 \ --add-host host.docker.internal:host-gateway \ --name opendevin-app-$(date +%Y%m%d%H%M%S) \ ghcr.io/opendevin/opendevin:0.8 works fine. Same with 0.8.2, however attempting to run 0.8.3 gives docker: Error response from daemon: manifest unknown.

Not sure if this will help at all. Running WSL, Debian, everything is up to date inside docker desktop, and debian should be fully up to date as well. Im about to double check though. Everything is up to date.

8.0 seems to work fine, 8.2 is throwing asset issues and not loading webUI

Another thing to note, whenever this issue happens, it says failed to establish controller.

@xingyaoww
Copy link
Contributor

This PR should fix the pycache permission issue on main: #3426

@lapochka8
Copy link

Thank you oh great one.

@tobitege tobitege reopened this Aug 16, 2024
@tobitege
Copy link
Collaborator

Issue still persists, unfortunately. @xingyaoww

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment