Refine docker file (#1041)

This commit is contained in:
tastelikefeet
2024-10-22 11:13:17 +08:00
committed by GitHub
parent 0026729f7a
commit eac004d7f2
4 changed files with 15 additions and 26 deletions

View File

@@ -138,4 +138,4 @@ RUN set -eux; \
pip --version
# end of install python
pip install tf-keras -i https://mirrors.aliyun.com/pypi/simple
RUN pip install tf-keras -i https://mirrors.aliyun.com/pypi/simple

View File

@@ -9,9 +9,13 @@ autogptq_version=${6:-0.7.1}
modelscope_branch=${7:-master}
swift_branch=${8:-main}
pip uninstall -y torch torchvision torchaudio
pip install --no-cache-dir -U torch==$torch_version torchvision==$torchvision_version torchaudio==$torchaudio_version
pip install --no-cache-dir funtextprocessing typeguard==2.13.3 scikit-learn -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
# curl -fsSL https://ollama.com/install.sh | sh
curl -fsSL https://ollama.com/install.sh | sh
pip install --no-cache-dir -U funasr
@@ -27,7 +31,7 @@ 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 https://github.com/Dao-AILab/flash-attention/releases/download/v2.6.3/flash_attn-2.6.3+cu123torch2.4cxx11abiTRUE-cp310-cp310-linux_x86_64.whl
# 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;
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
@@ -41,7 +45,7 @@ pip install vllm==$vllm_version -U
pip install --no-cache-dir -U lmdeploy==$lmdeploy_version --no-deps
pip install --no-cache-dir -U torch==$torch_version torchvision==$torchvision_version torchaudio==$torchaudio_version
pip install pynvml shortuuid
pip uninstall ms-swift modelscope -y

View File

@@ -6,6 +6,10 @@ torchaudio_version=${3:-2.4.0}
modelscope_branch=${4:-master}
swift_branch=${5:-main}
pip uninstall -y torch torchvision torchaudio
pip install --no-cache-dir -U torch==$torch_version torchvision==$torchvision_version torchaudio==$torchaudio_version --index-url https://download.pytorch.org/whl/cpu
pip install --no-cache-dir funtextprocessing typeguard==2.13.3 scikit-learn -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
curl -fsSL https://ollama.com/install.sh | sh
@@ -18,10 +22,6 @@ pip install --no-cache-dir text2sql_lgesql==1.3.0 git+https://github.com/jin-s13
pip install --no-cache-dir mpi4py paint_ldm mmcls>=0.21.0 mmdet>=2.25.0 decord>=0.6.0 ipykernel fasttext fairseq -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
pip uninstall torch torchvision torchaudio
pip install --no-cache-dir -U torch==$torch_version torchvision==$torchvision_version torchaudio==$torchaudio_version --index-url https://download.pytorch.org/whl/cpu
pip uninstall ms-swift modelscope -y
cd /tmp && GIT_LFS_SKIP_SMUDGE=1 git clone -b $modelscope_branch --single-branch https://github.com/modelscope/modelscope.git && cd modelscope && pip install .[all] && cd / && rm -fr /tmp/modelscope && pip cache purge;