gpt4 book ai didi

amazon-web-services - 如何覆盖 AWS Batch 作业中的 docker 镜像?

转载 作者:行者123 更新时间:2023-12-04 13:01:24 24 4
gpt4 key购买 nike

在 AWS Batch 中,我试图在提交作业时覆盖作业定义中硬编码的图像。但我没有看到任何关于它的文档。

当我尝试添加 image 时作业提交期间的字段,我得到:

Parameter validation failed: Unknown parameter in input: "image", must be one of: jobName, jobQueue, arrayProperties, dependsOn, jobDefinition, parameters, containerOverrides, retryStrategy, timeout



或者

Parameter validation failed: Unknown parameter in containerOverrides: "image", must be one of: vcpus, memory, command, environment

最佳答案

我相信这是不可能的。
image是容器属性,如 this doc它与命令、vcpus 和内存一起显示,但许多容器属性(例如作业角色 arn)在 aws batch submit-job help 中没有列为可覆盖文档。

您的第二条错误消息显示了所有可以覆盖的容器属性,与文档中的属性相匹配。

--container-overrides (structure)

A list of container overrides in JSON format that specify the nameof a container in the specified job definition and the overrides itshould receive. You can override the default command for a container(that is specified in the job definition or the Docker image) with acommand override. You can also override existing environment variables (that are specified in the job definition or Docker image) ona container or add new environment variables to it with an environment override.



速记语法:
vcpus=integer,memory=integer,command=string,string,instanceType=string,environment=[{name=string,value=string},{name=string,value=string}],resourceRequirements=[{value=string,type=string},{value=string,type=string}]

JSON 语法:
{
"vcpus": integer,
"memory": integer,
"command": ["string", ...],
"instanceType": "string",
"environment": [
{
"name": "string",
"value": "string"
}
...
],
"resourceRequirements": [
{
"value": "string",
"type": "GPU"
}
...
]

关于amazon-web-services - 如何覆盖 AWS Batch 作业中的 docker 镜像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56350410/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com