Docker
swerex.deployment.docker.DockerDeployment
DockerDeployment(*, logger: Logger | None = None, **kwargs: Any)
Bases: AbstractDeployment
Deployment to local docker image.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments (see |
{}
|
Source code in swerex/deployment/docker.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
container_name
property
container_name: str | None
glibc_dockerfile
property
glibc_dockerfile: str
logger
instance-attribute
logger = logger or get_logger('rex-deploy')
runtime
property
runtime: RemoteRuntime
Returns the runtime if running.
Raises:
Type | Description |
---|---|
DeploymentNotStartedError
|
If the deployment was not started. |
add_hook
add_hook(hook: DeploymentHook)
Source code in swerex/deployment/docker.py
65 66 |
|
from_config
classmethod
from_config(config: DockerDeploymentConfig) -> Self
Source code in swerex/deployment/docker.py
68 69 70 |
|
is_alive
async
is_alive(*, timeout: float | None = None) -> IsAliveResponse
Checks if the runtime is alive. The return value can be tested with bool().
Raises:
Type | Description |
---|---|
DeploymentNotStartedError
|
If the deployment was not started. |
Source code in swerex/deployment/docker.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|
start
async
start()
Starts the runtime.
Source code in swerex/deployment/docker.py
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
|
stop
async
stop()
Stops the runtime.
Source code in swerex/deployment/docker.py
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
|