From d288ed7214db2ab3df2bd6c2bf11039e730db90c Mon Sep 17 00:00:00 2001 From: lingyuzeng Date: Tue, 16 Jul 2024 13:33:17 +0800 Subject: [PATCH] update --- finetune/docker-compose_update.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/finetune/docker-compose_update.yml b/finetune/docker-compose_update.yml index 44d7ff7..93a9611 100644 --- a/finetune/docker-compose_update.yml +++ b/finetune/docker-compose_update.yml @@ -12,6 +12,9 @@ version: '3.8' # Quantizer - 提供量化支持,以减少模型大小和提高推理速度。 # RandomLTD - 用于随机层裁剪的优化器。 # StochasticTransformer - 支持随机Transformer模型的训练和推理。 +# 检测系统总内存(以GB为单位) +# TOTAL_MEM=$(awk '/MemTotal/ {printf "%.0f\n", $2/1024/1024}' /proc/meminfo) +# echo "Docker Compose 文件已生成,shm_size 设置为 ${TOTAL_MEM}GB。" services: ubuntu-finetune: @@ -41,21 +44,29 @@ services: CACHEBUST: 1 volumes: - ./src:/bbtft - - /tmp:/tmp + # - /tmp:/tmp container_name: ubuntu-finetune pull_policy: if_not_present + ulimits: + memlock: + soft: -1 + hard: -1 # tty: true + # stdin_open: true restart: unless-stopped image: hotwa/deepspeed:pt23_update - shm_size: '32gb' + privileged: true + ipc: host + network_mode: host + shm_size: '64gb' ports: - 3228:22 environment: - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=compute,utility - TMPDIR=/var/tmp - networks: - - network_finetune + # networks: + # - network_finetune deploy: resources: reservations: @@ -64,6 +75,6 @@ services: count: all capabilities: [gpu] -networks: - network_finetune: - name: network_finetune +# networks: +# network_finetune: +# name: network_finetune