From 23a01b06960a1f3976b0746445f503bfaa813613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E9=98=B3?= Date: Mon, 8 Jan 2024 14:22:05 +0800 Subject: [PATCH] Add Docker image for CUDA-12.1. --- README.md | 1 + README_CN.md | 1 + README_ES.md | 1 + README_FR.md | 1 + README_JA.md | 1 + docker/Dockerfile-cu121 | 122 ++++++++++++++++++++++++++++++++++ finetune.py | 18 ++++- finetune/finetune_ds.sh | 2 +- finetune/finetune_lora_ds.sh | 2 +- finetune/finetune_qlora_ds.sh | 2 +- 10 files changed, 146 insertions(+), 5 deletions(-) create mode 100644 docker/Dockerfile-cu121 diff --git a/README.md b/README.md index 668fa2b..ba8c85b 100644 --- a/README.md +++ b/README.md @@ -1049,6 +1049,7 @@ To simplify the deployment process, we provide docker images with pre-built envi 1. Install the correct version of Nvidia driver depending on the image to use: - `qwenllm/qwen:cu117` (**recommend**): `>= 515.48.07` - `qwenllm/qwen:cu114` (w/o flash-attention): `>= 470.82.01` + - `qwenllm/qwen:cu121`: `>= 530.30.02` - `qwenllm/qwen:latest`: same as `qwenllm/qwen:cu117` 2. Install and configure [docker](https://docs.docker.com/engine/install/) and [nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html): diff --git a/README_CN.md b/README_CN.md index a0c6b96..9472748 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1040,6 +1040,7 @@ print(response.choices[0].message.content) 1. 根据需要使用的镜像版本,安装相应版本的Nvidia驱动: - `qwenllm/qwen:cu117`(**推荐**):`>= 515.48.07` - `qwenllm/qwen:cu114`(不支持flash-attention):`>= 470.82.01` + - `qwenllm/qwen:cu121`:`>= 530.30.02` - `qwenllm/qwen:latest`:与`qwenllm/qwen:cu117`相同 2. 安装并配置[docker](https://docs.docker.com/engine/install/)和[nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html): diff --git a/README_ES.md b/README_ES.md index 633e263..6010f46 100644 --- a/README_ES.md +++ b/README_ES.md @@ -909,6 +909,7 @@ Para simplificar el proceso de despliegue, proporcionamos imágenes Docker con e 1. Instale la versión correcta del controlador Nvidia en función de la imagen que vaya a utilizar: - `qwenllm/qwen:cu117` (**recomendado**): `>= 515.48.07` - `qwenllm/qwen:cu114` (w/o flash-attention): `>= 470.82.01` + - `qwenllm/qwen:cu121`: `>= 530.30.02` - `qwenllm/qwen:latest`: igual que `qwenllm/qwen:cu117` 2. Instale y configure [docker](https://docs.docker.com/engine/install/) y [nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html): diff --git a/README_FR.md b/README_FR.md index 77e85e2..f59e9e7 100644 --- a/README_FR.md +++ b/README_FR.md @@ -912,6 +912,7 @@ Pour simplifier le processus de déploiement, nous fournissons des images docker 1. Installez la version correcte du pilote Nvidia en fonction de l'image à utiliser : - `qwenllm/qwen:cu117` (**recommandé**): `>= 515.48.07` - `qwenllm/qwen:cu114` (w/o flash-attention): `>= 470.82.01` + - `qwenllm/qwen:cu121`: `>= 530.30.02` - `qwenllm/qwen:latest`: même que `qwenllm/qwen:cu117` 2. Installer et configurer [docker](https://docs.docker.com/engine/install/) et [nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) : diff --git a/README_JA.md b/README_JA.md index 826010e..8961419 100644 --- a/README_JA.md +++ b/README_JA.md @@ -948,6 +948,7 @@ print(response.choices[0].message.content) 1. 使用するイメージに応じて、正しいバージョンのNvidiaドライバをインストールしてください: - `qwenllm/qwen:cu117` (**recommend**): `>= 515.48.07` - `qwenllm/qwen:cu114` (w/o flash-attention): `>= 470.82.01` + - `qwenllm/qwen:cu121`: `>= 530.30.02` - `qwenllm/qwen:latest`: same as `qwenllm/qwen:cu117` 2. [Docker](https://docs.docker.com/engine/install/) と [nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) をインストールして設定します: diff --git a/docker/Dockerfile-cu121 b/docker/Dockerfile-cu121 new file mode 100644 index 0000000..5059f31 --- /dev/null +++ b/docker/Dockerfile-cu121 @@ -0,0 +1,122 @@ +ARG CUDA_VERSION=12.1.0 +ARG from=nvidia/cuda:${CUDA_VERSION}-cudnn8-devel-ubuntu20.04 + +FROM ${from} as base + +ARG from + +RUN <