gpt4 book ai didi

python - 当我正常运行时,容器工作正常,但是当我使用task def通过ecs运行容器时,它的抛出错误

转载 作者:行者123 更新时间:2023-12-02 19:47:59 25 4
gpt4 key购买 nike

通过ECS运行时,docker容器向我抛出错误,但是当我正常运行时,该容器运行正常。

AttributeError: module 'pandas' has no attribute 'compat' 

当我通过ECS时遇到上述错误,但是当我正常运行时,它可以正常工作。

我的TaskDef文件:
{
"ipcMode": null,
"executionRoleArn": "arn:aws:iam::123456789:role/ecsTaskExecutionRole",
"containerDefinitions": [
{
"dnsSearchDomains": null,
"environmentFiles": null,
"logConfiguration": null,
"entryPoint": [
"serve"
],
"portMappings": [
{
"hostPort": 80,
"protocol": "tcp",
"containerPort": 8080
}
],
"linuxParameters": null,
"cpu": 2000,
"environment": [],
"resourceRequirements": null,
"ulimits": null,
"dnsServers": null,
"mountPoints": [
{
"readOnly": null,
"containerPath": "/opt/ml/model",
"sourceVolume": "efs-mounted"
}
],
"workingDirectory": "/opt/program/",
"secrets": null,
"dockerSecurityOptions": null,
"memory": null,
"memoryReservation": 4000,
"volumesFrom": [],
"stopTimeout": null,
"image": "123456789.dkr.ecr.us-east-1.amazonaws.com/dctts:GPU_TF2",
"startTimeout": null,
"firelensConfiguration": null,
"dependsOn": null,
"disableNetworking": null,
"interactive": null,
"healthCheck": null,
"essential": true,
"links": null,
"hostname": null,
"extraHosts": null,
"pseudoTerminal": null,
"user": null,
"readonlyRootFilesystem": true,
"dockerLabels": null,
"systemControls": null,
"privileged": null,
"name": "dcttcsContainer"
}
],
"memory": null,
"taskRoleArn": "arn:aws:iam::12345678:role/ecsTaskExecutionRole",
"family": "web-ai-Taskdef",
"pidMode": null,
"requiresCompatibilities": [
"EC2"
],
"networkMode": "bridge",
"cpu": null,
"inferenceAccelerators": [],
"proxyConfiguration": null,
"volumes": [
{
"efsVolumeConfiguration": null,
"name": "efs-mounted",
"host": {
"sourcePath": "/mnt/efs/ml/model"
},
"dockerVolumeConfiguration": null
}
],
"placementConstraints": [],
"tags": []
}

最佳答案

我重申了错误,是因为内存和cpu单元不足以运行我的cpu模型。.我只是将我的任务def更改为:

{
"ipcMode": null,
"executionRoleArn": "arn:aws:iam::123456789:role/ecsTaskExecutionRole",
"containerDefinitions": [
{
"dnsSearchDomains": null,
"environmentFiles": null,
"logConfiguration": null,
"entryPoint": [
"serve"
],
"portMappings": [
{
"hostPort": 80,
"protocol": "tcp",
"containerPort": 8080
}
],
"linuxParameters": null,
"cpu": 2000,
"environment": [],
"resourceRequirements": null,
"ulimits": null,
"dnsServers": null,
"mountPoints": [
{
"readOnly": null,
"containerPath": "/opt/ml/model",
"sourceVolume": "efs-mounted"
}
],
"workingDirectory": "/opt/program/",
"secrets": null,
"dockerSecurityOptions": null,
"memory": null,
"memoryReservation": 4000,
"volumesFrom": [],
"stopTimeout": null,
"image": "123456789.dkr.ecr.us-east-1.amazonaws.com/dctts:GPU_TF2",
"startTimeout": null,
"firelensConfiguration": null,
"dependsOn": null,
"disableNetworking": null,
"interactive": null,
"healthCheck": null,
"essential": true,
"links": null,
"hostname": null,
"extraHosts": null,
"pseudoTerminal": null,
"user": null,
"readonlyRootFilesystem": true,
"dockerLabels": null,
"systemControls": null,
"privileged": null,
"name": "dcttcsContainer"
}
],
"memory": "16384",
"taskRoleArn": "arn:aws:iam::12345678:role/ecsTaskExecutionRole",
"family": "web-ai-Taskdef",
"pidMode": null,
"requiresCompatibilities": [
"EC2"
],
"networkMode": "bridge",
"cpu": "8192",
"inferenceAccelerators": [],
"proxyConfiguration": null,
"volumes": [
{
"efsVolumeConfiguration": null,
"name": "efs-mounted",
"host": {
"sourcePath": "/mnt/efs/ml/model"
},
"dockerVolumeConfiguration": null
}
],
"placementConstraints": [],
"tags": []
}

关于python - 当我正常运行时,容器工作正常,但是当我使用task def通过ecs运行容器时,它的抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62466599/

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