OpenHands
OpenHands copied to clipboard
Fix Docker container creation and error handling
- Fixes #102. Print an error if Docker is not reachable. As docker restart tried in every session, server will automatically recover even if docker bounces.
- Fixed some python module import order in
session.py
andsandbox.py
Tests
When docker is not running:
INFO: Started server process [58282]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: ('127.0.0.1', 59155) - "WebSocket /ws" [accepted]
INFO: connection open
INFO: Started server process [63469]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: ('127.0.0.1', 60186) - "WebSocket /ws" [accepted]
INFO: connection open
Failed to stop container: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
Error creating controller. Please check Docker is running using `docker ps`.
Error! Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))```
When docker is running:
INFO: ('127.0.0.1', 60325) - "WebSocket /ws" [accepted] INFO: connection open INFO: connection closed
==============
STEP 0
huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...
To disable this warning, you can either:
- Avoid using tokenizers
before the fork if possible
- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)
ACTION: