Skip to content

Commit d7477d0

Browse files
authored
Enh: Make docker pull timeout configurable (#500)
* Make docker pull timeout configurable * formatting
1 parent f8d8df7 commit d7477d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/minisweagent/environments/docker.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class DockerEnvironmentConfig:
2929
"""
3030
container_timeout: str = "2h"
3131
"""Max duration to keep container running. Uses the same format as the sleep command."""
32+
pull_timeout: int = 120
33+
"""Timeout in seconds for pulling images."""
3234

3335

3436
class DockerEnvironment:
@@ -65,7 +67,7 @@ def _start_container(self):
6567
cmd,
6668
capture_output=True,
6769
text=True,
68-
timeout=120, # docker pull might take a while
70+
timeout=self.config.pull_timeout, # docker pull might take a while
6971
check=True,
7072
)
7173
self.logger.info(f"Started container {container_name} with ID {result.stdout.strip()}")

0 commit comments

Comments
 (0)