This commit is contained in:
2024-07-16 13:33:17 +08:00
parent 383a016d4e
commit d288ed7214

View File

@@ -12,6 +12,9 @@ version: '3.8'
# Quantizer - 提供量化支持,以减少模型大小和提高推理速度。 # Quantizer - 提供量化支持,以减少模型大小和提高推理速度。
# RandomLTD - 用于随机层裁剪的优化器。 # RandomLTD - 用于随机层裁剪的优化器。
# StochasticTransformer - 支持随机Transformer模型的训练和推理。 # StochasticTransformer - 支持随机Transformer模型的训练和推理。
# 检测系统总内存以GB为单位
# TOTAL_MEM=$(awk '/MemTotal/ {printf "%.0f\n", $2/1024/1024}' /proc/meminfo)
# echo "Docker Compose 文件已生成shm_size 设置为 ${TOTAL_MEM}GB。"
services: services:
ubuntu-finetune: ubuntu-finetune:
@@ -41,21 +44,29 @@ services:
CACHEBUST: 1 CACHEBUST: 1
volumes: volumes:
- ./src:/bbtft - ./src:/bbtft
- /tmp:/tmp # - /tmp:/tmp
container_name: ubuntu-finetune container_name: ubuntu-finetune
pull_policy: if_not_present pull_policy: if_not_present
ulimits:
memlock:
soft: -1
hard: -1
# tty: true # tty: true
# stdin_open: true
restart: unless-stopped restart: unless-stopped
image: hotwa/deepspeed:pt23_update image: hotwa/deepspeed:pt23_update
shm_size: '32gb' privileged: true
ipc: host
network_mode: host
shm_size: '64gb'
ports: ports:
- 3228:22 - 3228:22
environment: environment:
- NVIDIA_VISIBLE_DEVICES=all - NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility - NVIDIA_DRIVER_CAPABILITIES=compute,utility
- TMPDIR=/var/tmp - TMPDIR=/var/tmp
networks: # networks:
- network_finetune # - network_finetune
deploy: deploy:
resources: resources:
reservations: reservations:
@@ -64,6 +75,6 @@ services:
count: all count: all
capabilities: [gpu] capabilities: [gpu]
networks: # networks:
network_finetune: # network_finetune:
name: network_finetune # name: network_finetune