version: "3.8" services: GPU: image: python:3.8 deploy: mode: global placement: constraints: [node.labels.isgpu == true ]
docker node update --label-add isgpu=false node1 docker node update --label-add isgpu=true node2 #查看标签