本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
目前仅支持 nvidia.com/gpu
,并且您设置的资源值必须为整数。不能使用 GPU 片段。有关更多信息,请参阅《日程安排 GPUs
要为 Amazon EKS 注册 GPU 作业定义,请运行以下命令。
$
cat <<EOF > ./batch-eks-gpu-jd.json
{
"jobDefinitionName": "MyGPUJobOnEks_Smi",
"type": "container",
"eksProperties": {
"podProperties": {
"hostNetwork": true,
"containers": [
{
"image": "nvcr.io/nvidia/cuda:10.2-runtime-centos7",
"command": ["nvidia-smi"],
"resources": {
"limits": {
"cpu": "1",
"memory": "1024Mi",
"nvidia.com/gpu": "1"
}
}
}
]
}
}
}
EOF
$
aws batch register-job-definition --cli-input-json file://./batch-eks-gpu-jd.json