AS AgentScopeAPI 手册 / API Reference

DockerProp

public class DockerProp
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:24–106

Docker 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

方法Method说明Description
public String getImageName()
获取图像名称。
Returns the image name.
public void setImageName(String imageName)
设置图像名称。
Sets the image name.
public String getContainerName()
获取容器名称。
Returns the container name.
public void setContainerName(String containerName)
设置容器名称。
Sets the container name.
public Map<Integer, Integer> getPartMap()
获取片段映射。
Returns the part map.
public void setPortMap(Map<Integer, Integer> portMap)
设置 `setPortMap`。
Sets the port map.
public Map<String, String> getVolumeBindings()
获取 `getVolumeBindings`。
Returns the volume bindings.
public void setVolumeBindings(Map<String, String> volumeBindings)
设置 `setVolumeBindings`。
Sets the volume bindings.
public Map<String, String> getEnvironment()
获取环境。
Returns the environment.
public void setEnvironment(Map<String, String> environment)
设置环境。
Sets the environment.
public String getRuntimeConfig()
获取运行时配置。
Returns the runtime config.
public void setRuntimeConfig(String runtimeConfig)
设置运行时配置。
Sets the runtime config.
public DockerProp addPortMapping(Integer containerPort, Integer hostPort)
添加 `addPortMapping`。
Adds the port mapping.
public DockerProp addVolumeBinding(String hostPath, String containerPath)
添加 `addVolumeBinding`。
Adds the volume binding.
public DockerProp addEnvironment(String key, String value)
添加环境。
Adds the environment.

构造器详情Constructor Detail

DockerProp

public DockerProp()

初始化 DockerProp 实例。

Creates a new instance.

源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:32–36

DockerProp

public DockerProp(String imageName, String containerName)

初始化 DockerProp 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
imageNameString图像名称(类型 `String`)。The image name.
containerNameString容器名称(类型 `String`)。The container name.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:38–42

方法详情Method Detail

getImageName

public String getImageName()

获取图像名称。

Returns the image name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:44–46

setImageName

public void setImageName(String imageName)

设置图像名称。

Sets the image name.

参数Parameters
名称Name类型Type说明Description
imageNameString图像名称(类型 `String`)。The image name.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:48–50

getContainerName

public String getContainerName()

获取容器名称。

Returns the container name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:52–54

setContainerName

public void setContainerName(String containerName)

设置容器名称。

Sets the container name.

参数Parameters
名称Name类型Type说明Description
containerNameString容器名称(类型 `String`)。The container name.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:56–58

getPartMap

public Map<Integer, Integer> getPartMap()

获取片段映射。

Returns the part map.

返回Returns Map<Integer, Integer>
返回映射。Returns map.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:60–62

setPortMap

public void setPortMap(Map<Integer, Integer> portMap)

设置 setPortMap。

Sets the port map.

参数Parameters
名称Name类型Type说明Description
portMapMap<Integer, Integer>port 映射(类型 `Map`)。The port map.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:64–66

getVolumeBindings

public Map<String, String> getVolumeBindings()

获取 getVolumeBindings。

Returns the volume bindings.

返回Returns Map<String, String>
返回映射。Returns map.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:68–70

setVolumeBindings

public void setVolumeBindings(Map<String, String> volumeBindings)

设置 setVolumeBindings。

Sets the volume bindings.

参数Parameters
名称Name类型Type说明Description
volumeBindingsMap<String, String>volume Bindings(类型 `Map`)。The volume bindings.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:72–74

getEnvironment

public Map<String, String> getEnvironment()

获取环境。

Returns the environment.

返回Returns Map<String, String>
返回映射。Returns map.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:76–78

setEnvironment

public void setEnvironment(Map<String, String> environment)

设置环境。

Sets the environment.

参数Parameters
名称Name类型Type说明Description
environmentMap<String, String>环境(类型 `Map`)。The environment.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:80–82

getRuntimeConfig

public String getRuntimeConfig()

获取运行时配置。

Returns the runtime config.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:84–86

setRuntimeConfig

public void setRuntimeConfig(String runtimeConfig)

设置运行时配置。

Sets the runtime config.

参数Parameters
名称Name类型Type说明Description
runtimeConfigString运行时配置(类型 `String`)。The runtime config.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:88–90

addPortMapping

public DockerProp addPortMapping(Integer containerPort, Integer hostPort)

添加 addPortMapping。

Adds the port mapping.

参数Parameters
名称Name类型Type说明Description
containerPortInteger容器 Port(类型 `Integer`)。The container port.
hostPortIntegerhost Port(类型 `Integer`)。The host port.
返回Returns DockerProp
返回DockerProp。Returns docker prop.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:92–95

addVolumeBinding

public DockerProp addVolumeBinding(String hostPath, String containerPath)

添加 addVolumeBinding。

Adds the volume binding.

参数Parameters
名称Name类型Type说明Description
hostPathStringhost 路径(类型 `String`)。The host path.
containerPathString容器路径(类型 `String`)。The container path.
返回Returns DockerProp
返回DockerProp。Returns docker prop.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:97–100

addEnvironment

public DockerProp addEnvironment(String key, String value)

添加环境。

Adds the environment.

参数Parameters
名称Name类型Type说明Description
keyString键(类型 `String`)。The key.
valueString值(类型 `String`)。The value.
返回Returns DockerProp
返回DockerProp。Returns docker prop.
源码Source io/agentscope/runtime/sandbox/manager/model/container/DockerProp.java:102–105
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.