38 lines
725 B
YAML
38 lines
725 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
ubuntu-finetune:
|
|
image: hotwa/deepspeed:pt23
|
|
ports:
|
|
- 3228:22
|
|
environment:
|
|
- NVIDIA_VISIBLE_DEVICES=all
|
|
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
|
- TMPDIR=/var/tmp
|
|
deploy:
|
|
replicas: 1
|
|
resources:
|
|
reservations:
|
|
generic_resources:
|
|
- discrete_resource_spec:
|
|
kind: "NVIDIA-GPU"
|
|
value: 1
|
|
placement:
|
|
constraints:
|
|
- node.labels.gpu == true
|
|
cap_add:
|
|
- IPC_LOCK
|
|
|
|
networks:
|
|
default:
|
|
driver: overlay
|
|
|
|
# 为节点添加标签:
|
|
# docker node ls
|
|
|
|
|
|
# docker node update --label-add gpu=true node1
|
|
|
|
# docker stack deploy -c docker-compose.yml rdma_stack
|
|
|