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
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|
container_name
property
container_name: str | None
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
61 62 |
|
from_config
classmethod
from_config(config: DockerDeploymentConfig) -> Self
Source code in swerex/deployment/docker.py
64 65 66 |
|
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
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
start
async
start()
Starts the runtime.
Source code in swerex/deployment/docker.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
|
stop
async
stop()
Stops the runtime.
Source code in swerex/deployment/docker.py
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
|