From c6af21a957c2680c843aa4d5714d518d9ac549d4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 29 Jun 2024 06:17:20 +0000 Subject: [PATCH] add docker swarm network --- .gitignore | 4 ++- finetune/docker-compose_swarm.yml | 50 +++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 finetune/docker-compose_swarm.yml diff --git a/.gitignore b/.gitignore index 722d7bf..f5ddb54 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ build_d/ *_src evo_src/ megaDNA_src/ -evo/huggingface/ \ No newline at end of file +evo/huggingface/ +*.zip +finetune/binbbt/ \ No newline at end of file diff --git a/finetune/docker-compose_swarm.yml b/finetune/docker-compose_swarm.yml new file mode 100644 index 0000000..6066d26 --- /dev/null +++ b/finetune/docker-compose_swarm.yml @@ -0,0 +1,50 @@ +version: '3.8' + +services: + ubuntu-finetune: + build: + context: . + dockerfile: Dockerfile + args: + PYTHON_VERSION: "3.10" + CUDA_VERSION: "12.1.0" + PYTORCH_VERSION: "2.3.0" + TORCHVISION_VERSION: "0.18.0" + TORCHAUDIO_VERSION: "2.3.0" + DS_BUILD_OPS: 1 + USE_CUDA: 1 + USE_ROCM: 0 + USE_XPU: 0 + CUDA: cu121 + CUDA_ARCH_LIST: "80;86;89;90" + SETUPTOOLS_VERSION: "69.5.1" + DCUTLASS_NVCC_ARCHS: "80;86;89;90;90a" + DEEPSPEED_VERSION: "master" + DEEPSPEED_INSTALL_FLAGS: "--allow_sudo" + volumes: + - ./binbbt:/bbtft + container_name: ubuntu-finetune + pull_policy: if_not_present + restart: unless-stopped + image: hotwa/deepspeed:pt23 + shm_size: '40gb' + ports: + - 3228:22 + environment: + - NVIDIA_VISIBLE_DEVICES=all + - NVIDIA_DRIVER_CAPABILITIES=compute,utility + - TMPDIR=/var/tmp + networks: + - network_finetune + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + +# 修改为docker-swarm的网络 +networks: + test-net: + external: true