DockerProp
public class DockerProp
io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:24–106Docker Prop,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.runtime.sandbox.manager.model.container 包。核心成员包括 getImageName、setImageName、getContainerName、setContainerName、getPartMap、setPortMap。
Docker container properties configuration class
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public DockerProp() | 初始化 `DockerProp` 实例。 Creates a new instance. |
public DockerProp(String imageName, String containerName) | 初始化 `DockerProp` 实例。 Creates a new instance. |
方法摘要Method Summary
构造器详情Constructor Detail
DockerProp
public DockerProp()
初始化 DockerProp 实例。
Creates a new instance.
io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:32–36DockerProp
public DockerProp(String imageName, String containerName)
初始化 DockerProp 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
imageName | String | 图像名称(类型 `String`)。The image name. |
containerName | String | 容器名称(类型 `String`)。The container name. |
io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:38–42方法详情Method Detail
getImageName
public String getImageName()
获取图像名称。
Returns the image name.
Stringio/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:44–46setImageName
public void setImageName(String imageName)
设置图像名称。
Sets the image name.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
imageName | String | 图像名称(类型 `String`)。The image name. |
io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:48–50getContainerName
public String getContainerName()
获取容器名称。
Returns the container name.
Stringio/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:52–54setContainerName
public void setContainerName(String containerName)
设置容器名称。
Sets the container name.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
containerName | String | 容器名称(类型 `String`)。The container name. |
io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:56–58getPartMap
public Map<Integer, Integer> getPartMap()
获取片段映射。
Returns the part map.
Map<Integer, Integer>io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:60–62setPortMap
public void setPortMap(Map<Integer, Integer> portMap)
设置 setPortMap。
Sets the port map.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
portMap | Map<Integer, Integer> | port 映射(类型 `Map`)。The port map. |
io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:64–66getVolumeBindings
public Map<String, String> getVolumeBindings()
获取 getVolumeBindings。
Returns the volume bindings.
Map<String, String>io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:68–70setVolumeBindings
public void setVolumeBindings(Map<String, String> volumeBindings)
设置 setVolumeBindings。
Sets the volume bindings.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
volumeBindings | Map<String, String> | volume Bindings(类型 `Map`)。The volume bindings. |
io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:72–74getEnvironment
public Map<String, String> getEnvironment()
获取环境。
Returns the environment.
Map<String, String>io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:76–78setEnvironment
public void setEnvironment(Map<String, String> environment)
设置环境。
Sets the environment.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
environment | Map<String, String> | 环境(类型 `Map`)。The environment. |
io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:80–82getRuntimeConfig
public String getRuntimeConfig()
获取运行时配置。
Returns the runtime config.
Stringio/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:84–86setRuntimeConfig
public void setRuntimeConfig(String runtimeConfig)
设置运行时配置。
Sets the runtime config.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
runtimeConfig | String | 运行时配置(类型 `String`)。The runtime config. |
io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:88–90addPortMapping
public DockerProp addPortMapping(Integer containerPort, Integer hostPort)
添加 addPortMapping。
Adds the port mapping.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
containerPort | Integer | 容器 Port(类型 `Integer`)。The container port. |
hostPort | Integer | host Port(类型 `Integer`)。The host port. |
DockerPropio/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:92–95addVolumeBinding
public DockerProp addVolumeBinding(String hostPath, String containerPath)
添加 addVolumeBinding。
Adds the volume binding.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
hostPath | String | host 路径(类型 `String`)。The host path. |
containerPath | String | 容器路径(类型 `String`)。The container path. |
DockerPropio/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:97–100addEnvironment
public DockerProp addEnvironment(String key, String value)
添加环境。
Adds the environment.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
key | String | 键(类型 `String`)。The key. |
value | String | 值(类型 `String`)。The value. |
DockerPropio/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:102–105