Skip to content

Comments

Migrated the VM container to initialize from docker-compose instead of within infant agent#15

Open
W1nson wants to merge 19 commits intomainfrom
winson
Open

Migrated the VM container to initialize from docker-compose instead of within infant agent#15
W1nson wants to merge 19 commits intomainfrom
winson

Conversation

@W1nson
Copy link
Collaborator

@W1nson W1nson commented Oct 15, 2025

Goal

We have added the docker-compose.yaml to host 3 services to allow OSS_Model to run on separate server if needed, VM container to startup independently, as well as containerized infant agent backend to possible provide scalability for future development. This would be allowing minor modification to run on different platform.

Updated Items:

  • Modified infant/computer/Dockerfile to add initial users.
  • Modified infant/computer/computer.py, revamped entirely to work with ssh for the setup instead of the docker.
  • Added Dockerfile_vllm, to setup vllm separately, with different configuration locally.
  • Added Dockerfile, to setup infant agent source backend to container.
  • Added send_prompt.py script to allow interaction between terminal to infant agent container.
  • Added docker-compose.yaml to allow faster setup by using docker compose build, docker compose up, ...etc.

Note: The entire program also passed pytest to check all the configurations are correct.

@W1nson W1nson requested a review from bin123apple October 15, 2025 09:30
@W1nson W1nson self-assigned this Oct 15, 2025
@bin123apple
Copy link
Owner

Hey Winson, thanks for the PR, while using Option 2: Manual Setup (Advanced) method to setup the agent, One error happens while Initializing SSH connection to infant@infant-computer.
The bug information is

20:53:22 - infant:INFO: computer.py:125 - Waiting for SSH to be ready on infant-computer:22...
20:53:24 - infant:WARNING: computer.py:121 - Cannot resolve hostname infant-computer: [Errno -3] Temporary failure in name resolution
20

And here is the Traceback

INFO:     127.0.0.1:54726 - "GET /api/initialize HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 409, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in __call__
    raise exc
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in __call__
    await self.app(scope, receive, _send)
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
    await self.app(scope, receive, send)
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/starlette/routing.py", line 714, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/starlette/routing.py", line 734, in app
    await route.handle(scope, receive, send)
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    response = await f(request)
               ^^^^^^^^^^^^^^^^
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/data1/home/lei00126/miniconda3/envs/infant/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/data1/home/lei00126/InfantAgent/backend.py", line 139, in initialize
    agent, computer = await initialize_agent(config)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/data1/home/lei00126/InfantAgent/infant/main.py", line 85, in initialize_agent
    computer = Computer(
               ^^^^^^^^^
  File "/mnt/data1/home/lei00126/InfantAgent/infant/computer/computer.py", line 71, in __init__
    self.connect()
  File "/mnt/data1/home/lei00126/InfantAgent/infant/computer/computer.py", line 622, in connect
    raise ConnectionError(
ConnectionError: SSH service not available on infant-computer:22 after 60 seconds. Please ensure the computer-container is running and SSH service is started.

Do you have any idea about this error? Or does it have similar problem in RTX6000?

Thanks!

@W1nson
Copy link
Collaborator Author

W1nson commented Oct 15, 2025

the second option is not available since I'm running the container as separate server without using docker (python package).
Please ignore the second option. Thank you

@bin123apple
Copy link
Owner

I just tried the second option and It seems that there are some errors while using docker compose logs -f to check the detail, here are the error details:

vllm-server       | (APIServer pid=1) Traceback (most recent call last):
vllm-server       | (APIServer pid=1)   File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_http.py", line 407, in hf_raise_for_status
vllm-server       | (APIServer pid=1)     response.raise_for_status()
vllm-server       | (APIServer pid=1)   File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 1026, in raise_for_status
vllm-server       | (APIServer pid=1)     raise HTTPError(http_error_msg, response=self)
vllm-server       | (APIServer pid=1) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/ByteDance-Seed/UI-TARS-1.5-7B/resolve/main/config.json
vllm-server       | (APIServer pid=1) 
vllm-server       | (APIServer pid=1) The above exception was the direct cause of the following exception:
vllm-server       | (APIServer pid=1) 
vllm-server       | (APIServer pid=1) Traceback (most recent call last):
vllm-server       | (APIServer pid=1)   File "/usr/local/lib/python3.10/dist-packages/transformers/utils/hub.py", line 479, in cached_files
vllm-server       | (APIServer pid=1)     hf_hub_download(
vllm-server       | (APIServer pid=1)   File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
vllm-server       | (APIServer pid=1)     return fn(*args, **kwargs)
vllm-server       | (APIServer pid=1)   File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1010, in hf_hub_download
vllm-server       | (APIServer pid=1)     return _hf_hub_download_to_cache_dir(
vllm-server       | (APIServer pid=1)   File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1117, in _hf_hub_download_to_cache_dir
vllm-server       | (APIServer pid=1)     _raise_on_head_call_error(head_call_error, force_download, local_files_only)
vllm-server       | (APIServer pid=1)   File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1658, in _raise_on_head_call_error
vllm-server       | (APIServer pid=1)     raise head_call_error
vllm-server       | (APIServer pid=1)   File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1546, in _get_metadata_or_catch_error
vllm-server       | (APIServer pid=1)     metadata = get_hf_file_metadata(
vllm-server       | (APIServer pid=1)   File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
vllm-server       | (APIServer pid=1)     return fn(*args, **kwargs)
vllm-server       | (APIServer pid=1)   File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 1463, in get_hf_file_metadata
vllm-server       | (APIServer pid=1)     r = _request_wrapper(
vllm-server       | (APIServer pid=1)   File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 286, in _request_wrapper
vllm-server       | (APIServer pid=1)     response = _request_wrapper(
vllm-server       | (APIServer pid=1)   File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py", line 310, in _request_wrapper
vllm-server       | (APIServer pid=1)     hf_raise_for_status(response)
vllm-server       | (APIServer pid=1)   File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_http.py", line 480, in hf_raise_for_status
vllm-server       | (APIServer pid=1)     raise _format(HfHubHTTPError, str(e), response) from e
vllm-server       | (APIServer pid=1) huggingface_hub.errors.HfHubHTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/ByteDance-Seed/UI-TARS-1.5-7B/resolve/main/config.json (Request ID: Root=1-68f01a57-0926af6d209a442649c58916;523b40f6-cbdc-4a88-b0f3-17a58d3577aa)
vllm-server       | (APIServer pid=1) 
vllm-server       | (APIServer pid=1) Invalid credentials in Authorization header
vllm-server       | (APIServer pid=1) 

Could you check the reason for this? Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants