From 1c1e48a5702bfc8084e2f47a3cea9552bfeb3b6d Mon Sep 17 00:00:00 2001 From: XYZliang Date: Wed, 13 Nov 2024 10:11:22 +0800 Subject: [PATCH] Increase shm_size to 16GB in docker-compose.yml to optimize shared memory allocation for large-scale model fine-tuning tasks. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This pull request increases the shm_size parameter in docker-compose.yml to 16GB. The goal is to enhance the LLaMA-Factory framework’s performance for large model fine-tuning tasks by providing sufficient shared memory for efficient data loading and parallel processing. This PR also addresses the issues discussed in [this comment](https://github.com/hiyouga/LLaMA-Factory/issues/4316#issuecomment-2466270708) regarding Shared Memory Limit error. Former-commit-id: 64414905a3728abf3c51968177ffc42cfc653310 --- docker/docker-cuda/docker-compose.yml | 1 + docker/docker-npu/docker-compose.yml | 1 + docker/docker-rocm/docker-compose.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/docker/docker-cuda/docker-compose.yml b/docker/docker-cuda/docker-compose.yml index 82e05b36..213e5c7d 100644 --- a/docker/docker-cuda/docker-compose.yml +++ b/docker/docker-cuda/docker-compose.yml @@ -24,6 +24,7 @@ services: - "8000:8000" ipc: host tty: true + shm_size: '16gb' stdin_open: true command: bash deploy: diff --git a/docker/docker-npu/docker-compose.yml b/docker/docker-npu/docker-compose.yml index 333f63ac..edf43f19 100644 --- a/docker/docker-npu/docker-compose.yml +++ b/docker/docker-npu/docker-compose.yml @@ -22,6 +22,7 @@ services: - "8000:8000" ipc: host tty: true + shm_size: '16gb' stdin_open: true command: bash devices: diff --git a/docker/docker-rocm/docker-compose.yml b/docker/docker-rocm/docker-compose.yml index c5b5d748..fbc9d292 100644 --- a/docker/docker-rocm/docker-compose.yml +++ b/docker/docker-rocm/docker-compose.yml @@ -24,6 +24,7 @@ services: - "8000:8000" ipc: host tty: true + shm_size: '16gb' stdin_open: true command: bash devices: