version: '2' services: idcard: hostname: bank container_name: bank restart: always image: registry.cn-hangzhou.aliyuncs.com/sxtest/bankcard:gpu privileged: true ipc: host tty: true working_dir: /workspace ports: - '18081:8080' - '18223:22' volumes: - ./:/workspace deploy: resources: reservations: devices: - capabilities: [gpu]