From e961f1671d98ec787cb401437ee821cdf5fa1a6f Mon Sep 17 00:00:00 2001 From: Jintao Date: Mon, 11 Nov 2024 14:56:36 +0800 Subject: [PATCH] Update docker from release/1.20 (#1077) --- docker/Dockerfile.ubuntu | 6 +++--- docker/build_image.py | 1 - docker/install.sh | 10 ++-------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/docker/Dockerfile.ubuntu b/docker/Dockerfile.ubuntu index b7b72d40..3461e32e 100644 --- a/docker/Dockerfile.ubuntu +++ b/docker/Dockerfile.ubuntu @@ -19,9 +19,9 @@ ARG INSTALL_MS_DEPS={install_ms_deps} # install dependencies COPY requirements /var/modelscope -RUN pip uninstall ms-swift modelscope -y && \ +RUN pip uninstall ms-swift modelscope -y && pip --no-cache-dir install pip==23.* -U && \ + pip install --no-cache-dir apex -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \ if [ "$INSTALL_MS_DEPS" = "True" ]; then \ - pip --no-cache-dir install pip==23.3.1 && \ pip --no-cache-dir install omegaconf==2.0.6 && \ pip install --no-cache-dir 'cython<=0.29.36' versioneer 'numpy<2.0' -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \ pip install --no-cache-dir kwsbp==0.0.6 -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \ @@ -57,7 +57,7 @@ RUN echo "cache bust $(date +%Y%m%d%H%M%S)" && \ pip install .[eval] && pip install evalscope -U --no-dependencies && pip install xtuner --no-dependencies && \ cd / && rm -fr /tmp/ms-swift && pip cache purge; \ pip install --no-cache-dir torch=={torch_version} torchvision=={torchvision_version} torchaudio=={torchaudio_version} {index_url} && \ - pip install --no-cache-dir transformers -U huggingface-hub==0.25.0 && pip cache purge; \ + pip install --no-cache-dir transformers huggingface-hub==0.25.* -U && pip cache purge; \ pip config set global.index-url https://mirrors.aliyun.com/pypi/simple && \ pip config set install.trusted-host mirrors.aliyun.com && \ cp /tmp/resources/ubuntu2204.aliyun /etc/apt/sources.list diff --git a/docker/build_image.py b/docker/build_image.py index a9e1a107..e3fc930f 100644 --- a/docker/build_image.py +++ b/docker/build_image.py @@ -195,7 +195,6 @@ class GPUImageBuilder(Builder): RUN pip install adaseq pai-easycv && \ pip install tf-keras==2.16.0 --no-dependencies && \ pip install --no-cache-dir torchsde jupyterlab torchmetrics==0.11.4 basicsr pynvml shortuuid && \ - pip install --no-cache-dir apex -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \ CUDA_HOME=/usr/local/cuda TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0" \ pip install --no-cache-dir 'git+https://github.com/facebookresearch/detectron2.git' """ diff --git a/docker/install.sh b/docker/install.sh index 0695b1b1..3a6ffc13 100644 --- a/docker/install.sh +++ b/docker/install.sh @@ -7,7 +7,7 @@ vllm_version=${4:-0.6.0} lmdeploy_version=${5:-0.6.1} autogptq_version=${6:-0.7.1} -pip install --no-cache-dir -U autoawq +pip install --no-cache-dir -U autoawq lmdeploy==$lmdeploy_version pip uninstall -y torch torchvision torchaudio @@ -19,12 +19,6 @@ pip install --no-cache-dir tiktoken transformers_stream_generator bitsandbytes d # find on: https://github.com/Dao-AILab/flash-attention/releases cd /tmp && git clone https://github.com/Dao-AILab/flash-attention.git && cd flash-attention && python setup.py install && cd / && rm -fr /tmp/flash-attention && pip cache purge; -pip install --no-cache-dir auto-gptq==$autogptq_version +pip install --no-cache-dir triton auto-gptq==$autogptq_version vllm==$vllm_version -U && pip cache purge # pip uninstall -y torch-scatter && TORCH_CUDA_ARCH_LIST="6.0;6.1;6.2;7.0;7.5;8.0;8.6;8.9;9.0" pip install --no-cache-dir -U torch-scatter - -pip install --no-cache-dir -U triton - -pip install --no-cache-dir vllm==$vllm_version -U - -pip install --no-cache-dir -U lmdeploy==$lmdeploy_version --no-deps